-
Notifications
You must be signed in to change notification settings - Fork 211
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
specify how multi geometries are encoded (or move to explicit enumeration values) #30
Comments
I also discovered that mapnik will not generate any vector tile data at all for a MultiPoint geometry of zero points or a MultiLineString geometry of zero lines. It just omits the feature entirely. |
One thing that just came up in Leaflet.MapboxVectorTile is that we don't have a defined way of how we should handle multiple polygons in a tile with the same ID. This is what happens when you encode a multi-polygon with Mapzen's encoder. SpatialServer/Leaflet.MapboxVectorTile#24 I can have a set of polygons referenced by an ID, but it doesn't feel right to have a bunch of different polygons come through with the same ID. |
In version 2 we specify the existence of MultiLinestring, MultiPoint, and MultiPolygon and note how they are determined. See pull request #39. However, we have not added them specifically to the enum. In future versions of the spec this could possible be included, but if we included it currently it would make v2 tiles incompatible with v1 decoders. |
How about this to get a migration path: |
@joto Using the winding orders we are able to get to the point where we do not require a multipolygon and while I do think your idea is good if we want to have version 2 be backwards compatible with version 3 I have a feeling it will not likely be so! There are likely changes around encoding I think we would like to make that would change the structure and make version 2 not be able to read version 3 (no promises on any of this). |
The spec should say how MultiPoint, MultiLineString, and MultiPolygon geometries are to be encoded. As I understand it, currently:
GeomType
POINT
and >1MoveTo
commands in the geometry field.GeomType
LINESTRING
and >1MoveTo
,LineTo*
sequences in the geometry field.GeomType
POLYGON
and >1MoveTo
,LineTo*
,ClosePath
sequences in the geometry field.These should be documented. But they have the following deficiencies:
For these reasons, I would rather see the spec adopt explicit MultiPoint, MultiLineString, and MultiPolygon types.
The text was updated successfully, but these errors were encountered: