Created
April 12, 2017 14:16
-
-
Save phil8192/9c4906897e9d21a5cb10e74b63ec9cd7 to your computer and use it in GitHub Desktop.
BNG to WGS84
This file contains 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
# http://www.bgs.ac.uk/data/webservices/convertForm.cfm#convertToLatLng | |
import pyproj | |
x, y = (383772, 800512) | |
p1 = pyproj.Proj(init='EPSG:27700') | |
p2 = pyproj.Proj(init='EPSG:4326') | |
lng, lat = pyproj.transform(p1, p2, x, y) | |
assert(abs(float(lng) - -2.26944714111) <= 10**-6 and abs(float(lat) - 57.0953024029) <= 10**-6) | |
print((lat, lng)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment