[Geoserver-devel] [jira] (GEOS-4936) Compute Lat/Lon Bounding Box gives incorrect result

Nathan Wiese created GEOS-4936:
----------------------------------

             Summary: Compute Lat/Lon Bounding Box gives incorrect result
                 Key: GEOS-4936
                 URL: https://jira.codehaus.org/browse/GEOS-4936
             Project: GeoServer
          Issue Type: Bug
          Components: PostGIS
    Affects Versions: 2.1.3
         Environment: Windows 7 (64 bit), PostgreSQL 9.0.4, PostGIS 1.5.3
            Reporter: Nathan Wiese
            Assignee: Andrea Aime

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 [org.geotools.jdbc] - 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira