Created
August 11, 2014 14:44
-
-
Save demiurg/77e51721486b58b1d74f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import fiona | |
| import csv | |
| shp = fiona.open("TOWNSSURVEY_PT.shp") | |
| print "Columns: {}".format(shp.schema['properties'].keys()) | |
| prop_csv = csv.DictWriter(open("props.csv", 'wb'), shp.schema['properties'].keys()) | |
| prop_csv.writeheader() | |
| for record in shp: | |
| prop_csv.writerow(record['properties']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment