[wfs-dev] zoom to selected

Panagiotis (Peter) A. Vretanos pvretano at cubewerx.com
Fri Jun 18 12:30:26 EST 2004


Bart,

We discussed this at the last RWG teleconference and this idea will be 
included in the upcomming V1.1 revision.

Ciao.

Bart van den Eijnden wrote:
> Hi Peter,
> 
> sorry for the late reply but I have been in Ottawa for the Open Source 
> GIS conference / Mapserver User Meeting.
> 
> I like the idea you propose. Is anybody on this list part of the WFS RWG 
> or something similar so that this can be further discussed for the next 
> WFS spec?
> 
> It could also be done without an interface change though, but then the 
> WFS spec should be more explicit about what a server should return when 
> somebody asks for maxfeatures=0. But next to the bbox you will want to 
> know the number of records etc., as other people have noted, so the 
> "metadata container" for a response is a good idea in my opinion. Would 
> be nice though to have an OWS type of action taken, instead WFS specific 
> action.
> 
> Best regards,
> Bart
> 
> On Sun, 06 Jun 2004 11:52:23 -0400, Panagiotis (Peter) A. Vretanos 
> <pvretano at cubewerx.com> wrote:
> 
>> Guys,
>>
>> What about the idea of defining a standard wfs response constainer, 
>> not wfs:FeatureCollection, called GetFeatureResponse that contains 
>> information about the response and may or may not contain the actual 
>> features in the result set (depending of a flag on the GetFeature 
>> request)?
>>
>> Something like:
>>
>> <GetFeatureResponse date="06062004"
>>                      numberOfFeatures=10000 ... (other stuff)>
>>     <ResponseBoundingBox>
>>        <gml:Envelope> ... </gml:Envelope>
>>     </ResponseBoundingBox>
>>
>>     ... response may appear here ...
>>
>>
>> </GetFeatureResponse>
>>
>> The a client may request just the empty response container to get the 
>> relevant metadata about the response, number of record, bbox, etc ...
>> or the client may request the full response.
>>
>> This is similar to the idea that the catalog uses.
>>
>> Ciao.
>>
>> Aleksandar Milanovic wrote:
>>
>>> Hi Bart,
>>>
>>> I agree with you that there is no support for that in the WFS 
>>> interface (there is no getBBOX request). Operations like this should 
>>> be supported. Another example is GetFeatureCount. They would be very 
>>> useful for a client to prepare itself for the receipt of data.
>>>
>>> Regards,
>>> Alex
>>>
>>> Quoting bartvde at xs4all.nl:
>>>
>>>
>>>> Hi Aleksander,
>>>>
>>>> thanks for your answer.
>>>>
>>>>
>>>>> If you don't trust it, you could calculate the bbox by yourself.
>>>>
>>>>
>>>> This is not an option, as I don't actually want to retrieve all the 
>>>> data
>>>> (that would be a lot of overhead for a zoom to selected function).
>>>>
>>>> I just want to have a simple interface to get the BBOX associated 
>>>> with a
>>>> particular Filter. And I was looking at how WFS could provide me 
>>>> with this
>>>> interface.
>>>>
>>>> My problem is not in getting the right pixel coordinates for the 
>>>> BBOX, but
>>>> it is in how to get the BBOX associated with a particular Filter 
>>>> without
>>>> actually having to retrieve the whole dataset.
>>>>
>>>> Best regards,
>>>> Bart
>>>>
>>>>
>>>>> Hi Bart,
>>>>>
>>>>> I don't have the WFS spec in front of me so I can't say for sure, 
>>>>> but I
>>>>> think
>>>>> that the bounding box in boundedBy is the minimum bounding box of the
>>>>> feature
>>>>> collection. If you don't trust it, you could calculate the bbox by
>>>>> yourself.
>>>>>
>>>>> The boundedBy bbox should reflect the data returned, so maxFeatures
>>>>> wouldn't
>>>>> help. However, I understood from your question that the desired area
>>>>
>>>>
>>>> would
>>>>
>>>>> correspond to an area on the screen that the user zooms into. You 
>>>>> should
>>>>> find a
>>>>> way to translate the screen coordinates to the coordinates of the data
>>>>
>>>>
>>>> and
>>>>
>>>>> then
>>>>> request the data that fits into the bbox.
>>>>>
>>>>> Cheers,
>>>>> Alex
>>>>>
>>>>>
>>>>> Quoting bartvde at xs4all.nl:
>>>>>
>>>>>
>>>>>> Hi list,
>>>>>>
>>>>>> I was thinking how one would implement a "zoom to selected" 
>>>>>> function in
>>>>>> a
>>>>>> OGC-based WebGIS. Assume one has the selection drawn in the map 
>>>>>> through
>>>>>> SLD, and the selection is associated with a Filter.
>>>>>>
>>>>>> Now what would be the necessary for the "zoom to selected" 
>>>>>> function to
>>>>>> work, is to get the extent/bbox associated with this Filter. One 
>>>>>> could
>>>>>> use
>>>>>> a WFS GetFeature request for this in my opinion (after performing a
>>>>>> DescribeLayer on the SLD WMS).
>>>>>>
>>>>>> I have several questions about this approach:
>>>>>>
>>>>>> 1)
>>>>>> the result of a WFS GetFeature request has a <gml:boundedBy> element,
>>>>>> but
>>>>>> even in the examples of the WFS 1.0 spec this is mostly a rough
>>>>>> approximation of the boundingbox associated with the features. 
>>>>>> Does the
>>>>>> spec say anything about the correctness/precision of the boundedBy 
>>>>>> data?
>>>>>>
>>>>>> 2)
>>>>>> performing a GetFeature request with the Filter would get me the real
>>>>>> data
>>>>>> as well, which I am not interested in, I am merely interested in the
>>>>>> extent of the data. I thought about using a maxfeatures=1 (or even
>>>>>> maxfeatures=0), but what should a WFS write in its boundedBy data 
>>>>>> when
>>>>>> not
>>>>>> all features are requested using the maxfeatures parameter:
>>>>>> a) the boundedBy bounding box of all the data associated with the 
>>>>>> filter
>>>>>> b) the boundedBy bounding box of the only row returned because of
>>>>>> maxfeatures=1.
>>>>>>
>>>>>> Any insight on this highly appreciated.
>>>>>>
>>>>>> Best regards,
>>>>>> Bart
>>>>>> _______________________________________________
>>>>>> wfs-dev mailing list
>>>>>> wfs-dev at opengis.org
>>>>>> http://mail.opengis.org/mailman/listinfo/wfs-dev
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> wfs-dev mailing list
>>> wfs-dev at opengis.org
>>> http://mail.opengis.org/mailman/listinfo/wfs-dev
>>>
>>
> 
> 
> 

-- 
Panagiotis (Peter) A. Vretanos          CubeWerx Inc.
Big Kahuna (Senior Database Developer)  http://www.cubewerx.com
Tel. 416-701-1985  Fax. 416-701-9870    pvretano at cubewerx.com

"To you it's a mess; to me it's a wilderness of free association!"


More information about the wfs-dev mailing list