We make an application (using Python and open source libraries like GDAL) that stores raster data from around the world. We wrote some code that acts as a WMS server, that can create images from the raster data in various projections.

Now in the GetCapabilities response we want to list some projections that can be used with a given raster. We only want to show projections for which the data falls within the right area of use, e.g. we only want to show EPSG:28992 if the raster falls entirely within the Netherlands. But we don't want to hardcode the area of use for each projection we may want to show.

Is there a way to find out what the official area of use is for any projection that GDAL can handle? E.g. to find out what the bounding box of the area of use of EPSG:28992 is, preferably in terms of its own coordinates.

  • I suppose there is a way to do what you want, although I don't know how. In QGIS 3.0 when you select a projection, you are shown the extent of the area where this projection is applicable. Maybe you could look in that direction? – Techie_Gus Jun 4 '18 at 12:07
  • Hmm if QGis can do it, then it's possible :-)... I've never looked at its source code but the answer must be somewhere in there, thanks for the tip. – RemcoGerlich Jun 4 '18 at 12:28
  • EPSG database includes the polygons of the valid areas. Here is an experimental SpatiaLite database with the polygon geometries as well as a shapefile gaia-gis.it/epsg-spatialite-test-v2.7z – user30184 Jun 4 '18 at 13:03
  • Example query: SELECT "a"."coord_ref_sys_code" AS "coord_ref_sys_code", "a"."coord_ref_sys_name" AS "coord_ref_sys_name", "a"."area_of_use_code" AS "area_of_use_code", "b"."geom" AS "geom" FROM "epsg_coordinatereferencesystem" AS "a" JOIN "epsg_area" AS "b" ON ("a"."area_of_use_code" = "b"."area_code") WHERE "a"."coord_ref_sys_code" = 4326; – user30184 Jun 4 '18 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.