I want to map the geographic extents / bounding boxes of a lot of EPSG CRSes. At least, those with a rectangular geographic extent.
For example, take epsg:2004, visiting that page shows the extent (both projected and geographic).
There are several sites with this info, which make it trivial to find the extent for a single CRS at a time
- epsg.io, including via the QGIS "EPSG CRS" Plugin
- epsg-registry, in the 'Area of Use' results.
Is there an easy way to extract this information off-line using QGIS, proj4 or other FOSS tools? Preferably without needing to parse the WKT/proj4 strings (which are easy enough to find, they're sitting in any postgis-enabled database)
Online queries (to an API or web service) would be good too.
Other things I've looked at:-
I don't see anything in the QgsCoordinateReferenceSystem class for this, so I assume that qgis doesn't do any bounds checking and throws all the points at proj4, which will complain (with a "forward projection failure") if any points fall outside the valid bounds.
Also, pyproj (the python wrapper for proj4) doesn't seem to be able to extract this info, it's really just for transforming between CRSes.
Following BradHard's suggestion, I registered on epsg.org and built the postgres database using the scripts provided.
Then it was simple matter to join the CRS to the area...
SELECT epsg_area.area_name, epsg_area.area_of_use, epsg_area.area_south_bound_lat, epsg_area.area_north_bound_lat, epsg_area.area_west_bound_lon, epsg_area.area_east_bound_lon, epsg_area.area_polygon_file_ref, epsg_coordinatereferencesystem.coord_ref_sys_code, epsg_coordinatereferencesystem.coord_ref_sys_name FROM public.epsg_area, public.epsg_coordinatereferencesystem WHERE epsg_coordinatereferencesystem.area_of_use_code = epsg_area.area_code and epsg_coordinatereferencesystem.coord_ref_sys_code = 27700;