Capabilities requests compute bbox each time
--------------------------------------------
Key: GEOS-955
URL: http://jira.codehaus.org/browse/GEOS-955
Project: GeoServer
Issue Type: Bug
Reporter: Brent Owens
Assigned To: Brent Owens
Fix For: 1.5.0-RC2
The capabilities requests currently computes the bounding box for all the feature types each time it is requested. Have it grab the cached bbox instead if it exists.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Le Lundi 5 Mars 2007 17:49, Brent Owens (JIRA) a écrit :
Capabilities requests compute bbox each time
--------------------------------------------
Key: GEOS-955
URL: http://jira.codehaus.org/browse/GEOS-955
Project: GeoServer
Issue Type: Bug
Reporter: Brent Owens
Assigned To: Brent Owens
Fix For: 1.5.0-RC2
The capabilities requests currently computes the bounding box for all the
feature types each time it is requested. Have it grab the cached bbox
instead if it exists.
Hi all,
One of my collegue partly solved the problem at the geotools level (so, no
caching at geoserver level), the result is just great!
Hope it will help (2.3.x/plugin/postgis/src/org/geotools/data/postgis
branch of geotools) :
$> diff patched-PostgisFeatureStore.java PostgisFeatureStore.java
972,979c972,973
< //sql.append("SELECT AsText(force_2d(Envelope(Extent(\"" + geomName
+ "\")))) ");
< //sqlBuilder.sqlFrom(sql, typeName);
< //sqlBuilder.sqlWhere(sql, filter);
< //LOGGER.fine("SQL: " + sql);
< // Francois Dubreil, 2007/03/07 : use of estimated_extent, available since
postigis 1.0.0
< // (quite close to the correct result and very much faster than Extent -
< // especially for large datasets ...)
< sql.append("SELECT
AsText(force_2d(Envelope(estimated_extent(\'"+typeName+"\',\'"+geomName +
"\')))) ");
---
sql.append("SELECT AsText(force_2d(Envelope(Extent(\"" + geomName +
"\")))) ");
sqlBuilder.sqlFrom(sql, typeName);
==========
didier
Richard didier ha scritto:
Le Lundi 5 Mars 2007 17:49, Brent Owens (JIRA) a écrit :
Capabilities requests compute bbox each time
--------------------------------------------
Key: GEOS-955
URL: http://jira.codehaus.org/browse/GEOS-955
Project: GeoServer
Issue Type: Bug
Reporter: Brent Owens
Assigned To: Brent Owens
Fix For: 1.5.0-RC2
The capabilities requests currently computes the bounding box for all the
feature types each time it is requested. Have it grab the cached bbox
instead if it exists.
Hi all,
One of my collegue partly solved the problem at the geotools level (so, no caching at geoserver level), the result is just great!
Hope it will help (2.3.x/plugin/postgis/src/org/geotools/data/postgis
branch of geotools) :
$> diff patched-PostgisFeatureStore.java PostgisFeatureStore.java
972,979c972,973
< //sql.append("SELECT AsText(force_2d(Envelope(Extent(\"" + geomName + "\")))) ");
< //sqlBuilder.sqlFrom(sql, typeName);
< //sqlBuilder.sqlWhere(sql, filter);
< //LOGGER.fine("SQL: " + sql);
< // Francois Dubreil, 2007/03/07 : use of estimated_extent, available since postigis 1.0.0
< // (quite close to the correct result and very much faster than Extent -
< // especially for large datasets ...)
< sql.append("SELECT AsText(force_2d(Envelope(estimated_extent(\'"+typeName+"\',\'"+geomName + "\')))) ");
---
sql.append("SELECT AsText(force_2d(Envelope(Extent(\"" + geomName +
"\")))) ");
sqlBuilder.sqlFrom(sql, typeName);
==========
Yeah, we knew about estimated_extent, but its use is controversial because the returned bbox is not correct, just an estimate, and depends on you vacuuming the db every now and then.
I opened a geotools issue to have a new datastore parameter that allows enabling its usage (so that people that are ok with estimated boxes can use that one).
Cheers
Andrea