-
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
mapbox-vector-tile doesn't output rfc7946 geojson compliant feature type #107
Comments
Yup, sorry about that! The decoder outputs a data structure which is pretty close to the internal structure of an MVT tile, and wouldn't be usable directly as GeoJSON. I think in addition to properly stringifying the enum, we'd also need to do the coordinate conversion from MVT tile-local coordinates back to EPSG:4326. It's something we'd love to take as a contribution, if you're interested? However, if you're looking for a quick way to convert MVT to GeoJSON, then I'd recommend Mapbox's own |
Given that I'm using mapbox-vector-tile in a limited context (reading mapillary coverage in a QGIS plugin) and I don't know and I'm not interested in whole MVT cases implementation, I solve for myself manually setting line 48 of decoder.py forcing to:
In fact looking to the given link, the internal structure of MVT return always a Features array. About coordinate conversion, I'm using a customized decoder.py that equalize MVT tile coordinates to wgs84 using the calculated bounds for the requested tile passed to the optional quantize_bounds parameter: You can find the implementation in: https://github.com/enricofer/go2mapillary/blob/master/extlibs/mapbox_vector_tile/decoder.py If you found this useful I can submit a PR. |
Seems useful to wider group of people, so yes on a PR. But seems like it should be an new option to output rfc7946 geojson than changing the default behavior, which this would be a downpayment for. |
in
mapbox-vector-tile/mapbox_vector_tile/decoder.py
Line 48 in 46629e4
The output geojson isn't actually readable by last GDAL
The text was updated successfully, but these errors were encountered: