Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any requirement for polygon ring winding ? #18

Closed
strk opened this issue Jul 31, 2014 · 4 comments
Closed

Any requirement for polygon ring winding ? #18

strk opened this issue Jul 31, 2014 · 4 comments
Milestone

Comments

@strk
Copy link

strk commented Jul 31, 2014

Is there any requirement for polygon holes and shell to follow a specific winding ? (clockwise/counterclockwise) ?

Do rings have to end with a ClosePath ?

@sgillies
Copy link
Contributor

sgillies commented Aug 6, 2014

@strk We came to the conclusion in https://github.com/mapbox/tilemill/issues/2110 that the right hand rule should be applied to polygons in Tilemill. I propose we do the same for the vector tile spec.

Good question about ClosePath. Requirement of it seems a little redundant since it's already implicit in the geometry type. And Mapnik closes polygons given to it already, right?

@pnorman
Copy link

pnorman commented Oct 10, 2014

For reference, a multipolygon where the first polygon is an ourter ring of four coordinates and the second is an outer ring of five and an inner of three gives you this result from Mapnik
image

MoveTo Length 1 [9]
coord x2
LineTo Length 3 [26]
coord x6
ClosePath Length 1 [15]
MoveTo Length 1 [9]
coord x2
LineTo Length 5 [42]
coord x10
ClosePath Length 1 [15]
MoveTo Length 1 [9]
coord x2
LineTo Length 3 [26]
coord x6
ClosePath Length 1 [15]

pnorman added a commit to MapQuest/avecado that referenced this issue Oct 10, 2014
mapnik/mapnik#2518 prevents checking the GeoJSON, so instead the feature geometry is queried manually.

mapbox/mapnik-vector-tile#62 prevents MultiPoints from working with mapnik-vector-tile, so they don't work in Avecado either

ref mapbox/vector-tile-spec#18
@flippmoke flippmoke added this to the v2.0 milestone Nov 18, 2015
@flippmoke flippmoke reopened this Nov 18, 2015
@flippmoke
Copy link
Member

Sorry, didn't mean to close this issue -- this will serve as a great ticket for discussions on the v2 pull request #39

@flippmoke
Copy link
Member

As I do not see any objections to the way winding order is described in the new specification going to go ahead and close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants