diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/geos_tests/test_geos.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py index 72d035cc22..3270c75762 100644 --- a/tests/gis_tests/geos_tests/test_geos.py +++ b/tests/gis_tests/geos_tests/test_geos.py @@ -143,7 +143,21 @@ class GEOSTest(SimpleTestCase, TestDataMixin): # Loading jsons to prevent decimal differences self.assertEqual(json.loads(g.json), json.loads(geom.json)) self.assertEqual(json.loads(g.json), json.loads(geom.geojson)) - self.assertEqual(GEOSGeometry(g.wkt), GEOSGeometry(geom.json)) + self.assertEqual(GEOSGeometry(g.wkt, 4326), GEOSGeometry(geom.json)) + + @skipUnless(HAS_GDAL, "GDAL is required.") + def test_json_srid(self): + geojson_data = { + "type": "Point", + "coordinates": [2, 49], + "crs": { + "type": "name", + "properties": { + "name": "urn:ogc:def:crs:EPSG::4322" + } + } + } + self.assertEqual(GEOSGeometry(json.dumps(geojson_data)), Point(2, 49, srid=4322)) def test_fromfile(self): "Testing the fromfile() factory." |
