[Geoserver-users] Having problems with 3D geometries (1.6.4)

Hello,

I'm not sure how to set up 3D geometries (latitude, longitude, and height above ellipsoid in meters) with GeoServer 1.6.4 and PostGIS 1.3.3. First, what CRS should I choose? EPSG:4979, a 3D geographic CRS based on 4326 seemed like a likely candidate, but GeoServer wouldn't read the WKB from my database when the geometry columns were declared with the CRS. I got this stacktrack trying to read, for example, 'POINT(1 1 1)':

java.lang.IllegalArgumentException: This type of sequence is always 2 dimensional
        at org.geotools.geometry.jts.LiteCoordinateSequence.<init>(LiteCoordinateSequence.java:100)
        at org.geotools.geometry.jts.LiteCoordinateSequenceFactory.create(LiteCoordinateSequenceFactory.java:49)

I also noticed that there is no definition for EPSG:4979 in PostGIS's spatial_ref_sys.sql, and I can't find the correct row for spatial_ref_sys for this CRS anywhere. I could get the WKT representation from GeoTools, but what about the proj4 definition?

Sorry if I'm missing something obvious!

--
Dustin Parker
Forward Slope, Inc.
Work: 619 299 4400
Cell: 619 277 2591
0tDaX0iWmunqkiR2WKCNG
vHUT0iWqSJHZYoI0a8d1p
E9Ilprp6QZrogbPZYoI0a
8aA0ekDQ6eyxQRo146A==

Dustin Parker ha scritto:

Hello,

I'm not sure how to set up 3D geometries (latitude, longitude, and height above ellipsoid in meters) with GeoServer 1.6.4 and PostGIS 1.3.3. First, what CRS should I choose? EPSG:4979, a 3D geographic CRS based on 4326 seemed like a likely candidate, but GeoServer wouldn't read the WKB from my database when the geometry columns were declared with the CRS. I got this stacktrack trying to read, for example, 'POINT(1 1 1)':

java.lang.IllegalArgumentException: This type of sequence is always 2 dimensional
        at org.geotools.geometry.jts.LiteCoordinateSequence.<init>(LiteCoordinateSequence.java:100)
        at org.geotools.geometry.jts.LiteCoordinateSequenceFactory.create(LiteCoordinateSequenceFactory.java:49)

I also noticed that there is no definition for EPSG:4979 in PostGIS's spatial_ref_sys.sql, and I can't find the correct row for spatial_ref_sys for this CRS anywhere. I could get the WKT representation from GeoTools, but what about the proj4 definition?

Sorry if I'm missing something obvious!

Nope, you're not missing anything obvious, at the moment we simply
do not support 3d data at all, it was never tested.
The error you're getting is the renderer pretending 2d data
when the data source is providing 3d coordinates.
We have work ongoing that will make us support 3d data on Oracle,
from there we should be able to grow support for native 3d data
in time.
I'm actually surprised you managed to register your feature type
in GeoServer at all, fixing the renderer only should not be
that big of an issue, if you want and try to create patches
I can provide you with some hints on where to look in the code.

Cheers
Andrea