[Geomoose-users] USGS NationalMap WMS Error

Jim Klassen klassen.js at gmail.com
Wed Oct 22 13:26:02 PDT 2014


Ok, I found it.

USGS must be running a load balanced web service and not all of the back
end servers seem to be configured the same.  When it doesn't work, I am
getting a (mangled) location header back that is causing the browser to
try again at an invalid link.

GeoMoose generated GetMap URL:
http://basemap.nationalmap.gov/*ArcGIS*/services/USGSImageryOnly/MapServer/WMSServer?TRANSPARENT=false&FORMAT=image%2Fjpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&LAYERS=0&SRS=EPSG%3A3857&BBOX=-19559252.511242,851939.40079357,-1576371.488758,8111622.5992064&WIDTH=919&HEIGHT=371

Location:
"http://basemap.nationalmap.gov/*arcgis*/services/USGSImageryOnly/MapServer/WMSServer?TRANSPARENT=false&FORMAT=*image%252Fjpeg*&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&LAYERS=0&*SRS=EPSG%253A3857*&BBOX=-19559252.511242,851939.40079357,-1576371.488758,8111622.5992064&WIDTH=919&HEIGHT=371"

There are two things of note about the location header.
1) The first is "ArcGIS" in the GeoMoose URL is switched to "arcgis". 
The official service list [1] is showing the lowercase version so this
is something that must have changed since I first configured the layer. 
Changing this to the lowercase version in the mapbook appears to fix the
problem (as it prevents the server sending a location header).

2) The URL in the Location header is being incorrectly URL escaped by
the USGS server.  The '%3A' is being escaped into '%253A', even though
'%3A' is already an escape sequence for ':'.

[1] http://viewer.nationalmap.gov/example/services/serviceList.html

On 10/22/2014 02:28 PM, Jim Klassen wrote:
> And now it is broken again...
>
> On 10/22/2014 02:16 PM, Jim Klassen wrote:
>> Ok, now am I even more confused as it has started working again.  It
>> looks like VERSION=1.1.1 was being added already by GeoMoose.  Since I
>> didn't change anything, I can only figure there must have been problems
>> on the far end.
>>
>> (For clarification OSGeo MapServer is not involved at all, this is
>> direct to the USGS servers from GeoMoose).
>>
>> On 10/22/2014 01:45 PM, TC Haddad wrote:
>>> Ummm... this is just a long shot, but it looks like by default, this is a
>>> WMS 1.3.0, not WMS 1.1.1
>>>
>>> In WMS 1.3.0, you have to use CRS=EPSG:3857 instead of SRS=EPSG:3857 in the
>>> URL.
>>>
>>> It does look like the service also supports WMS 1.1.1, so I would try
>>> adding the version to your URL fragment, to force the version you want to
>>> use, and see if it makes the server happy with using SRS=EPSG:3857
>>>
>>> like so:
>>>
>>> http://basemap.
>>> <http://basemap.nationalmap.gov/ArcGIS/services/USGSImageryOnly/MapServer/WMSServer?version=1.1.1&>
>>> nationalmap.gov/ArcGIS/
>>> <http://basemap.nationalmap.gov/ArcGIS/services/USGSImageryOnly/MapServer/WMSServer?version=1.1.1&>
>>> services/USGSImageryOnly/
>>> <http://basemap.nationalmap.gov/ArcGIS/services/USGSImageryOnly/MapServer/WMSServer?version=1.1.1&>
>>> MapServer/WMSServer?version=1.1.1&
>>> <http://basemap.nationalmap.gov/ArcGIS/services/USGSImageryOnly/MapServer/WMSServer?version=1.1.1&>
>>>
>>> Mapserver should take care of the rest of the differences between 1.3.0 and
>>> 1.1.1.
>>>
>>> Tanya
>>>
>>>
>>>
>>>
>>> On Wed, Oct 22, 2014 at 11:08 AM, Jim Klassen <klassen.js at gmail.com> wrote:
>>>
>>>> I am having difficulty connecting GeoMoose to the NationalMap's imagery
>>>> service.
>>>>
>>>> The GetMap response says invalid SRS.  It appears GeoMoose is sending
>>>> SRS=EPSG%3A3857 and the service is expecting SRS=EPSG:3857.  This used
>>>> to work a while ago. I am not sure what changed.  I've tried with
>>>> GeoMoose 2.6.1 through master.
>>>>
>>>> Any thoughts what I might be doing wrong?
>>>>
>>>> Mapbook fragment:
>>>>
>>>>     <map-source name='tnm_usgsimagery' type="wms" tiled="false"
>>>> opacity="1.0">
>>>>         <param name="TRANSPARENT" value="false"/>
>>>>         <param name="FORMAT" value="image/jpeg"/>
>>>>
>>>>
>>>> <url>
>>>> http://basemap.nationalmap.gov/ArcGIS/services/USGSImageryOnly/MapServer/WMSServer
>>>> ?</url>
>>>>         <layer name="0"/>
>>>>     </map-source>
>>>>
>>>> _______________________________________________
>>>> Geomoose-users mailing list
>>>> Geomoose-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20141022/34a75701/attachment.html>


More information about the Geomoose-users mailing list