Compute Lat/Lon Bounding Box gives incorrect result

Description

Hallo GeoServer Team,

I created the following sample data in PostgreSQL/PostGIS:

CREATE TABLE swiss_city (id int, name varchar, PRIMARY KEY(id));
SELECT AddGeometryColumn('swiss_city', 'the_geom', 21781, 'POINT', 2);
INSERT INTO swiss_city VALUES (1, 'Bern', GeomFromText('POINT(600000 200000)', 21781));

When publishing the table as layer in GeoServer, I clicked on "Compute from data" for the
Native Bounding Box and got the following result:

Native Bounding Box:
599'999 199'999 600,001 200,001

Next, I clicked on "Compute from native bounds" which gave me an incorrect result for the Lat/Lon Bounding Box:

Lat/Lon Bounding Box:
-82.48882871795712 -0.1731109797267328 -82.48880334534114 -0.173085436212199

In the log file, this warning/error appears:

2012-01-26 15:31:00,299 WARN - Failed to use ST_Estimated_Extent, falling back on envelope aggregation
org.postgresql.util.PSQLException: FEHLER: LWGEOM_estimated_extent: couldn't locate table within current schema
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
...

The same procedure in GeoServer 2.1.2 produces the correct result:

Lat/Lon Bounding Box:
7.439 46.951 7.439 46.951

Best wishes,
Nathan

Environment

None

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

None

Affects versions

Components

Priority

Medium
Configure