[udig-devel] accuracy of GetFeatureInfo

Bart van den Eijnden (OSGIS) bartvde at xs4all.nl
Thu Sep 7 22:57:26 PDT 2006


Hi Richard,

I can test it, no problem. My plane to Lausanne leaves only Monday 
morning :-)

Best regards,
Bart

Richard Gould schreef:
> Ok, crazy buffering removed. uDig should make sane WMS GetFeatureInfo
> requests now. This is on trunk, and will be reflected in the release we
> are trying to put out (later today).
>
> It definitely needs some testing, in particular when both client and
> server side reprojection are involved. (The fix was written in haste and
> may not be perfect)
>
> Bart, are you able to test it once we have a release ready?
>
> Richard
>
> On Tue, 2006-05-09 at 19:42 +0200, Bart van den Eijnden (OSGIS) wrote:
>   
>> uDIG requests a 3x3 image. And then it requests the topleft pixel (X=1, 
>> Y=1).
>>
>> I don't know the internals ofcourse, but should it not request the 
>> center pixel (X=2, Y=2)? At least that gives the correct results for my 
>> testcase :-)
>>
>> Why else would it request 3x3, it might as well request 1x1 or 2x2 if it 
>> is using the topleft pixel.
>>
>> Best regards,
>> Bart
>>
>> Jody Garnett schreef:
>>     
>>> In that case we will need to ask Richard to implement a different 
>>> plugin for the InfoTool for each renderer he creates. Not fun but 
>>> possible. I did think he ended up making a 2x2 reference image and 
>>> selecting the first pixel (after having a few WMS fail on a 1x1 image 
>>> reference image.
>>> Jody
>>>       
>>>> I think the problem with this approach, as now demonstrated, is that 
>>>> it doesn't work :)  It might take something a little more 
>>>> "arbitrary", like a pretend image of "about 300 pixels in size" with 
>>>> the click point in the "middle of that image" to get a 
>>>> correct-seeming answer.  Sending back a one-pixel map with a click 
>>>> "on the pixel" is begging to hit corner cases in the WMS server side 
>>>> code.
>>>>
>>>> On 5-Sep-06, at 12:29 AM, Jody Garnett wrote:
>>>>
>>>>         
>>>>> Ah, interesting question ... because of a difference between what we 
>>>>> display and what we requested from the WMS.
>>>>> - often we will have to make several requests and tile content onto 
>>>>> the screen in WMS happy chunks,
>>>>> - or we will need to make slightly larger requests and resample them 
>>>>> onto the screen (as mentioned previously).
>>>>>
>>>>> It was just easier to back project a pixel and use it to make a 
>>>>> request in the correct location once, rather then trying to reverse 
>>>>> several rendering process es to exactly match the original request 
>>>>> (aka the approach we used for uDig 0.8).
>>>>>
>>>>> Cheers,
>>>>> Jody
>>>>>           
>>>>>> Hi Jody,
>>>>>>
>>>>>> why did you end up changing the BBOX and width/height client-side? 
>>>>>> Why not leave it up to the WMS server like Gaia does?
>>>>>>
>>>>>> Best regards,
>>>>>> Bart
>>>>>>
>>>>>> Jody Garnett schreef:
>>>>>>             
>>>>>>> Indeed, we eventually figured out that WMS getInfo is considered a 
>>>>>>> check in the center of a single pixel.
>>>>>>>
>>>>>>> Thinking,
>>>>>>>
>>>>>>> Richard for a while we forced the renderers to leave us a hook so 
>>>>>>> we could make our info request, is there any way we can ask the 
>>>>>>> WMS renderers to leave some hints on the layer blackboard about 
>>>>>>> the image rendered? The same plugin making the rendering 
>>>>>>> contribution can provide the hint ...
>>>>>>>
>>>>>>> Jody
>>>>>>>               
>>>>>>>> Hi Jody,
>>>>>>>>
>>>>>>>> the projections I am trying are both supported by the WMS.
>>>>>>>>
>>>>>>>> Unfortunately I have no Java hosting, but it's a simple shapefile 
>>>>>>>> which can be set up with Geoserver. I am using 1.4.
>>>>>>>>
>>>>>>>> The shapefile can be found here (200 Kb, native projection 
>>>>>>>> EPSG:28992, uDIG set to RD / New projection):
>>>>>>>>
>>>>>>>> http://www.osgis.nl/lausanne/nl-prov.zip
>>>>>>>>
>>>>>>>> An example request which uDIG is fyring off is (this request is 
>>>>>>>> really strange since the BBOX is not the BBOX of the map image 
>>>>>>>> shown anymore! and X and Y are always 1):
>>>>>>>>
>>>>>>>> /geoserver/wms?Y=1&X=1&SERVICE=WMS&INFO_FORMAT=text/html&LAYERS=ogctestbed:nl-prov&FORMAT=image/png&HEIGHT=3&REQUEST=GetFeatureInfo&WIDTH=3&BBOX=188907.50415179788,391802.21024004533,192453.4125990071,395348.1186872545&SRS=EPSG:28992&QUERY_LAYERS=ogctestbed%3Anl-prov&VERSION=1.1.1 
>>>>>>>> HTTP/1.1" 200 447
>>>>>>>>
>>>>>>>> Thanks in advance.
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Bart
>>>>>>>>
>>>>>>>> Jody Garnett schreef:
>>>>>>>>                 
>>>>>>>>> Good question, it makes a direct call when able to make a direct 
>>>>>>>>> rendering of the WMS image (ie udig is using a coordinate system 
>>>>>>>>> supported by the WMS). In rare cases it may have to resample the 
>>>>>>>>> image onto the screen (making up for lack of WMS projections), 
>>>>>>>>> we could check that we back project the query into the 
>>>>>>>>> coordinate space of the original image... but as I recall I 
>>>>>>>>> wrote this one and went to some trouble to get it right.
>>>>>>>>>
>>>>>>>>> Can you point us at a service illustrating the problem, perhaps 
>>>>>>>>> in a jira report.
>>>>>>>>> Jody
>>>>>>>>>                   
>>>>>>>>>> Hi list,
>>>>>>>>>>
>>>>>>>>>> how accurate is uDIG with respect to GetFeatureInfo?
>>>>>>>>>>
>>>>>>>>>> I have tried it against 2 WMS's, Geoserver and Deegree, and at 
>>>>>>>>>> the borders of provinces, a lot of times the wrong element is 
>>>>>>>>>> returned. Ofcourse this could also be due to the WMS's.
>>>>>>>>>>
>>>>>>>>>> So I checked Gaia, and using Gaia it is very accurate for 
>>>>>>>>>> Geoserver, so I am assuming it is a uDIG problem.
>>>>>>>>>>
>>>>>>>>>> Any input appreciated.
>>>>>>>>>>
>>>>>>>>>> Best regards,
>>>>>>>>>> Bart
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>>>>> _______________________________________________
>>>>>>>>> User-friendly Desktop Internet GIS (uDig)
>>>>>>>>> http://udig.refractions.net
>>>>>>>>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>>                 
>>>>>>> _______________________________________________
>>>>>>> User-friendly Desktop Internet GIS (uDig)
>>>>>>> http://udig.refractions.net
>>>>>>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>             
>>>>> _______________________________________________
>>>>> User-friendly Desktop Internet GIS (uDig)
>>>>> http://udig.refractions.net
>>>>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>>>>           
>>>> _______________________________________________
>>>> User-friendly Desktop Internet GIS (uDig)
>>>> http://udig.refractions.net
>>>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>>>         
>>> _______________________________________________
>>> User-friendly Desktop Internet GIS (uDig)
>>> http://udig.refractions.net
>>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>>
>>>
>>>       
>>     
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
>   


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl



More information about the udig-devel mailing list