[postgis-users] shp2pgsql bug?
Zhiqiang Zhang
zzhang01 at hotmail.com
Fri Apr 18 01:36:38 PDT 2003
I am trying to load a shapefile into postgis using shp2pgsql tool:
shp2pgsql myfile roads sdb > roads.sql
The roads.sql was generated but when I try to run
psql -d sdb -f roads.sql I got the following error:
ERROR: Bad int8 external representation "".
Anybody knows what's wrong?
The roads.sql looks like:
create table roads (gid int4 , TLID int8, FNODE int4, TNODE int4, LENGTH
float8, FEDIRP varchar, FENAME varchar, FETYPE varchar, FEDIRS varchar, CFCC
varchar, FRADDL int8, TOADDL int8, FRADDR int8, TOADDR int8, ZIPL varchar,
ZIPR varchar, CENSUS1 varchar, CENSUS2 varchar, CFCC1 varchar, CFCC2
varchar, SOURCE varchar);
select AddGeometryColumn('sdb','roads','the_geom','-1','MULTILINESTRING',2);
begin;
insert into roads
values('0','102598387','52476','52477','0.16860',NULL,NULL,NULL,NULL,'A41','','','','',NULL,NULL,'0','0','A','A4','A',GeometryFromText('MULTILINESTRING
((-121.271077 37.168284 ,-121.268691 37.169473 ,-121.268443 37.169496))',-1)
);
It fails at the first insert.
Any help will be greatly appreciated.
MZ
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
More information about the postgis-users
mailing list