[postgis-users] WKT differs in PostGIS and Geos
Paragon Corporation
lr at pcorp.us
Sat Jul 11 09:57:26 PDT 2009
Maxime,
ST_AsText does not produce the fidelity of the geometry. It truncates
floating points and I think where they truncate between GEOS and PostGIS is
different. GEOS and PostGIS do not share the same WKT writers.
My question is -- have you tried validating the WKB in GEOS. The WKB should
maintain fidelity so you should get the same IsValid answer in both those
cases.
Leo
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Maxime
van Noppen
Sent: Saturday, July 11, 2009 8:35 AM
To: PostGIS Users Discussion
Subject: [postgis-users] WKT differs in PostGIS and Geos
Hello,
I've got a strange issue. When I print a polygon from PostGIS (v1.3.6)
thanks to the AsText() function I get a different result than if I read the
WKB into a geos (v3.1.0 and v3.1.1) geometry object and than write it with
geos::io::WKTWriter.
When asking PostGIS to check the geometry's validity (via ST_IsValid) it
says it is valid whereas Geos says it isn't (via the
geos::geom::Geometry::isValid function).
I've attached a text file containing the WKB geometry as it appears in the
database, the WKT given by AsText and the WKT given by geos.
Thank you for your help !
--
Maxime
More information about the postgis-users
mailing list