Skip to main content
Solved

Does the Mapbox mbTiles MVT technology preview writer reproject to Web Mercator or do you have to reproject?

  • August 17, 2020
  • 2 replies
  • 63 views

diwanicka
Forum|alt.badge.img+4

The documentation for Mapbox MBTiles MVT writer says the tiles are generated in WebMercator (EPSG:3857). Does this mean that you have to reproject first or the writer does this for you?

Best answer by david_r

The writer will do it for you, as long as the output features have been tagged with the actual coordinate system before they hit the writer (e.g. CoordinateSystemSetter). Just be aware that there may be some edge cases where the reprojection may not give you the result you expect, in particular where local rules must be applied.

For this reason I'm not a big fan of implicit reprojections, I find that it "hides" some key functionality, so in 99% of cases I tend to manually reproject the data with a transformer such as the CsMapReprojector etc. That also allows me the opportunity to insert a comment to explain why it's necessary, etc.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • Best Answer
  • August 17, 2020

The writer will do it for you, as long as the output features have been tagged with the actual coordinate system before they hit the writer (e.g. CoordinateSystemSetter). Just be aware that there may be some edge cases where the reprojection may not give you the result you expect, in particular where local rules must be applied.

For this reason I'm not a big fan of implicit reprojections, I find that it "hides" some key functionality, so in 99% of cases I tend to manually reproject the data with a transformer such as the CsMapReprojector etc. That also allows me the opportunity to insert a comment to explain why it's necessary, etc.


diwanicka
Forum|alt.badge.img+4
  • Author
  • August 17, 2020

The writer will do it for you, as long as the output features have been tagged with the actual coordinate system before they hit the writer (e.g. CoordinateSystemSetter). Just be aware that there may be some edge cases where the reprojection may not give you the result you expect, in particular where local rules must be applied.

For this reason I'm not a big fan of implicit reprojections, I find that it "hides" some key functionality, so in 99% of cases I tend to manually reproject the data with a transformer such as the CsMapReprojector etc. That also allows me the opportunity to insert a comment to explain why it's necessary, etc.

Thank you David. I found it odd that a writer was performing the reprojection for me, I am not aware of another writer that does this. I other reason I asked is I use Tippecanoe from Mapbox to generate vector tile mbtile files and the geoJSON input is EPSG:4326 or EPSG:3857. The Mapbox vector tile spec 2.1 states that "Vector Tiles MAY be used to represent data with any projection and tile extent scheme." so it found it odd that the writer would force a projection to an output.