Skip to content

Instantly share code, notes, and snippets.

View jamiewanderi's full-sized avatar
💭
Meeeow 🐱

jamiewanderi

💭
Meeeow 🐱
View GitHub Profile
@jamiewanderi
jamiewanderi / postgis2geojson
Created May 31, 2019 17:44 — forked from justinlewis/postgis2geojson
Export a PostGIS table to GeoJSON format with ogr2ogr.
ogr2ogr -f "GeoJSON" /PATH/TO/NEWFILE.json PG:"host=YOUR_HOST dbname=YOUR_DB user=YOUR_USER password=YOUR_PASS port=5432" "YOUR_POSTGIS_TABLE(the_geom)"
@jamiewanderi
jamiewanderi / google_postgis_geocode.py
Created May 31, 2019 17:43 — forked from justinlewis/google_postgis_geocode.py
Script that geocodes address data stored in a PostgreSQL (PostGIS) database using Google.
##
## Mike Tafel and Justin Lewis
## 2010/07/26 : updated Dec. 2012
##
## Script that geocodes address data stored in a PostgreSQL (PostGIS) database using Google.
### Preps the db table, reads address data, builds a request url, returns lat/long/precision valuse to the same table,
### transforms coordinates to 4326 then 2232.
##
## Dependancies:
#### PostGIS database, Google Private Key and Client ID, all the libraries listed in the import below