[postgis-users] convert and upload

Guido Staub guidostaub at lycos.de
Tue Oct 15 06:58:10 PDT 2002


  Hi all,
I' ve got two questions.
First one: I've used the statement: /shp2pgsql shapefile table db | psql 
-d db/ on a file. Everything went well but then I get the message: 
/fread(494) failed on DBF file./ The insert- statements continued and 
then a new message: /ERROR:  Unterminated quoted string/ and the 
transaction stopped.
Any ideas?

Second: I' ve converted some Tiger line data into shapefiles using FME 
as 14-day free evaluation. But when I now try shp2pgsql the sql-files 
are looking strange:
/create table ArealLnadmarks (gid int4 , MODULE varchar, FILE varchar, 
STATE int4, COUNTY int4, CENID varchar, POLYID int4, LAND int4);
select 
AddGeometryColumn('usa','ArealLnadmarks','the_geom','-1','GEOMETRY',3);
NULL,'TGR15003','15003','15','3','C2090','3610','2'/.
Such files can't be written correct, right?

I' ve also tried to use the -D flag with a different shapefile called 
ZipCodes.shp but the result wasn't really better:
/create table zc (gid int4 , MODULE varchar, TLID int4, RTSQ int4, 
FRADDL varchar, TOADDL varchar, FRADDR varchar, TOADDR varchar, FRIADDL 
int4, TOIADDL int4, FRIADDR int4, TOIADDR int4, ZIPL int4, ZIPR int4);
select AddGeometryColumn('usa','zc','the_geom','-1','GEOMETRY',3);
COPY "zc" from stdin;
\N    TGR15003    203324639    1    \N    \N    87-927    87-931        
    1    1        96792\./

So, is there something wrong with my shapefiles or the convertion-tool 
I've used to write shp-files?
Thanks in advance.
Guido Staub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20021015/85088a1a/attachment.html>


More information about the postgis-users mailing list