4

I received a list (XML) of SRSes by request (by JavaScript):

http://gis1:8080/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities then parse it and get a list of EPSG codes like "EPSG:1234"

How I can now get a name (description) of specific SRS like "Pulkovo 1942 / Gauss-Kruger zone 13" for "EPSG:28413"?

...or may be I can do it by OpenLayers API?

I asked this first on https://stackoverflow.com/q/41672346/7424390 but then I saw that specfic forum exists so just in case I duplicate here

2

The easiest way to convert EPSG codes in to human readable names is to look them up on http://epsg.io - so you could download http://epsg.io/28413.html and parse it in your JavaScript code.

  • 1
    Probably easier to parse from epsg.io/28413.gml – user30184 Jan 16 '17 at 13:47
  • Or go to the canonical registry and then parse out the name. – mkennedy Jan 16 '17 at 19:18
  • Thanks, but I have to receive SRSes from specific local GIS server (standard (embeded as in geoserver) + custom (my own) SRSes). Online services not an option. – Pavel Aristarhov Jan 18 '17 at 4:31
2

You can use the OGC CRS definition resolver, as detailed on the OGC wiki page:

http://external.opengeospatial.org/twiki_public/CRSdefinitionResolver/WebHome

So for EPSG::28413 you would use:

http://www.opengis.net/def/crs/EPSG/0/28413 and then you can parse the XML response for the name (with XPath: /gml:ProjectedCRS/gml:name)

  • Thanks, but I have to receive SRSes from specific local GIS server (standard (embeded as in geoserver) + custom (my own) SRSes). Online services not an option. – Pavel Aristarhov Jan 18 '17 at 4:31
  • You could perhaps install your own version of the secore software – nmtoken Jan 18 '17 at 14:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.