Skip to content
Permalink
Browse files

Backport proj WKT fix

  • Loading branch information...
geographika committed Jun 6, 2019
1 parent 14095ae commit af2f4fbbcbc0e276a8cd017d947341f4d29899f0
Showing with 12 additions and 6 deletions.
  1. +12 −6 mapscript/python/tests/cases/map_test.py
@@ -290,15 +290,21 @@ def testSetSize(self):
class MapSetWKTTestCase(MapTestCase):

def testOGCWKT(self):
self.map.setWKTProjection('PROJCS["unnamed", PROJECTION["Albers_Conic_Equal_Area"], '
'PARAMETER["standard_parallel_1", 65], PARAMETER["standard_parallel_2", 55], '
'PARAMETER["latitude_of_center", 0], PARAMETER["longitude_of_center", -153], '
'PARAMETER["false_easting", -4943910.68], PARAMETER["false_northing", 0]]')
self.map.setWKTProjection('''PROJCS["unnamed",GEOGCS["WGS 84",DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Albers_Conic_Equal_Area"],
PARAMETER["standard_parallel_1", 65], PARAMETER["standard_parallel_2", 55],
PARAMETER["latitude_of_center", 0], PARAMETER["longitude_of_center", -153],
PARAMETER["false_easting", -4943910.68], PARAMETER["false_northing", 0],
UNIT["metre",1.0]
]''')
proj4 = self.map.getProjection()

assert proj4.find('+proj=aea') != -1
assert proj4.find('+ellps=WGS84') != -1
assert (mapscript.projectionObj(proj4)).getUnits() != mapscript.MS_DD
assert proj4.find('+datum=WGS84') != -1
assert mapscript.projectionObj(proj4).getUnits() != mapscript.MS_DD

def testESRIWKT(self):
self.map.setWKTProjection('ESRI::PROJCS["Pulkovo_1995_GK_Zone_2", GEOGCS["GCS_Pulkovo_1995", '

0 comments on commit af2f4fb

Please sign in to comment.
You can’t perform that action at this time.