Last active
June 5, 2019 08:09
-
-
Save BishopGIS/d160dc76ce78b824897a9b60828b9a25 to your computer and use it in GitHub Desktop.
example import of MI and ESRI proj
This file contains hidden or 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
from osgeo import osr | |
srs = osr.SpatialReference() | |
line1 = 'PROJCS["MSK90 zone 6",GEOGCS["MSK90",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],UNIT["metre",1],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",32.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",6300000],PARAMETER["false_northing",-9214.70],AXIS["X",NORTH],AXIS["Y",EAST]]' | |
#line2 = '"МСК-23 зона 1", 8, 1001, 7, 37.98333333333, 0, 1, 1300000, -4511057.628' | |
line2 = 'Earth Projection 8, 1001, "m", 37.98333333333, 0, 1, 1300000, -4511057.628, 0' | |
srs.ImportFromMICoordSys(line2) | |
print(srs.ExportToPrettyWkt()) | |
print(srs.ExportToProj4()) | |
srs = osr.SpatialReference() | |
srs.SetFromUserInput(line1) | |
srs.MorphToESRI() | |
print(srs.ExportToPrettyWkt()) | |
print(srs.ExportToProj4()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment