[postgis-users] Problem with Z coordinate using postgis-jts

Fernando González fergonco at gmail.com
Wed Mar 5 02:13:26 PST 2008


Hi,

I'm storing and reading some geometries from a postgis table. The table is
2D. I'm using a jar I have compiled with the "make postgis_jts" command. It
works very well except for one thing. I write 2D JTS geometries, this is
with the z component equal to NaN, into a postgis table but when I read them
the Z coordinate is no longer equal to NaN but equal to 0. is this a
feature? a bug?

I'm using this code to read the geometry. To store them I use GeomFromText
function and I specify only X-Y components for each coordinate (I'm not
specifying the Z coordinate):

JtsBinaryParser parser = new JtsBinaryParser();
String bytes = rs.getString(fieldId);
Geometry geom = parser.parse(bytes);

is it clear? I can write some code to reproduce the problem if anyone is
interested.

Thanks in advance,
Fernando
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080305/def59577/attachment.html>


More information about the postgis-users mailing list