I have added the optimized version to libosmium. But OSM data is special, because we know it only has ~1cm resolution. So I am very confident, the optimizations will not lead to any problems, because while they change the numeric value of the mercator coordinates, the difference is way below what is in the OSM data in the first place.
For vector tiles that might work with generic GIS data from any source, this is somewhat different. The source data could be much more detailed. Usual uses of vector tiles for rendering are not affected I would think, but who knows what people are using vector tiles for and in what resolutions? There could at least be a compile time option or so to switch mercator projection implementations. Any opinions?
The mercator projection code in
src/vector_tile_projection.ipp
could be optimized. See https://github.com/osmcode/mercator-projection .I have added the optimized version to libosmium. But OSM data is special, because we know it only has ~1cm resolution. So I am very confident, the optimizations will not lead to any problems, because while they change the numeric value of the mercator coordinates, the difference is way below what is in the OSM data in the first place.
For vector tiles that might work with generic GIS data from any source, this is somewhat different. The source data could be much more detailed. Usual uses of vector tiles for rendering are not affected I would think, but who knows what people are using vector tiles for and in what resolutions? There could at least be a compile time option or so to switch mercator projection implementations. Any opinions?
/cc @springmeyer @oxidase