[udig-devel] accuracy of GetFeatureInfo

Paul Ramsey pramsey at refractions.net
Tue Sep 5 12:08:28 PDT 2006


No, the desire is not to provide a buffer, it is to get the right  
answer :)


On 5-Sep-06, at 10:10 AM, Richard Gould wrote:

> On Tue, 2006-05-09 at 17:02 +0200, Jody Garnett wrote:
>> 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.
>
> Err.. I made a couple experiments with this, but I didn't ever  
> think it
> was really feasible. I think the goal was to be able to provide a  
> buffer
> around a point clicked, or provide support for bbox-enabled
> GetFeatureInfo requests (WMS spec says you can only use point
> requests).
>
> Since the info tool in uDig is point based, I presume that the  
> desire is
> to provide a buffer? Paul is right in that shrinking the image a bit
> would be closer to the desired effect. If we shrink the image to  
> 3x3 and
> ask for one pixel, we are going to get 1/9 of the screen back (and
> possibly the wrong section too).
>
> So I think we should default back to just using the standard method of
> doing it (ie. let the WMS provide tolerance if it wishes). We could  
> add
> a preference option to enable a buffer around the point and then  
> use the
> voodoo code, but I don't think it should be a default.
>
> I'll see if I can fix this on Thursday morning, before the RC release.
>
> Richard
>
>> 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.50415179 
>>>>>>> 788,391802.21024004533,192453.4125990071,395348.1186872545&SRS=E 
>>>>>>> PSG: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



More information about the udig-devel mailing list