[Geoserver-users] Geoserver fails on using PostGIS Extent function

HI,

I am trying to use Geoserver - PostGIS, I am trying to create a new FeatureType as “polygon”, Geoserver throws throws the following error, while trying to get the bounding box info on the FeatureType Editor. I have got a response from PostGIS users mailing list that the PostGIS renamed the extent function to ST_EXTENT (?), is it a problem with Geoserver? if so, can the Geoserver (geotools) change the use of ST_EXTENT function?

GeoServer - ExceptionThe following exception was thrown:

  • class org.geotools.data.DataSourceException: Could not count Request All Features
  • class org.postgresql.util.PSQLException: ERROR: function extent(geometry) does not exist

Details:

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:234)
	at org.vfny.geoserver.action.data.TypesEditorAction.execute(TypesEditorAction.java:136)
	at org.vfny.geoserver.action.ConfigAction.execute(ConfigAction.java:101)

	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)

following is the response from PostGIS users forum:

>     * class org.geotools.data.DataSourceException: Could not count

>       Request All Features
>     * class org.postgresql.util.PSQLException: ERROR: function
>       extent(geometry) does not exist

Does function extent() still exists in newer version of PostGIS or was it removed and replaced by ST_extent()???

In the latter case, it's a Geotools problem, because it appears to be using the old syntax.

Thanks!

Giri

Hi,

interesting, i was not aware the function name changed. If so then yes, definitely a geotools problem. Do you know which version in particular the "extent" function was cut out?

Giri wrote:

HI,

I am trying to use Geoserver - PostGIS, I am trying to create a new FeatureType as "polygon", Geoserver throws throws the following error, while trying to get the bounding box info on the FeatureType Editor. I have got a response from PostGIS users mailing list that the PostGIS renamed the extent function to ST_EXTENT (?), is it a problem with Geoserver? if so, can the Geoserver (geotools) change the use of ST_EXTENT function?

  GeoServer - Exception

The following exception was thrown:

    * class org.geotools.data.DataSourceException: Could not count
      Request All Features
    * class org.postgresql.util.PSQLException: ERROR: function
      extent(geometry) does not exist

Details:

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:234)
  at org.vfny.geoserver.action.data.TypesEditorAction.execute(TypesEditorAction.java:136)
  at org.vfny.geoserver.action.ConfigAction.execute(ConfigAction.java:101)

  at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)

following is the response from PostGIS users forum:

    * class org.geotools.data.DataSourceException: Could not count

      Request All Features
    * class org.postgresql.util.PSQLException: ERROR: function
      extent(geometry) does not exist

Does function extent() still exists in newer version of PostGIS or was it removed and replaced by ST_extent()???

In the latter case, it's a Geotools problem, because it appears to be using the old syntax.

Thanks!

Giri

------------------------------------------------------------------------

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Giri wrote:

HI,

I am trying to use Geoserver - PostGIS, I am trying to create a new FeatureType as "polygon", Geoserver throws throws the following error, while trying to get the bounding box info on the FeatureType Editor. I have got a response from PostGIS users mailing list that the PostGIS renamed the extent function to ST_EXTENT (?), is it a problem with Geoserver? if so, can the Geoserver (geotools) change the use of ST_EXTENT function?

Please open a bug report on jira.codehaus.org, and detail your findings
in the UI. In particular, report which version of postgis you are using,
and since which version of postgis the old extent syntax is no more available.
The main issue I see with this change is that switching to st_extent
will break older versions of postgis, so I need to know how old they
are, if I can just forget about them and label them as "too old
to care about" or if I have to put in place a version detection system
that uses the right function name depending on the postgis version
at hand.

Cheers
Andrea

Giri ha scritto:

Does function extent() still exists in newer version of PostGIS or was it removed and replaced by ST_extent()???

In the latter case, it's a Geotools problem, because it appears to be using the old syntax.

I asked the PostGIS developers, the response was that "extent" has not been removed soo... are you really sure you loaded the PostGIS functions
and extra tables into your PostgreSQL database?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

HI Andrea,
Sorry for this delayed response, yes, I have loaded the PostGIS functions and extra tables in my PostgreSQL DB:

here is the error that I am getting:

processdb=# select extent(the_geom) from polygon;
ERROR: function extent(geometry) does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts.

thanks!

Giri

On Sun, Mar 8, 2009 at 1:25 PM, Andrea Aime <aaime@anonymised.com> wrote:

Giri ha scritto:

Does function extent() still exists in newer version of PostGIS or was it removed and replaced by ST_extent()???

In the latter case, it’s a Geotools problem, because it appears to be using the old syntax.

I asked the PostGIS developers, the response was that “extent” has not been removed soo… are you really sure you loaded the PostGIS functions
and extra tables into your PostgreSQL database?

Cheers
Andrea


Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Giri ha scritto:

HI Andrea,
Sorry for this delayed response, yes, I have loaded the PostGIS functions and extra tables in my PostgreSQL DB:

here is the error that I am getting:
------------
processdb=# select extent(the_geom) from polygon;
ERROR: function extent(geometry) does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts.
-----------

What does "select postgis_version()" returns? If you don't have
that function neither then you have postgres, but not postgis

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.