PROJ icon indicating copy to clipboard operation
PROJ copied to clipboard

'End the world' outline of a crs

Open mtennekes opened this issue 1 year ago • 2 comments

For visualisation purposes we would like to calculate the 'boundaries' of the earth from a given crs.

A naive approach that I took earlier was to transform the longlat -180, - 180, -90, - 90 bounding box to the target crs:

image

However, this clearly does not work in general. Is there a way to obtain the outline of a crs?

See also https://github.com/r-tmap/tmap/issues/929

mtennekes avatar Aug 30 '24 12:08 mtennekes

I would suggest you use proj_trans_bounds() : https://proj.org/en/9.4/development/reference/functions.html#c.proj_trans_bounds

rouault avatar Aug 30 '24 12:08 rouault

Thx @rouault but to clarify: I'm looking for the visible boundary, expecting a polygon rather than a box. In the map above, the contour that separates blue/green from white.

mtennekes avatar Aug 30 '24 13:08 mtennekes