-
Notifications
You must be signed in to change notification settings - Fork 48
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
Update for multi-polygon compliance with spec v1.0.2 #20
Comments
Refs #20 To handle multipolygons, instead of cloning features with each part, the winding order of the parts will signal when a new multipolygon starts.
@bcamper Will this change work with older v0.3 and earlier Tangrams or does it require the new v0.4 release? |
We should test it but as far as I am aware it should not require any Tangram changes. For decoding MVT tiles we use Mapbox's own JS library. Related, for non-tiled datasources, we do the same poly/ring detection on data generated by Mapbox's geojson-vt (which also outputs multi-polygons in this flattened format), see https://github.com/tangrams/tangram/blob/master/src/sources/geojson.js#L159. |
This fix didn't end up getting deployed with the latest update. I added tickets to the appropriate chef repos to ensure we get the latest version of mapbox-vector-tile deployed in the future. |
Once deployed, how can we verify the fix? |
We should identify a few multipolygon features and compare before/after to make sure they have not changed. I believe The Lake in Central Park is one (we had issues with it previously). Any good candidates? |
@rmarianski What further testing besides #402 do we need here? |
@nvkelso can we point an older version of tangram at the dev vector tiles to see if it looks ok? |
I don't believe it's Tangram version dependent...? On Wed, Nov 11, 2015 at 4:23 PM, Robert Marianski [email protected]
|
Did the decoding library version in tangram change at some point? It sounded like there was some question as to whether this change would impact older versions? If not, then we should be ok. |
The decoding library is Mapbox's, and should be compatible with old and new encoding methods. If we want to verify, all tangram releases are available by version number: mapzen.com/tangram/[version]/tangram.[min | debug].js |
I was wrong, the Mapbox decoding lib doesn't provide this! This is fixed in Tangram here, when we are ready to merge: https://github.com/tangrams/tangram/compare/decode-multipolygon |
@rmarianski Is this part of v0.8 work? |
I vote for deploying with v0.8. All the work here is done and just needs to be deployed. We've verified that the new winding order looks to be correct in dev now, as well as the issue with rounding vs truncating not making things worse in tangram. |
Cool, moving into v0.8 |
Over to @bcamper to confirm this works to spec before taking this to prod. |
Verified in dev! |
The upcoming spec v1.0.2 clarifies how multi-polygons should be encoded: all polygons should be "flattened" into one series of rings, with the winding order of the rings used to determine which are interior/exterior. An exterior ring indicates the start of a new polygon.
I believe this differs from our current handling of multi-polygons, where we "exploded" each polygon into its own feature, and copied the properties of each (as there was no official handling of multi-polygons previously). We should update to be compliant. Tangram already handles the new multi-polygon encoding so no client changes are needed on that side (style rules should be compatible with either method).
mapbox/vector-tile-spec#36
The text was updated successfully, but these errors were encountered: