I just got around to checking out transaction listeners, and have a couple 
questions.  First, how does one register a listener with the Spring context?  
Also, how does one update a layer's bounding box from within a listener?  I 
found this page: 
http://geoserver.org/display/GEOS/GSIP+14+-+WFS+Transaction+handling+framework 
and have been looking through the wfs code, but I haven't been able to find any 
more documentation or examples.

Thanks,
Ryan

On May 23, 2011, at 3:59 PM, Ryan Zoerb wrote:

> Thanks for the responses Gabriel and Andrea.  I need to get the bounding box 
> of the actual feature (for zooming to the feature in OpenLayers), so I'll 
> give the transaction listener a try.
> 
> -Ryan
> 
> On May 23, 2011, at 11:11 AM, Andrea Aime wrote:
> 
>> On Mon, May 23, 2011 at 5:50 PM, Gabriel Roldán <[email protected]> wrote:
>> I may be wrong, but my impression (biased by the meaning of the WMS
>> layer bounds in the spec) is that the bounds you declare for the layer
>> are purely informative and intend to declare what the area of validity
>> for the Layer/FeatureType is. In any case it has to be accurate, so a
>> good practice would be to set the layer bounds to the intended area of
>> interest for the layer to start with.
>> So even if a layer has no features, but represents a state wide set of
>> something, it'd be good to set the metadata layer bounds to the whole
>> state bounds, for example.
>> The GeoServer "calculate bounds" button is merely an utility to simplify
>> the common case. But IMHO you should set the bounds to the widest
>> possible area the layer is meant to.
>> 
>> I agree with Gabriel, bounds are just an indication.
>> 
>> That said, if you really want to do it anyways, it's possible to roll a 
>> transaction
>> listener that will try to update the bounds and save them on disk to make
>> the change persistent.
>> I would suggest to do it incrementally, that is, just expand the bounds if
>> you see the inserted/updated feature bounds are outside of the current
>> layer bounds, for speed reasons.
>> If you want the bounds to also contract when you do a delete you'll
>> have to kick a full computation against the layer contents, depending
>> on how large your data set it, that might be expensive if not intolerable
>> (computing bounds on Oracle with tens of millions of rows might
>> take minutes for example)
>> 
>> Cheers
>> Andrea
>>  
>> 
>> -- 
>> -------------------------------------------------------
>> Ing. Andrea Aime
>> GeoSolutions S.A.S.
>> Tech lead
>> 
>> Via Poggio alle Viti 1187
>> 55054  Massarosa (LU)
>> Italy
>> 
>> phone: +39 0584 962313
>> fax:      +39 0584 962313
>> 
>> http://www.geo-solutions.it
>> http://geo-solutions.blogspot.com/
>> http://www.youtube.com/user/GeoSolutionsIT
>> http://www.linkedin.com/in/andreaaime
>> http://twitter.com/geowolf
>> 
>> -------------------------------------------------------
> 

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to