spatial-algorithms
spatial-algorithms copied to clipboard
Reprojection utility functions
Working through vtquery has made us think it'd be great to have a couple reprojection utilities in spatial-algorithms (or elsewhere).
- Convert vector tile coordinates to lnglat - requires (x, y, and z values)
- Convert lnglat to vector tile coordinates - requires(lng, lat, and z values)
cc @mapbox/core-tech
See also https://github.com/osmcode/libosmium/blob/master/include/osmium/geom/mercator_projection.hpp and https://github.com/osmcode/mercator-projection
I have been considering if we should include this directly into a spatial algorithms or have it as a stand alone library. I have been leaning towards making this a stand alone library.
noting that working on vtcomposite has also triggered this conversation!