MapServer 4.x; GetFeatureInfo's SRS vs CRS
Bart van den Eijnden (OSGIS)
bartvde at XS4ALL.NL
Mon Jun 19 00:36:28 PDT 2006
Arnaud,
what happens if you add EPSG:4326 to your WMS_SRS? Can you query in
EPSG:4326 then? I.e.:
WMS_SRS "EPSG:26915 EPSG:4326"
You need to do this for your WEB METADATA section as well as for your
LAYER's METADATA sections. More ideally, you could just leave out the
LAYER's WMS_SRS since they inherit from the parent layer (WEB METADATA)
anyway.
> Still, I found it funny that both CRS and SRS work for valid Epsg IDs,
> and that SRS doesn't work for invalid Epsg IDs.
I think this is probably since Mapserver will default to the projection
defined in the MAP file at the MAP level.
Best regards,
Bart
> Hi Bart,
>
> Bart van den Eijnden (OSGIS) wrote:
>
>> Arnaud,
>> which SRS's are you advertizing in the MAP file? You need to advertize
>> them using WMS_SRS (or the more general OWS_SRS) metadata.
>
>
> In the (attached) map file -a barely modified itasca.map from the demo-
> I advertise epsg 26915, but I thought (erroneously) that the epsg 4326
> would be supported as well.
> Still, I found it funny that both CRS and SRS work for valid Epsg IDs,
> and that SRS doesn't work for invalid Epsg IDs.
>
> Regards,
> Arnaud
>
>>
>> Can you post your current MAP file?
>>
>> Best regards,
>> Bart
>>
>> Arnaud Diederen wrote:
>>
>>> Hello,
>>>
>>> When I issue a GetCapabilities on my installation of mapserver, using
>>> the following URL:
>>>
>>> http://localhost/cgi-bin/mapserv?map=/var/www/workshop/ita
>>> sca.map&service=WMS&version=1.3&request=GetCapabilities
>>>
>>> I get a capabilities document showing:
>>>
>>> <WMT_MS_Capabilities version="1.1.1">
>>>
>>>
>>>
>>> So, the service expects requests of version 1.1.1 of the WMS spec,
>>> but when I issue a GetFeatureInfo with this URL:
>>>
>>> http://localhost/cgi-bin/mapserv?map=/var/www/workshop/itasca.map&SRS=EPSG:4326&BBOX=-99.30245,43.4354,-87.36445,49.404399999999995&TRANSPARENT=TRUE&BGCOLOR=0xFFFFFF&EXCEPTIONS=application/vnd.ogc.se_xml&WIDTH=800&HEIGHT=400&LAYERS=airports&STYLES=&REQUEST=GetFeatureInfo&VERSION=1.3&SERVICE=WMS&INFO_FORMAT=gml&X=363&Y=121&FEATURE_COUNT=100&QUERY_LAYERS=airports
>>>
>>>
>>> I get the following error:
>>>
>>> <ServiceExceptionReport version="1.1.1">
>>> <ServiceException code="InvalidSRS">
>>> msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS
>>> must be valid for all requested layers.
>>> </ServiceException>
>>> </ServiceExceptionReport>
>>>
>>> hmm. But then, if I change the SRS parameter name to CRS, I get a
>>> valid (though empty) result:
>>>
>>> <msGMLOutput
>>> xmlns:gml="http://www.opengis.net/gml"
>>> xmlns:xlink="http://www.w3.org/1999/xlink"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>>> </msGMLOutput>
>>>
>>> The weird thing is that in the version 1.1.1 of the spec, there is no
>>> CRS parameter for the GetFeatureInfo, but an SRS parameter. SRS was
>>> changed to CRS at version 1.3.
>>> It looks to me like a bug, am I wrong?
>>>
>>> Best regards,
>>>
>>> Arnaud
>>>
>>> Last Minute Addendum: When I try with the equivalent (projected)
>>> native logical bbox, in the native SRS (EPSG:26915, this is the
>>> Itasca demo!) mapserver doesn't mind the name of the SRS param. Both
>>> SRS and CRS work. Now, I'm totally lost o_O
>>> Will mapserver refuse to work properly if asked for features with a
>>> 4326 box?
>>>
>>>
>>> Thanks for any information!
>>>
>>>
>>
>>
>
>
More information about the MapServer-users
mailing list