node-mapnik icon indicating copy to clipboard operation
node-mapnik copied to clipboard

Transform between geographic coordinates and screen coordinates

Open forrert opened this issue 10 years ago • 2 comments
trafficstars

Is there a way to access the view_transform method on a Map object in node-mapnik? As I understand it, this would allow me to obtain image coordinates from geographic coordinates. Would it be possible to make this method and the ViewTransform class available in node-mapnik?

forrert avatar Apr 10 '15 15:04 forrert

This is not exposed yet, but yes it would be feasible. We'll keep this in mind for future releases but I'm busy so I don't know when it will be available.

Although you could also write the transform yourself if you are in a hurry. Take a look at https://github.com/mapbox/vector-tile-py/blob/master/vector_tile/renderer.py#L156-L178 which is a python port of the Mapnik C++ code. It would be better to use Mapnik's C++ code, but in case you understand python better that could be a resource.

springmeyer avatar May 07 '15 19:05 springmeyer

Any updates on this issue?

pimpreneil avatar Aug 10 '17 15:08 pimpreneil