[postgis-users] bulk conversion from shapefiles
Pierrick Brihaye
pierrick.brihaye at culture.gouv.fr
Fri Sep 17 00:55:24 PDT 2004
Hi,
Paul Ramsey a écrit :
> If your 900 shape files are all destined for the same table, you will
> want to use the following workflow:
> 1 - manually shp2pgsql in -c (create) mode
> 2 - delete all rows from your newly created table
> 3 - run your script, invoking shp2pgsql in -a (append) mode
Mmmh... the "-c" mode will create something like this :
SELECT AddGeometryColumn('','test2','the_geom','27582','POINT',2);
which, in turn, will create constraints like this :
CONSTRAINT "$1" CHECK srid(the_geom) = 27582,
CONSTRAINT "$2" CHECK geometrytype(the_geom) = 'POINT'::text OR the_geom
IS NULL
Am I wrong ?
This means that the first file will enforce its own constraints (srid
and geometry type) over the following files.
In some cases, it may be suitable, but is it a general case ?
Cheers,
--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire
DRAC Bretagne
mailto:pierrick.brihaye at culture.gouv.fr
+33 (0)2 99 29 67 78
More information about the postgis-users
mailing list