[postgis-users] Problem with PostGIS 1.0.0 RC1
strk at refractions.net
strk at refractions.net
Sat Jan 22 00:30:03 PST 2005
On Fri, Jan 21, 2005 at 09:28:42AM -0000, Mark Cave-Ayland wrote:
> 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))
I don't get the same result with 0.9.1:
select GeomFromWKB('010300000001000000050000003A6484B530A012418C2BD6F7C48413A6484B520A112418C2BD617CF7C48413A6484B520A112418C2BD617ED7C48413A64840A012418C2BD617ED7C48413A6484B530A012418C2BD617CF7C4841');
SRID=0;POLYGON((305164.177262846 -2.88344156812136e-125,-25921077908.5735 -2.88344156503304e-125,-25921077908.5735 -2.88344128333369e-125,-1.26361993948672e+107 -1.66049517692282e-287,-1.26361993948607e+107 9.36393566112174e-97))
Which is, btw, an invalid geometry.
>
> 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?
I've tried calling asBinary(your_wkt_polygon) from within 0.9.1 and
I get a WKB which parsed by LWGEOM returns the same geometry as the
input one (your_wkt_polygon).
Question are:
1) how did you get 0.9.1 to parse that WKB ? (I have a different
result).
2) were had that WKB taken from ?
--strk;
>
>
> 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
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
--
For standing up against patentability of software,
Thank You, Poland!
Read the intervention: http://kwiki.ffii.org/ConsPolon041221En
Send your thanks: thankyoupoland.info
Read/do more: http://www.noepatents.org/
More information about the postgis-users
mailing list