Working with WMS

From Wildsong
Jump to navigationJump to search

Resources

This GeoServer page has a good description of WMS services. https://docs.geoserver.org/stable/en/user/services/wms/reference.html

The (somewhat dry technical) standard is at OGC is here: https://www.ogc.org/standards/wms and the reference/demo server is here: https://www.ogc.org/standards/wms/quickstart

Find out what a WMS service can do

Start with the basic URL, this is the OGC reference server. This will just return a (relatively useless) informational message.

http://metaspatial.net/cgi-bin/ogc-wms.xml

Then add the GetCapabilities request (note these are not supposed to be case sensitive, so REQUEST=request)

http://metaspatial.net/cgi-bin/ogc-wms.xml?request=GetCapabilities&service=wms

This will return an extensive XML file with the capabilities of the server listed.

Find out about a layer

So far I have not gotten this to work.

Plucking the name of a layer from the GetCapabilities request, I can ask for more information. If I omit the version I get an error.

http://metaspatial.net/cgi-bin/ogc-wms.xml?service=wms&request=DescribeLayer&layers=OGC-WMS_reference-server_with_Ordnance_Survey_OpenData&version=1.3.0


Setting the SRS

In my case, the default for this server is to return its images in "EPSG=4326" which is unprojected WGS84. If I want Oregon state system "EPSG=2992" I can add the SRS like this:

https://gis.blm.gov/arcgis/rest/services/vegetation/BLM_Nat_AIM_Terrestrial/MapServer/WMSServer?SRS=EPSG:2992