mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #34234 -- Dropped support for PROJ 4.
This commit is contained in:
@@ -19,8 +19,6 @@ class TestSRS:
|
||||
setattr(self, key, value)
|
||||
|
||||
|
||||
WGS84_proj = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "
|
||||
|
||||
# Some Spatial Reference examples
|
||||
srlist = (
|
||||
TestSRS(
|
||||
@@ -245,7 +243,7 @@ class SpatialRefTest(SimpleTestCase):
|
||||
"+no_defs",
|
||||
]
|
||||
srs1 = SpatialReference(srlist[0].wkt)
|
||||
srs2 = SpatialReference(WGS84_proj)
|
||||
srs2 = SpatialReference("+proj=longlat +datum=WGS84 +no_defs")
|
||||
self.assertTrue(all(part in proj_parts for part in srs1.proj.split()))
|
||||
self.assertTrue(all(part in proj_parts for part in srs2.proj.split()))
|
||||
|
||||
|
||||
@@ -892,8 +892,8 @@ class GEOSTest(SimpleTestCase, TestDataMixin):
|
||||
# Test conversion from custom to a known srid
|
||||
c2w = gdal.CoordTransform(
|
||||
gdal.SpatialReference(
|
||||
"+proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +ellps=WGS84 "
|
||||
"+datum=WGS84 +units=m +no_defs"
|
||||
"+proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +datum=WGS84 "
|
||||
"+units=m +no_defs"
|
||||
),
|
||||
gdal.SpatialReference(4326),
|
||||
)
|
||||
|
||||
@@ -11,10 +11,8 @@ test_srs = (
|
||||
"auth_srid": 4326,
|
||||
# Only the beginning, because there are differences depending on installed libs
|
||||
"srtext": 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84"',
|
||||
# +ellps=WGS84 has been removed in the 4326 proj string in proj-4.8
|
||||
"proj_re": (
|
||||
r"\+proj=longlat (\+ellps=WGS84 )?(\+datum=WGS84 |\+towgs84=0,0,0,0,0,0,0 )"
|
||||
r"\+no_defs ?"
|
||||
r"\+proj=longlat (\+datum=WGS84 |\+towgs84=0,0,0,0,0,0,0 )\+no_defs ?"
|
||||
),
|
||||
"spheroid": "WGS 84",
|
||||
"name": "WGS 84",
|
||||
|
||||
Reference in New Issue
Block a user