Unable to generate bounds against latest PostGIS
------------------------------------------------
Key: GEOS-2839
URL: http://jira.codehaus.org/browse/GEOS-2839
Project: GeoServer
Issue Type: Bug
Affects Versions: 1.7.3
Environment: Reported against PostGIS 1.4.0-svn (recently pushed out of alpha) against GeoServer 1.7.3
Reporter: Jody Garnett
Assignee: Andrea Aime
Priority: Minor
This may be an issue with either GeoTools or with PostGIS; it reflects the inability of the envelope function to deal with a new postgis datatype; and probably can be fixed by:
- arranging some kind of cast on the postgis side
- asking GeoTools to produce different SQL
To reproduce:
# Grab PostGIS 1.4.x (or use the ccip.lisasoft.com:5126
# Add a new FeatureType
# Hit the Generate button
Produces the following error:
{panel}
org.geotools.data.DataSourceException: Could not count Request All Features
at org.geotools.data.postgis.PostgisFeatureStore.bounds(PostgisFeatureStore.java:764)
at org.geotools.data.postgis.PostgisFeatureStore.getBounds(PostgisFeatureStore.java:676)
at org.geotools.data.postgis.PostgisFeatureStore.getBounds(PostgisFeatureStore.java:653)
at org.geoserver.feature.FeatureSourceUtils.getBoundingBoxEnvelope(FeatureSourceUtils.java:44)
at org.vfny.geoserver.util.DataStoreUtils.getBoundingBoxEnvelope(DataStoreUtils.java:318)
at org.vfny.geoserver.action.data.TypesEditorAction.executeBBox(TypesEditorAction.java:236)
....
Caused by: org.postgresql.util.PSQLException: ERROR: function envelope(box3d_extent) does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:340)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:239)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.geotools.data.postgis.PostgisFeatureStore.getEnvelope(PostgisFeatureStore.java:814)
at org.geotools.data.postgis.PostgisFeatureStore.bounds(PostgisFeatureStore.java:737)
{panel}
--
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