locationtech / proj4j

Java port of the Proj.4 library for coordinate reprojection
Other
189 stars 73 forks source link

Expose area of use #113

Open jdries opened 2 months ago

jdries commented 2 months ago

PyProj has this area_of_use CRS property: https://pyproj4.github.io/pyproj/stable/api/crs/crs.html#pyproj.crs.CRS.area_of_use

It allows to check if a certain extent it within the valid bounds of the CRS, so exceptions can be avoided. This is quite relevant when dealing with rasters that are larger then the valid area of a CRS. We for instance could use it here: https://github.com/locationtech/geotrellis/pull/3542

pomadchin commented 2 months ago

:+1: Nice! If you're interested in implementing it I do my best to help you and to get it merged and released.