Created
June 2, 2020 07:37
-
-
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
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 | |
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