[mapserver-users] Problem using WMS GetFeatureInfo in OpenLayers with different projections

Dejan Gambin dejan.gambin at coin.hr
Thu Feb 13 15:38:11 PST 2014


FIrst I thought it was it. No error when using one of the rasters from the tileindex (there are only four total). Then I did gdal_merge on those four rasters to get one. After that, the same error when using the merged raster. Then I tried with each individual raster and found that error comes from only one (ASTGTM2_N45E013_dem.tif)...still didn't found why :-(


On 13. vel. 2014., at 16:09, Rahkonen Jukka (Tike) wrote:

> Hi,
> 
> Just to eliminate one possibility, is the result the same if you use one DEM raster as a source instead of tileindex?
> 
> -Jukka Rahkonen-
> 
> Dejan Gambin wrote:
> 
>> Since I didn't solve this yet, do you think it could be a bug and/or should I try
>> with some newer MapServer version? I am currently using 6.0.3
>> 
>> Thx
>> 
>> Dejan Gambin
>> 
>> On 22. sij. 2014., at 10:35, Dejan Gambin wrote:
>> 
>>> Sorry for being late...
>>> 
>>> So, I have tested it all with browser of course. Here are some working and
>> non-working requests:
>>> 
>>> Mapfile part:
>>> 
>>> PROJECTION
>>>   "init=epsg:4326"
>>> END
>>> METADATA
>>>   "wms_srs"   "EPSG:4326"
>>>   "wms_title"  "aster_dem"
>>>   "gml_include_items" "value_0"
>>>   "gml_value_0_alias" "Nadmorska_visina"
>>> END
>>> TILEINDEX "../aster/aster_index"  #original raster in 4326
>>> 
>>> 
>>> Working GetMap request in 900913:
>>> 
>>> http://mydomain.com/cgi-
>> bin/mywms/?SERVICE=WMS&VERSION=1.1.1&REQUEST=G
>>> 
>> etMap&LAYERS=aster_dem_info&STYLES=&SRS=EPSG:900913&FORMAT=image
>> /png&W
>>> 
>> IDTH=400&HEIGHT=300&BBOX=1496080.301904,5576310.226428,1593919.698
>> 096,
>>> 5649689.773572
>>> 
>>> Non-working GetFeatureInfo request in 900913:
>>> 
>>> http://mydomain.com/cgi-
>> bin/mywms/?SERVICE=WMS&VERSION=1.1.1&REQUEST=G
>>> 
>> etFeatureInfo&LAYERS=aster_dem_info&STYLES=&SRS=EPSG:900913&FORMAT
>> =ima
>>> 
>> ge/png&WIDTH=400&HEIGHT=300&BBOX=1496080.301904,5576310.226428,1
>> 593919
>>> 
>> .698096,5649689.773572&QUERY_LAYERS=aster_dem_info&INFO_FORMAT=g
>> ml&X=2
>>> 00&Y=100
>>> 
>>> Working GetMap request in 4326:
>>> 
>>> http://mydomain.com/cgi-
>> bin/mywms/?SERVICE=WMS&VERSION=1.1.1&REQUEST=G
>>> 
>> etMap&LAYERS=aster_dem_info&STYLES=&SRS=EPSG:4326&FORMAT=image/p
>> ng&WID
>>> TH=400&HEIGHT=300&BBOX=13.439518,44.712096,14.318424,45.178647
>>> 
>>> Working GetFeatureInfo request in 4326:
>>> 
>>> http://mydomain.com/cgi-
>> bin/mywms/?SERVICE=WMS&VERSION=1.1.1&REQUEST=G
>>> 
>> etFeatureInfo&LAYERS=aster_dem_info&STYLES=&SRS=EPSG:4326&FORMAT=i
>> mage
>>> 
>> /png&WIDTH=400&HEIGHT=300&BBOX=13.439518,44.712096,14.318424,45.17
>> 8647
>>> &QUERY_LAYERS=aster_dem_info&INFO_FORMAT=gml&X=200&Y=100
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On 17. sij. 2014., at 13:52, Rahkonen Jukka (Tike) wrote:
>>> 
>>>> Hi,
>>>> 
>>>> Please show us the complete GetFeatureInfo requests for both cases. Server
>> urls are not interesting but all the WMS parameters. Have you already tried to
>> send them from browser? Testing with OpenLayers is waste of time because you
>> can't control what really happens but with hand written requests you are the
>> master.
>>>> 
>>>> -Jukka Rahkonen-
>>>> 
>>>> 
>>>> Lars Lingner wrote:
>>>>> 
>>>>> On 17.01.2014 11:10, Dejan Gambin wrote:
>>>>>>> What is the mywms? MapServer binary, wrapper script, ...?
>>>>>> wrapper script. Something like:
>>>>>> 
>>>>>> #! /bin/sh MS_MAPFILE=/path_to_my_map_file export MS_MAPFILE
>>>>>> /usr/lib/cgi-bin/mapserv6
>>>>>> 
>>>>> 
>>>>> AFAIK nothing wrong here.
>>>>> 
>>>>>>> 
>>>>>>> Did you check the actual requests? Does the bbox parameter fit to
>>>>>>> the srs? Could you compare a working GetFeatureInfo request in
>>>>>>> 900913 with a failing one in 4326?
>>>>>> Yes, bbox parameter fits to srs in both cases. So, if I put
>>>>>> bbox/srs params in 426 everything works, if I put them in 900913
>>>>>> then error happens
>>>>> 
>>>>> Does other maps work with 900913?
>>>>> 
>>>>> I would check which pro4 epsg file mapserver is using, check if
>>>>> there is a definition for 90013 and if it looks like
>>>>> 
>>>>> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0
>>>>> ++y_0=0
>>>>> +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs
>>>>> 
>>>>> On the other hand, if GetMap ist working fine, projection definition
>>>>> should be fine too. Just thinking out loud...
>>>>> 
>>>>> 
>>>>>>> 
>>>>>>> Raise the debug level to 3 at map level and layer level. You can
>>>>>>> let MapServer write its own error logfile, so your apache log
>>>>>>> stays clean.
>>>>> 
>>>>> Could you find anything in the MapServer log file?
>>>>> 
>>>>> Here I would identify a working 4326 GFI request and compare the
>>>>> corresponding log with a 900913 request. There should be a difference.
>>>>> 
>>>>> 
>>>>> Best wishes,
>>>>> 
>>>>> Lars
>>>>> 
>>>>> _______________________________________________
>>>>> mapserver-users mailing list
>>>>> mapserver-users at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>> _______________________________________________
>>>> mapserver-users mailing list
>>>> mapserver-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>> 
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list