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
> 
> -------------------------------------------------------

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to