From 8c7778884bced3e756ce139da781b0c8c8b2395c Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 12 Nov 2016 17:06:05 +0100 Subject: [PATCH] Dropped support for GDAL 1.7 and 1.8 --- docs/ref/contrib/gis/install/geolibs.txt | 4 +--- docs/releases/1.11.txt | 2 ++ tests/gis_tests/data/geometries.json | 2 +- tests/gis_tests/gdal_tests/test_geom.py | 8 ++------ tests/gis_tests/gdal_tests/test_raster.py | 2 -- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/ref/contrib/gis/install/geolibs.txt b/docs/ref/contrib/gis/install/geolibs.txt index d6793299fe4..fd3e67e7818 100644 --- a/docs/ref/contrib/gis/install/geolibs.txt +++ b/docs/ref/contrib/gis/install/geolibs.txt @@ -10,7 +10,7 @@ Program Description Required ======================== ==================================== ================================ =================================== :doc:`GEOS <../geos>` Geometry Engine Open Source Yes 3.4, 3.3 `PROJ.4`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 4.9, 4.8, 4.7, 4.6, 4.5, 4.4 -:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes 2.1, 2.0, 1.11, 1.10, 1.9, 1.8, 1.7 +:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes 2.1, 2.0, 1.11, 1.10, 1.9 :doc:`GeoIP <../geoip>` IP-based geolocation library No 1.4 `PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.3, 2.2, 2.1 `SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 4.3, 4.2, 4.1, 4.0 @@ -28,8 +28,6 @@ totally fine with GeoDjango. Your mileage may vary. Libs release dates: GEOS 3.3.0 2011-05-30 GEOS 3.4.0 2013-08-11 - GDAL 1.7.1 2010-02-08 - GDAL 1.8.0 2011-01-13 GDAL 1.9.0 2012-01-03 GDAL 1.10.0 2013-04-29 GDAL 1.11.0 2014-04-25 diff --git a/docs/releases/1.11.txt b/docs/releases/1.11.txt index ff40daa504a..2d3a4dc698e 100644 --- a/docs/releases/1.11.txt +++ b/docs/releases/1.11.txt @@ -521,6 +521,8 @@ Miscellaneous * Support for SpatiaLite < 4.0 is dropped. +* Support for GDAL 1.7 and 1.8 is dropped. + * CSRF failures are logged to the ``django.security.csrf`` logger instead of ``django.request``. diff --git a/tests/gis_tests/data/geometries.json b/tests/gis_tests/data/geometries.json index b33f87b0106..b8b1c3eab35 100644 --- a/tests/gis_tests/data/geometries.json +++ b/tests/gis_tests/data/geometries.json @@ -26,7 +26,7 @@ {"wkt": "MULTIPOINT (10 80,110 170,110 120)", "ewkt": "MULTIPOINT (10 80, 110 170, 110 120)", "kml": "10.0,80.0,0110.0,170.0,0110.0,120.0,0", "gml": "10,80110,170110,120"}, {"wkt": "MULTILINESTRING ((110 100,40 30,180 30),(170 30,110 90,50 30))", "ewkt": "MULTILINESTRING ((110 100, 40 30, 180 30), (170 30, 110 90, 50 30))", "kml": "110.0,100.0,0 40.0,30.0,0 180.0,30.0,0170.0,30.0,0 110.0,90.0,0 50.0,30.0,0", "gml": "110,100 40,30 180,30170,30 110,90 50,30"}, {"wkt": "MULTIPOLYGON (((110 110,70 200,150 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,150 20,70 20,110 110),(110 110,120 40,100 40,110 110)))", "ewkt": "MULTIPOLYGON (((110 110, 70 200, 150 200, 110 110), (110 110, 100 180, 120 180, 110 110)), ((110 110, 150 20, 70 20, 110 110), (110 110, 120 40, 100 40, 110 110)))", "kml": "110.0,110.0,0 70.0,200.0,0 150.0,200.0,0 110.0,110.0,0110.0,110.0,0 100.0,180.0,0 120.0,180.0,0 110.0,110.0,0110.0,110.0,0 150.0,20.0,0 70.0,20.0,0 110.0,110.0,0110.0,110.0,0 120.0,40.0,0 100.0,40.0,0 110.0,110.0,0", "gml": "110,110 70,200 150,200 110,110110,110 100,180 120,180 110,110110,110 150,20 70,20 110,110110,110 120,40 100,40 110,110"}, - {"wkt": "GEOMETRYCOLLECTION (POINT (110 260),LINESTRING (110 0,110 60))", "ewkt": "GEOMETRYCOLLECTION (POINT (110 260), LINESTRING (110 0, 110 60))", "kml": "110.0,260.0,0110.0,0.0,0 110.0,60.0,0", "gml": "110,260110,0 110,60"} + {"wkt": "GEOMETRYCOLLECTION (POINT (110 260),LINESTRING (110 0,110 60))", "ewkt": "GEOMETRYCOLLECTION (POINT (110 260), LINESTRING (110 0, 110 60))", "kml": "110.0,260.0,0110.0,0.0,0 110.0,60.0,0", "gml": "110,260110,0 110,60"} ], "hex_wkt": [ {"wkt": "POINT(0 1)", "hex": "01010000000000000000000000000000000000F03F"}, diff --git a/tests/gis_tests/gdal_tests/test_geom.py b/tests/gis_tests/gdal_tests/test_geom.py index 7ec1b4b990b..c205a310925 100644 --- a/tests/gis_tests/gdal_tests/test_geom.py +++ b/tests/gis_tests/gdal_tests/test_geom.py @@ -16,8 +16,8 @@ except ImportError: if HAS_GDAL: from django.contrib.gis.gdal import ( - OGRGeometry, OGRGeomType, GDALException, OGRIndexError, - SpatialReference, CoordTransform, GDAL_VERSION, + CoordTransform, GDALException, OGRGeometry, OGRGeomType, OGRIndexError, + SpatialReference, ) @@ -94,10 +94,6 @@ class OGRGeomTest(unittest.TestCase, TestDataMixin): for g in self.geometries.wkt_out: geom = OGRGeometry(g.wkt) exp_gml = g.gml - if GDAL_VERSION >= (1, 8): - # In GDAL 1.8, the non-conformant GML tag was - # replaced with . - exp_gml = exp_gml.replace('GeometryCollection', 'MultiGeometry') self.assertEqual(exp_gml, geom.gml) def test_hex(self): diff --git a/tests/gis_tests/gdal_tests/test_raster.py b/tests/gis_tests/gdal_tests/test_raster.py index bddb3c8826b..eea92617c99 100644 --- a/tests/gis_tests/gdal_tests/test_raster.py +++ b/tests/gis_tests/gdal_tests/test_raster.py @@ -328,8 +328,6 @@ class GDALRasterTests(unittest.TestCase): self.assertEqual(result, [23] * 16) def test_raster_transform(self): - if GDAL_VERSION < (1, 8, 1): - self.skipTest("GDAL >= 1.8.1 is required for this test") # Prepare tempfile and nodata value rstfile = tempfile.NamedTemporaryFile(suffix='.tif') ndv = 99