Skip to content

Instantly share code, notes, and snippets.

@davewalk
Last active January 5, 2017 22:24
Show Gist options
  • Save davewalk/11150808 to your computer and use it in GitHub Desktop.
Save davewalk/11150808 to your computer and use it in GitHub Desktop.
Convert state plane PA South coordinates to lat/longs
import pyproj
def convert(x, y):
state_plane = pyproj.Proj(init='epsg:2272', preserve_units=True)
wgs = pyproj.Proj(proj='latlong', datum='WGS84', ellps='WGS84')
lng, lat = pyproj.transform(self.state_plane, self.wgs, x, y)
return lat, lng
@aerispaha
Copy link

This worked for me after I changed line 6 to:

lat, lng = pyproj.transform(state_plane, wgs, x, y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment