[postgis-users] WKB Geometry Column

Sean M. Montague smontague at ATSDenver.com
Thu Mar 17 11:10:39 PST 2005


I'm a bit apprehensive about continuing to ask questions about WKB, but
there are no examples of WKB representations in the manual and my
internet search for examples turns up nothing.  Below is the simplified
SQL of a table I'm creating.  I'm trying to figure out how to create
this same table with WKB.  The only thing the manual shows is
GeomFromWKB(bytea WKB, SRID), but nothing else.

CREATE TABLE table1;
SELECT
AddGeometryColumn('postgis','table1','the_geom','32767','MULTIPOLYGON',2
);
BEGIN;
INSERT INTO table1 (the_geom) VALUES (GeometryFromText('MULTIPOLYGON
(((656595 -698708,656238 -698465,655749 -698441,656595
-698708)))',32767));
END;

I figure my AddGeometryColumn syntax for WKB is wrong, but not sure.
Below is one of my attempts, but I get "ERROR:  WKB_in parser - should
be even number of characters!"  I've tried other combinations to no
avail.  If anyone can point to some examples of inserting WKB I'd
appreciate it.  Thanks. 

GeomFromWKB(6 656595 -698708 656238 -698465 655749 -698441 656595
-698708 32767)



More information about the postgis-users mailing list