Created
November 14, 2015 18:32
-
-
Save samuelleach/69cdb9c6493f8900ca09 to your computer and use it in GitHub Desktop.
Convert Eastings/Northings to lon lat
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
import pyproj as pyproj | |
import pandas as pd | |
import numpy as np | |
df = pd.read_csv('SCOOT_Detectors.csv') | |
osgb36 = pyproj.Proj("+init=EPSG:27700") | |
eastnorth = np.apply_along_axis(func1d=lambda x: osgb36(x[0],x[1], inverse=True), arr=df[['EASTING', 'NORTHING']].values, axis=1) | |
df['lon'] = eastnorth[:,0] | |
df['lat'] = eastnorth[:,1] | |
df.to_csv('SCOOT_Detectors_lonlat.csv') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment