Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I use Geoserver 2.1.3 and "POSTGIS="1.5.3" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.6" USE_STATS" on PostgreSQL 9.1

From time to time (well - today I can't get around it anymore) I get the following error when I try to "calc native bounds from data" while creating a new layer in Geoserver.

    java.lang.RuntimeException: java.io.IOException: Error occured calculating bounds at 
org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:485) at 
org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:179) at 
org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:370) at 
    ...
    Caused by: java.io.IOException: Error occured calculating bounds at 
    org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1137) at 
    org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:478) ... 
    94 more 
    Caused by: org.postgresql.util.PSQLException: ERROR: function st_envelope(box3d_extent) does not exist 
    No function matches the given name and argument types. You might need to add explicit type casts. Position: 30

The geometry column contains points, the SRID is defined in the *geometry_columns* tables. And it worked before... Anyways.. I will upgrade to PostGIS2 in a few weeks.. For now I need help on how to transform a PostGIS box3d_extent to a geometry.

With that information I want to dirty-quick-fix this with the creation of a local hack-function st_envelope(box3d_extent) which would then call st_envelope(geometry).

Thanks in advance for any answers helping with the cast- and/or base problem ;-)

Steve

share|improve this question

1 Answer 1

You are suffering from this bug I posted which is an issue with the upgrade script.

http://trac.osgeo.org/postgis/ticket/223

Just create a cast as noted in the ticket.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.