[postgis-users] bulk conversion from shapefiles

Paul Ramsey pramsey at refractions.net
Thu Sep 16 07:35:25 PDT 2004


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

On Thursday, September 16, 2004, at 01:26 AM, Michael Mallete wrote:

> ah. got it. thank you very much gentlemen. :)
>
> -Myk
>
>
>> for shapefile in `find . -name '*.shp'`; do
>> 	shp2pgsql $shapefile .....
>> done
>>
>> --strk;
>
>
>> You could also do a one-liner:
>>
>> find . -name '*.shp' -exec shp2pgsql {} \;
>
>
> 	
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
> _______________________________________________
> 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