Skip to content

Instantly share code, notes, and snippets.

@Amir-P
Created June 2, 2020 07:37
Show Gist options
  • Save Amir-P/82ee70170212a1c773723d7bf23ef563 to your computer and use it in GitHub Desktop.
Save Amir-P/82ee70170212a1c773723d7bf23ef563 to your computer and use it in GitHub Desktop.
Coordinate converter for ITM (IRENET95_Irish_Transverse_Mercator) to WGS-84 and vice versa with use of pyproj
import pyproj
class ITMConverter():
def __init__(self):
self.wgs84 = pyproj.Proj('epsg:4326')
self.itm = pyproj.Proj('epsg:2157')
def convert_to_wgs(self, easting, northing):
return pyproj.transform(self.itm, self.wgs84, easting, northing)
def convert_to_itm(self, latitude, longitude):
return pyproj.transform(self.wgs84, self.itm, latitude, longitude)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment