PostGIS geography datatype - rendering problems
-----------------------------------------------
Key: GEOS-4400
URL: http://jira.codehaus.org/browse/GEOS-4400
Project: GeoServer
Issue Type: Bug
Components: PostGIS
Affects Versions: 2.1-RC2, 2.1-RC1, 2.2.x
Environment: Ubuntu 10.10 / PostGIS 1.5
Reporter: Simon Ruffle
Assignee: Andrea Aime
Attachments: sampledata.png
We're having a lot of trouble trying to display a layer based on a PostGIS table column of type "geography". I'm fairly sure it can't be the data as things work fine after converting it to type "geometry". I've tried this under 2.1-RC1, 2.1-RC2 and a snapshot of 2.2 (taken 2011-02-24).
I think this seems to be related to computation of the bounding-box for the dataset. To reproduce, perform the following steps.
1. Using a current PostGIS database, add the following table:
CREATE TABLE test(location geography('geometry',4326));
2. Now add some datapoints:
INSERT INTO test(location) VALUES('POINT( 50 50)');
INSERT INTO test(location) VALUES('POINT(-50 50)');
INSERT INTO test(location) VALUES('POINT( 50 -50)');
INSERT INTO test(location) VALUES('POINT(-50 -50)');
3. Now add the database as a data store (type 'PostGIS')
4. Create a new layer using this new table, clicking 'Compute from data' and 'Compute from native bounds' for the bounding boxes
(IMPORTANT: This step has failed with real-world data, and the bounding box has been incorrectly computed).
5. Now use the layer previewer to look at the new layer using the OpenLayers renderer.
6. Zoom out - the following error is produced:
code="internalError" Rendering process failed
java.io.IOException
null
ERROR: Coordinate values are out of range [-180 -90, 180 90] for GEOGRAPHY type
7. Additionally, while dragging and zooming the map, there sometimes appear to be erratic problems with the rendering, with points appearing / disappearing or moving around. See the attached screenshot - the mouse was hovering over the top-left point and gave a location of around -55, 52 which is clearly incorrect. At this zoom level only one point should be visible.
--
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