From 5da5f3773ec281a027f99c9b56add47d076650b5 Mon Sep 17 00:00:00 2001 From: Leo <86375512+select-case@users.noreply.github.com> Date: Wed, 11 Jan 2023 23:00:10 +0530 Subject: [PATCH] Fixed #34234 -- Dropped support for PROJ 4. --- docs/ref/contrib/gis/install/geolibs.txt | 3 +-- docs/releases/4.2.txt | 2 ++ tests/gis_tests/gdal_tests/test_srs.py | 4 +--- tests/gis_tests/geos_tests/test_geos.py | 4 ++-- tests/gis_tests/test_spatialrefsys.py | 4 +--- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/ref/contrib/gis/install/geolibs.txt b/docs/ref/contrib/gis/install/geolibs.txt index 2e48bcf74f..ad8aff846e 100644 --- a/docs/ref/contrib/gis/install/geolibs.txt +++ b/docs/ref/contrib/gis/install/geolibs.txt @@ -9,7 +9,7 @@ geospatial libraries: Program Description Required Supported Versions ======================== ==================================== ================================ ================================================ :doc:`GEOS <../geos>` Geometry Engine Open Source Yes 3.11, 3.10, 3.9, 3.8, 3.7, 3.6 -`PROJ`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 9.x, 8.x, 7.x, 6.x, 5.x, 4.x +`PROJ`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 9.x, 8.x, 7.x, 6.x, 5.x :doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes 3.6, 3.5, 3.4, 3.3, 3.2, 3.1, 3.0, 2.4, 2.3, 2.2 :doc:`GeoIP <../geoip2>` IP-based geolocation library No 2 `PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 3.3, 3.2, 3.1, 3.0, 2.5 @@ -48,7 +48,6 @@ totally fine with GeoDjango. Your mileage may vary. PROJ 7.0.0 2020-02-25 PROJ 6.0.0 2019-02-26 PROJ 5.0.0 2018-03-01 - PROJ 4.9.0 2014-09-14 SpatiaLite 4.3.0 2015-09-07 SpatiaLite 5.0.0 2020-08-23 diff --git a/docs/releases/4.2.txt b/docs/releases/4.2.txt index c3b939bf8b..91684301a5 100644 --- a/docs/releases/4.2.txt +++ b/docs/releases/4.2.txt @@ -549,6 +549,8 @@ Miscellaneous object for ``wsgi.input``. Previously, Django was more lax than the expected behavior as specified by the WSGI specification. +* Support for ``PROJ`` < 5 is removed. + .. _deprecated-features-4.2: Features deprecated in 4.2 diff --git a/tests/gis_tests/gdal_tests/test_srs.py b/tests/gis_tests/gdal_tests/test_srs.py index 8a2973cf00..fd25dcbc34 100644 --- a/tests/gis_tests/gdal_tests/test_srs.py +++ b/tests/gis_tests/gdal_tests/test_srs.py @@ -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())) diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py index f510b925ff..9b6068009d 100644 --- a/tests/gis_tests/geos_tests/test_geos.py +++ b/tests/gis_tests/geos_tests/test_geos.py @@ -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), ) diff --git a/tests/gis_tests/test_spatialrefsys.py b/tests/gis_tests/test_spatialrefsys.py index 7151e8d3d6..512fd217c3 100644 --- a/tests/gis_tests/test_spatialrefsys.py +++ b/tests/gis_tests/test_spatialrefsys.py @@ -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",