Skip to content

Instantly share code, notes, and snippets.

@iwillig
Created May 13, 2010 19:24
Show Gist options
  • Select an option

  • Save iwillig/400303 to your computer and use it in GitHub Desktop.

Select an option

Save iwillig/400303 to your computer and use it in GitHub Desktop.
import glob
import os
shapes = glob.glob("*.shp")
for shape in shapes:
os.system("ogr2ogr -f \"PostgreSQL\" PG:\"host=localhost port=54321 user=awright dbname=mtparcels\" -t_srs \"EPSG:102700\" -nln broadwater %s" % shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment