[postgis-users] Problem with PostGIS 1.0.0 RC1
strk at refractions.net
strk at refractions.net
Sat Jan 22 05:25:00 PST 2005
On Sat, Jan 22, 2005 at 01:12:48PM -0000, Mark Cave-Ayland wrote:
> Hi strk,
>
> Sorry, it looks like the WKB got mangled when I was cutting and pasting into
> my email :( Here is the actual geometry pasted correctly from Danny's
> original email, and here are the results I am getting back:
>
>
> For PostGIS 0.9.1:
>
> [pg80b2 at ralph pg80b2]$ psql -d postgis091 -p 5433
> Welcome to psql 8.0.0rc1, the PostgreSQL interactive terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help with psql commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> postgis091=# select postgis_version();
> postgis_version
> ---------------------------------------
> 0.9 USE_GEOS=0 USE_PROJ=0 USE_STATS=1
> (1 row)
>
> postgis091=# select
> GeomFromWKB('010300000001000000050000003A6484B530A012418C2BD617CF7C48413A648
> 4B520A112418C2BD617CF7C48413A6484B520A112418C2BD617ED7C48413A6484B530A012418
> C2BD617ED7C48413A6484B530A012418C2BD617CF7C4841');
>
> geomfromwkb
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> -------------------------------------
> SRID=0;POLYGON((305164.177262846 3209630.18622345,305224.177262846
> 3209630.18622345,305224.177262846 3209690.18622345,305164.177262846
> 3209690.18622345,305164.177262846 3209630.18622345))
> (1 row)
>
> postgis091=#
>
>
> For PostGIS 1.0-rc1:
>
> [pg80b2 at ralph pg80b2]$ psql -d mca1 -p 5433
> Welcome to psql 8.0.0rc1, the PostgreSQL interactive terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help with psql commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> mca1=# select postgis_version();
> postgis_version
> ---------------------------------------
> 1.0 USE_GEOS=0 USE_PROJ=0 USE_STATS=1
> (1 row)
>
> mca1=# select
> GeomFromWKB('010300000001000000050000003A6484B530A012418C2BD617CF7C48413A648
> 4B520A112418C2BD617CF7C48413A6484B520A112418C2BD617ED7C48413A6484B530A012418
> C2BD617ED7C48413A6484B530A012418C2BD617CF7C4841');
> ERROR: parse error - invalid geometry
> mca1=#
Since postgis 1.0 GeomFromWKB wants a bytea.
If you want to input a geometry using an hex-ewkb you can use canonical
input, as in:
select '010300000001000000050000003A6484B530A012418C2BD617CF7C48413A6484B520A112418C2BD617CF7C48413A6484B520A112418C2BD617ED7C48413A6484B530A012418C2BD617ED7C48413A6484B530A012418C2BD617CF7C4841'::geometry;
Maybe we should revert GeomFromWKB back to accept 'GEOMETRY', as it was
before (cheating). What do you think ?
--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
>
>
--
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