mapbox / spatial-algorithms

Spatial algorithms library for geometry.hpp
35 stars 9 forks source link

Reprojection utility functions #17

Open mapsam opened 6 years ago

mapsam commented 6 years ago

Working through vtquery has made us think it'd be great to have a couple reprojection utilities in spatial-algorithms (or elsewhere).

  1. Convert vector tile coordinates to lnglat - requires (x, y, and z values)
  2. Convert lnglat to vector tile coordinates - requires(lng, lat, and z values)

cc @mapbox/core-tech

joto commented 6 years ago

See also https://github.com/osmcode/libosmium/blob/master/include/osmium/geom/mercator_projection.hpp and https://github.com/osmcode/mercator-projection

flippmoke commented 6 years ago

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.

millzpaugh commented 6 years ago

noting that working on vtcomposite has also triggered this conversation!