Added tests for SpatialReference.to_esri()/from_esri().

This commit is contained in:
Mariusz Felisiak 2022-01-19 16:03:04 +01:00 committed by GitHub
parent dc8bb35e39
commit 4a8ac604b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -317,3 +317,12 @@ class SpatialRefTest(SimpleTestCase):
msg = 'AxisOrder.AUTHORITY is not supported in GDAL < 3.0.'
with self.assertRaisesMessage(ValueError, msg):
SpatialReference(4326, axis_order=AxisOrder.AUTHORITY)
def test_esri(self):
srs = SpatialReference('NAD83')
pre_esri_wkt = srs.wkt
srs.to_esri()
self.assertNotEqual(srs.wkt, pre_esri_wkt)
self.assertIn('DATUM["D_North_American_1983"', srs.wkt)
srs.from_esri()
self.assertIn('DATUM["North_American_Datum_1983"', srs.wkt)