[postgis-users] Problem with PostGIS 1.0.0 RC1

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Fri Jan 21 01:28:42 PST 2005


Hi Danny,
 
Hmmm, looks like something isn't quite right somewhere.....
 
 
dcmms=# select postgis_version();
            postgis_version
---------------------------------------
 1.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
(1 row)
 
dcmms=# select
GeomFromWKB('010300000001000000050000003A6484B530A012418C2BD61
7C48413A6484B520A112418C2BD617CF7C48413A6484B520A112418C2BD617ED7C48413A6484
B
A012418C2BD617ED7C48413A6484B530A012418C2BD617CF7C4841');
ERROR:  parse error - invalid geometry
dcmms=# select
GeomFromEWKB('010300000001000000050000003A6484B530A012418C2BD6
F7C48413A6484B520A112418C2BD617CF7C48413A6484B520A112418C2BD617ED7C48413A648
4
0A012418C2BD617ED7C48413A6484B530A012418C2BD617CF7C4841');
ERROR:  parse error - invalid geometry

Going back to 0.9.1, I find that the AsText representation of your WKB
geometry is:
 
POLYGON((305164.177262846 3209630.18622345,30522
77262846 3209630.18622345,305224.177262846 3209690.18622345,305164.177262846
9690.18622345,305164.177262846 3209630.18622345))
 
However, if I then go back to 1.0 and insert this as a LWGEOM:
 
dcmms=# select GeomFromText('POLYGON((305164.177262846
3209630.18622345,30522
77262846 3209630.18622345,305224.177262846 3209690.18622345,305164.177262846
9690.18622345,305164.177262846 3209630.18622345))'); 

        geomfromtext
 
----------------------------------------------------------------------------
----
----------------------------------------------------------------------------
----
----------------------------
 
01030000000100000005000000396484B530A01241862BD617CF7C4841396484B520A1124186
2BD
617CF7C4841396484B520A11241862BD617ED7C4841396484B530A01241862BD617ED7C48413
9648
4B530A01241862BD617CF7C4841
(1 row)
 
dcmms=#
 
....which is different from the original WKB you gave at the top(!). Strk,
can you confirm if this is a bug in 1.0-rc1?
 
 
Kind regards,
 
Mark.

------------------------
WebBased Ltd
South West Technology Centre
Tamar Science Park
Plymouth
PL6 8BT

T: +44 (0)1752 791021
F: +44 (0)1752 791023
W: http://www.webbased.co.uk <http://www.webbased.co.uk/> 
  

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
postgis at dannykent.com
Sent: 20 January 2005 18:04
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Problem with PostGIS 1.0.0 RC1


I have been using PostGIS 0.9.1 for awhile and developed some software for
our spatial intelligence applications. It works fine under 0.9, but when I
run the following query on 1.0.0 I get a "parse error - invalid geometry"

The query I am running is:
select asbinary(intersection(rddfpolygon.geom,
GeomFromWKB('010300000001000000050000003A6484B530A012418C2BD617CF7C48413A648
4B520A112418C2BD617CF7C48413A6484B520A112418C2BD617ED7C48413A6484B530A012418
C2BD617ED7C48413A6484B530A012418C2BD617CF7C4841')));

After a little more digging I figured the problem is in my WKB String. It
hasn't changed in my code at all. Is there something in the lwgeom I need to
be aware of?

Thanks!
~Danny Kent
University of Florida


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050121/a2cc7894/attachment.html>


More information about the postgis-users mailing list