1

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

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 of specific SRS like "Pulkovo 1942 / Gauss-Kruger zone 13" for "EPSG:28413"?

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

Pavel Aristarkhov
  • 158
  • 1
  • 1
  • 7

1 Answers1

3

OGC services do not provide such facilities, they are built under the assumption that you have a EPSG database already available in the client. You can try using some free online service to get to a name (with the perils of a service that is not guaranteed to be available 24x7 of course), like:

A better solution production wise, if you are using GeoServer, is probably to create a WPS process in GeoServer that would do the same job (or create a REST service of your own based on other open source libraries).

Andrea Aime
  • 1,706
  • 11
  • 16
  • 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 Aristarkhov Jan 16 '17 at 09:06
  • Then I believe your only way is to create a restlet or wps process in GeoServer, or write something of your own sitting on the same server. GeoServer has its own demo page, but there is no way to make it return just a description of the CRS, instead of a full page. You might parse it anyways, of course it's not going to be a clean solution. E.g.: http://demo.geo-solutions.it/geoserver/web/wicket/bookmarkable/org.geoserver.web.demo.SRSDescriptionPage?code=EPSG:4326 – Andrea Aime Jan 16 '17 at 09:43
  • Well, creating a restlet is not that difficult, one might even look into modifying that demo page to return some json when a certain param is provided. If you cannot do it youself there are companies that can help you, see http://geoserver.org/support/ – Andrea Aime Jan 16 '17 at 11:09