[postgis-users] bulk conversion from shapefiles
Paul Ramsey
pramsey at refractions.net
Fri Sep 17 07:19:23 PDT 2004
These directions are only suitable for loading N shape files into 1
table, and the assumption is that all the shape files have identical
properties (SRS and geometry type).
On Friday, September 17, 2004, at 12:55 AM, Pierrick Brihaye wrote:
> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
Paul Ramsey
Refractions Research
Email: pramsey at refractions.net
Phone: (250) 885-0632
More information about the postgis-users
mailing list