diff --git a/django/contrib/gis/geometry/regex.py b/django/contrib/gis/geometry/regex.py index ec83a1981d..6727c7d942 100644 --- a/django/contrib/gis/geometry/regex.py +++ b/django/contrib/gis/geometry/regex.py @@ -8,6 +8,6 @@ wkt_regex = re.compile(r'^(SRID=(?P\-?\d+);)?' r'(?P' r'(?PPOINT|LINESTRING|LINEARRING|POLYGON|MULTIPOINT|' r'MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)' - r'[ACEGIMLONPSRUTYZ\d,\.\-\(\) ]+)$', + r'[ACEGIMLONPSRUTYZ\d,\.\-\+\(\) ]+)$', re.I) json_regex = re.compile(r'^(\s+)?\{.*}(\s+)?$', re.DOTALL) diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py index db373fd6c1..0db98285fa 100644 --- a/tests/gis_tests/geos_tests/test_geos.py +++ b/tests/gis_tests/geos_tests/test_geos.py @@ -1337,6 +1337,9 @@ class GEOSTest(SimpleTestCase, TestDataMixin): with self.assertRaisesMessage(ValueError, msg): GEOSGeometry.from_ewkt('SRID=WGS84;POINT(1 1)') + def test_fromstr_scientific_wkt(self): + self.assertEqual(GEOSGeometry('POINT(1.0e-1 1.0e+1)'), Point(.1, 10)) + def test_normalize(self): g = MultiPoint(Point(0, 0), Point(2, 2), Point(1, 1)) self.assertIsNone(g.normalize())