[mapserver-users] WMS Client - access to non-Mapserver WMS Servers

Havard Tveite havard.tveite at ikf.nlh.no
Mon Apr 15 06:56:34 EDT 2002


It turned out that my problems were syntactical. I changed to the
following "minimal" CONNECTION:

"http://www.geographynetwork.com/servlet/com.esri.wms.Esrimap?ServiceName=ESRI_World&VERSION=1.0.0&REQUEST=map&Layers=Rivers&Format=png"

And that worked!

The "REQUEST=map" has to be present, "REQUEST" has to be uppercase
and "map" must be lowercase (this case requirement seems to come
from Mapserver).
"VERSION" must be either uppercase or lowercase (not mixedcase)
(this case requirement seems to come from Mapserver).
"LAYERS" can be any case ("Layers", "layers", ...), but the layer
names are case sensitive.
"FORMAT" can be any case (Format, format, ...), and so can the
format ("PNG", "png", "Png", ...). Mime types (e.g. "image/png")
can not be used.
Mapserver took care of SRS and the STYLES parameter was not
necessary.

A suggestion to the developers could be to modify the code to use
"request=map" (instead of "getmap"?) when the WMTVER/VERSION value
is 1.0.0.
WMS Client support could perhaps also be made easier for the users
by making mapserver translate from MIME types ("image/png") to the
1.0.0 types ("png"), and by relaxing the case requirements for
"VERSION" and "REQUEST" ?

I hope my experiences can be useful to other users :-)


Regards,

H. Tveite

Havard Tveite wrote:
> 
> I have had some problems connecting to ESRI WMS servers.
> I am not a WMS expert, but I have briefly looked at the
> WMS 1.0.0 specification.
> 
> My Mapserver setup is:
> >MapServer version 3.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> >SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> >INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=SDE INPUT=GDAL INPUT=SHAPEFILE
> 
> I have successfully connected my WMS Client to Mapserver-based
> WMS Servers. I have not succeeded in connecting to ESRI-based
> WMS Servers.
> 
> I have tested against
> "www.geographynetwork.com/servlet/com.esri.wms.Esrimap?ServiceName=ESRI_World"
> and have used cubewerx to check the expected output.
> 
> I have tried the following CONNECTION string:
> "http://www.geographynetwork.com/servlet/com.esri.wms.Esrimap?ServiceName=ESRI_World&WMTVER=1.0.0&LAYERS=rivers&STYLE=default&SRS=4326&Format=image/gif&TRANSPARENT=false"
> 
> This is my LAYER definition
> ------------------------------------------------------------------------
>   LAYER
>     NAME "esri"
>     METADATA
>       "wms_title" "ESRI - World"
>       "wms_srs" "epsg:4326"
>       "wms_connectiontimeout" "1000"
>     END
>     TYPE RASTER
>     STATUS DEFAULT
>     CONNECTION "http://www.geographynetwork.com/servlet/com.esri.wms.Esrimap?ServiceName=ESRI_World&WMTVER=1.0.0&LAYERS=rivers&STYLE=default&SRS=4326&Format=PNG&TRANSPARENT=false"
>     CONNECTIONTYPE WMS
>     PROJECTION
>       "init=epsg:4326"
>     END
>   END #layer esri
> ------------------------------------------------------------------------
> 
> The message is:
>   msDrawRaster(): Image handling error. Unrecognized or unsupported image format
> 
> If I use only Mapserver WMS Servers, everything works fine...
> 
> If I include a "request=map" in the CONNECTION, I get a blank image at
> scales where the rivers show up at cubewerx's client.
> 
> I must be missing something...
> 
> These are the capabilities of:
> http://www.geographynetwork.com/servlet/com.esri.wms.Esrimap?ServiceName=ESRI_World&WMTVER=1.0.0&request=capabilities
> 
> ------------------------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
> <!DOCTYPE WMT_MS_Capabilities SYSTEM "http://www.geographynetwork.com:80/capabilities/capabilities_1_0_0.dtd" [
> <!-- vendor-specific elements defined here -->
> <!ENTITY % KnownFormats " GIF | JPEG | PNG | WMS_XML | MIME | ARCXML | BLANK |INIMAGE  ">
> <!ELEMENT ARCXML EMPTY>
> <!--ESRI Inc. Arc XML format (axl)-->
> ]>
> <WMT_MS_Capabilities version="1.0.0">
> <Service>
> <Name>GetMap</Name>
> <Title>ESRI Inc. Map Server</Title>
> <Abstract>WMT Map Server maintained by ESRI Inc.</Abstract>
> <OnlineResource>http://www.geographynetwork.com:80/servlet/com.esri.wms.Esrimap?</OnlineResource>
> <Fees>none</Fees>
> <AccessConstraints>none</AccessConstraints>
> </Service>
> <Capability>
> <Request>
> <Map>
> <Format>
> <JPEG/>
> <GIF/>
> <PNG/>
> </Format>
> <DCPType>
> <HTTP>
> <Get onlineResource="http://www.geographynetwork.com:80/servlet/com.esri.wms.Esrimap?"/>
> </HTTP>
> </DCPType>
> </Map>
> <Capabilities>
> <Format>
> <WMS_XML/>
> </Format>
> <DCPType>
> <HTTP>
> <Get onlineResource="http://www.geographynetwork.com:80/servlet/com.esri.wms.Esrimap?"/>
> </HTTP>
> </DCPType>
> </Capabilities>
> <FeatureInfo>
> <Format>
> <ARCXML/>
> <MIME/>
> </Format>
> <DCPType>
> <HTTP>
> <Get onlineResource="http://www.geographynetwork.com:80/servlet/com.esri.wms.Esrimap?"/>
> </HTTP>
> </DCPType>
> </FeatureInfo>
> </Request>
> <Exception>
> <Format>
> <BLANK/>
> <INIMAGE/>
> <WMS_XML/>
> </Format>
> </Exception>
...
> <Layer>
> <Name>Rivers</Name>
> <Title>Rivers</Title>
> <SRS>EPSG:4326</SRS>
> <LatLonBoundingBox minx="-180.0" miny="-90.0" maxx="180.0" maxy="90.0"/>
> </Layer>
...
> </Capability>
> </WMT_MS_Capabilities>
> ------------------------------------------------------------------------

-- 
Havard Tveite                      Phone:  +47 64948857
Department of Mapping Sciences     Fax:    +47 64948856
Agricultural University of Norway
POBox 5034, N-1432 Ås, NORWAY    http://www.nlh.no/ikf/



More information about the mapserver-users mailing list