Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there an interface or website to search public WMS services for location/projection?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Calling GetCapabilities for a given WMS server will return information about all the layers available. This is normally an XML document, so you will need to parse it to find the projection.

For instance, the request:

http://demo.mapserver.org/cgi-bin/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

Returns a big XML document. The interesting bit from your point of view is this:

<Layer queryable="0" opaque="0" cascaded="0">
    <Name>bluemarble</Name>
    <Title>Blue Marble World Elevation and Bathymetry Raster</Title>
    <SRS>EPSG:4326</SRS>
    <LatLonBoundingBox minx="-180" miny="-90" maxx="180" maxy="90" />
    <BoundingBox SRS="EPSG:4326"
                minx="-180" miny="-90" maxx="180" maxy="90" />
    <Attribution>
        <Title>NASA Blue Marble</Title>
        <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://earthobservatory.nasa.gov/Features/BlueMarble/"/>
    </Attribution>
</Layer>

<Layer queryable="0" opaque="0" cascaded="0">
    <Name>continents</Name>
    <Title>World continents</Title>
    <SRS>EPSG:4326</SRS>
    <LatLonBoundingBox minx="-180" miny="-90" maxx="180" maxy="83.6274" />
    <BoundingBox SRS="EPSG:4326"
                minx="-180" miny="-90" maxx="180" maxy="83.6274" />
    <Style>
      <Name>default</Name>
      <Title>default</Title>
      <LegendURL width="126" height="131">
         <Format>image/png</Format>
         <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://demo.mapserver.org/cgi-bin/wms?version=1.1.1&amp;service=WMS&amp;request=GetLegendGraphic&amp;layer=continents&amp;format=image/png&amp;STYLE=default"/>
      </LegendURL>
    </Style>
</Layer>

And several others like it.

How you go about extracting the information you want is a bit trickier, and it depends on what software you're using. Something like QGIS will connect to the WMS and get its capabilities document and do all the work for you. If on the other hand you are writing a program to do it, then you will need to either use an XML parser library, use an XPath parser, or use regular expressions

Some more information on your use case will help.

share|improve this answer
add comment

Look in the getCapabilities response, it will list all the projections for each layer. They will also list the bounds for the layer in at least Lat/Lon and possibly some other projection too.

share|improve this answer
    
Is there a way to seach the getcapabilities of all the available layers? Like from... sampleserver1.arcgisonline.com/arcgis/rest/services Can I find which services use wgs84? –  Brad Nesom Oct 15 '11 at 21:49
    
depends on your client, search for 4326. Btw that isn't a WMS link –  iant Oct 16 '11 at 8:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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