Archive for the ‘Shapefiles’ Category
Convert Shapefiles to SQL
December 18, 2009
1 comment
The PostgreSQL /bin folder contains an executable capable to perform the conversion:
shp2pgsql shape_file_name myschema.dbtable_name > output_file.sql
psql -d database_name -f output_file.sql
One command conversion and upload to the PostgreSQL can be done all in one step using UNIX pipes:
shp2pgsql shape_file_name myschema.dbtable_name | psql -d database_name