diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/gdal_tests/test_geom.py | 10 | ||||
| -rw-r--r-- | tests/gis_tests/geos_tests/test_geos.py | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/gis_tests/gdal_tests/test_geom.py b/tests/gis_tests/gdal_tests/test_geom.py index 163399289a..7ec1b4b990 100644 --- a/tests/gis_tests/gdal_tests/test_geom.py +++ b/tests/gis_tests/gdal_tests/test_geom.py @@ -543,3 +543,13 @@ class OGRGeomTest(unittest.TestCase, TestDataMixin): OGRGeometry('POINT(0.5 0.5)').within(OGRGeometry('POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))')), True ) self.assertIs(OGRGeometry('POINT(0 0)').within(OGRGeometry('POINT(0 1)')), False) + + def test_from_gml(self): + self.assertEqual( + OGRGeometry('POINT(0 0)'), + OGRGeometry.from_gml( + '<gml:Point gml:id="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326">' + ' <gml:pos srsDimension="2">0 0</gml:pos>' + '</gml:Point>' + ), + ) diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py index 36457f4f51..a7724de9bc 100644 --- a/tests/gis_tests/geos_tests/test_geos.py +++ b/tests/gis_tests/geos_tests/test_geos.py @@ -1300,6 +1300,16 @@ class GEOSTest(SimpleTestCase, TestDataMixin): self.assertEqual(m.group('version'), v_geos) self.assertEqual(m.group('capi_version'), v_capi) + def test_from_gml(self): + self.assertEqual( + GEOSGeometry('POINT(0 0)'), + GEOSGeometry.from_gml( + '<gml:Point gml:id="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326">' + ' <gml:pos srsDimension="2">0 0</gml:pos>' + '</gml:Point>' + ), + ) + @ignore_warnings(category=RemovedInDjango20Warning) def test_deprecated_srid_getters_setters(self): p = Point(1, 2, srid=123) |
