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

Incorrect encoding of LineStrings when using fromGeojsonVt #35

Open
ibesora opened this issue Oct 25, 2018 · 0 comments
Open

Incorrect encoding of LineStrings when using fromGeojsonVt #35

ibesora opened this issue Oct 25, 2018 · 0 comments

Comments

@ibesora
Copy link

ibesora commented Oct 25, 2018

When using geojsonvt to create tilesets I found that some layers were incorrectly rendered.
Examining what happened I found that the geometry that comes from geojsonvt contains all the LineString geometry on a single array: instead of having [[x0, y0], [x1, y1], ..., [xN, yN]] it's all flattened as [x0, y0, x1, y1, ... xN, yN].
When using fromGeojsonVT this is not correctly interpreted in FeatureWrapper::loadGeometry so the geometry contains an array of Points with undefined coordinates.

Should something be implemented in vt-pbf::fromGeojsonVt to correctly interpret this case?
I was thinking about modifying GeoJSONWrapper to also store the feature type so when geometry is loaded from a LineString it checks wether the geometry comes as a single array or an array of arrays.

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

1 participant