[postgis-users] shp2pgsql multipolygon weirdness

Andre Hauptfleisch ahaupt at gmail.com
Wed Jun 4 06:51:27 PDT 2008


Good day,

I'm new to PostGIS and need to get a shapefile into the pgsql db.

I stumbled onto the shp2pgsql tool, but when I run it on my shapefile, I get
a string of weird looking hex digits. Perhaps I don't quite understand what
the tool does, but I would expect it to output something 'sensible' such as:


INSERT INTO "geotable"
("zid","name","color","icon_size","extrude","tesellate",the_geom)
VALUES ('1','Untitled Polygon',NULL,NULL,NULL,NULL,'POLYGON(x y, x y,.....)');


Here is my output:

Shapefile type: Polygon

Postgis type: MULTIPOLYGON[2]
BEGIN;
CREATE TABLE "geotable" (gid serial PRIMARY KEY,
"zid" int4,
"name" varchar(30),
"color" varchar(10),
"icon_size" varchar(5),
"extrude" varchar(1),
"tesellate" varchar(1));
SELECT AddGeometryColumn('','geotable','the_geom','-1','MULTIPOLYGON',2);
INSERT INTO "geotable"
("zid","name","color","icon_size","extrude","tesellate",the_geom) VALUES
('1','Untitled
Polygon',NULL,NULL,NULL,NULL,'0106000000010000000103000000010000000A0000000000003411F63B400000C88F31073AC00000002B87F63B400000E81DA7083AC00000F053E3F53B400000385EBA093AC00000F085C9F43B40000008A3920A3AC0000060B3EAF33B40000040355E0A3AC0000060DC46F33B4000006007CE093AC0000060DC46F33B400000A0ABAD083AC00000807CD0F33B40000088F4DB073AC0000060A1D6F43B400000605452073AC00000003411F63B400000C88F31073AC0');
...

Any guidance would be much appreciated.

-- 
Andre Hauptfleisch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080604/443767d1/attachment.html>


More information about the postgis-users mailing list