summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2025-11-25 11:21:13 +0100
committerGitHub <noreply@github.com>2025-11-25 11:21:13 +0100
commit70e93bc17bc00c4d1ade9ba600ffe180a6973d66 (patch)
tree4de717a5695bb04767fb047b304aca63faf501c9
parentd86802f13fd821f006371b95d888d294297874fd (diff)
Fixed #36756 -- Dropped support for GDAL 3.1 and 3.2.
-rw-r--r--django/contrib/gis/gdal/libgdal.py4
-rw-r--r--django/contrib/gis/gdal/prototypes/geom.py24
-rw-r--r--docs/ref/contrib/gis/install/geolibs.txt10
-rw-r--r--docs/releases/6.1.txt2
4 files changed, 13 insertions, 27 deletions
diff --git a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgdal.py
index c68d175e09..a9f6351059 100644
--- a/django/contrib/gis/gdal/libgdal.py
+++ b/django/contrib/gis/gdal/libgdal.py
@@ -32,8 +32,6 @@ elif os.name == "nt":
"gdal305",
"gdal304",
"gdal303",
- "gdal302",
- "gdal301",
]
elif os.name == "posix":
# *NIX library names.
@@ -50,8 +48,6 @@ elif os.name == "posix":
"gdal3.5.0",
"gdal3.4.0",
"gdal3.3.0",
- "gdal3.2.0",
- "gdal3.1.0",
]
else:
raise ImproperlyConfigured('GDAL is unsupported on OS "%s".' % os.name)
diff --git a/django/contrib/gis/gdal/prototypes/geom.py b/django/contrib/gis/gdal/prototypes/geom.py
index 9066dbd423..2f89e663ba 100644
--- a/django/contrib/gis/gdal/prototypes/geom.py
+++ b/django/contrib/gis/gdal/prototypes/geom.py
@@ -1,7 +1,7 @@
from ctypes import POINTER, c_char_p, c_double, c_int, c_void_p
from django.contrib.gis.gdal.envelope import OGREnvelope
-from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
+from django.contrib.gis.gdal.libgdal import lgdal
from django.contrib.gis.gdal.prototypes.errcheck import check_envelope
from django.contrib.gis.gdal.prototypes.generation import (
bool_output,
@@ -54,18 +54,11 @@ getz = pnt_func(lgdal.OGR_G_GetZ)
getm = pnt_func(lgdal.OGR_G_GetM)
# Geometry creation routines.
-if GDAL_VERSION >= (3, 3):
- from_wkb = geom_output(
- lgdal.OGR_G_CreateFromWkbEx,
- [c_char_p, c_void_p, POINTER(c_void_p), c_int],
- offset=-2,
- )
-else:
- from_wkb = geom_output(
- lgdal.OGR_G_CreateFromWkb,
- [c_char_p, c_void_p, POINTER(c_void_p), c_int],
- offset=-2,
- )
+from_wkb = geom_output(
+ lgdal.OGR_G_CreateFromWkbEx,
+ [c_char_p, c_void_p, POINTER(c_void_p), c_int],
+ offset=-2,
+)
from_wkt = geom_output(
lgdal.OGR_G_CreateFromWkt,
[POINTER(c_char_p), c_void_p, POINTER(c_void_p)],
@@ -114,10 +107,7 @@ to_iso_wkt = string_output(
to_gml = string_output(
lgdal.OGR_G_ExportToGML, [c_void_p], str_result=True, decoding="ascii"
)
-if GDAL_VERSION >= (3, 3):
- get_wkbsize = int_output(lgdal.OGR_G_WkbSizeEx, [c_void_p])
-else:
- get_wkbsize = int_output(lgdal.OGR_G_WkbSize, [c_void_p])
+get_wkbsize = int_output(lgdal.OGR_G_WkbSizeEx, [c_void_p])
# Geometry spatial-reference related routines.
assign_srs = void_output(
diff --git a/docs/ref/contrib/gis/install/geolibs.txt b/docs/ref/contrib/gis/install/geolibs.txt
index 630b605103..e5e4fb8499 100644
--- a/docs/ref/contrib/gis/install/geolibs.txt
+++ b/docs/ref/contrib/gis/install/geolibs.txt
@@ -10,16 +10,16 @@ Geospatial libraries
GeoDjango uses and/or provides interfaces for the following open source
geospatial libraries:
-============================== ==================================== ================================ =============================================================
+============================== ==================================== ================================ ===================================================
Program Description Required Supported Versions
-============================== ==================================== ================================ =============================================================
+============================== ==================================== ================================ ===================================================
:ref:`GEOS <geos-overview>` Geometry Engine Open Source Yes 3.14, 3.13, 3.12, 3.11, 3.10, 3.9
`PROJ`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 9.x, 8.x, 7.x, 6.x
-:ref:`GDAL <gdal-overview>` Geospatial Data Abstraction Library Yes 3.12, 3.11, 3.10, 3.9, 3.8, 3.7, 3.6, 3.5, 3.4, 3.3, 3.2, 3.1
+:ref:`GDAL <gdal-overview>` Geospatial Data Abstraction Library Yes 3.12, 3.11, 3.10, 3.9, 3.8, 3.7, 3.6, 3.5, 3.4, 3.3
:ref:`GeoIP <geoip2-overview>` IP-based geolocation library No 2
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 3.6, 3.5, 3.4, 3.3, 3.2
`SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 5.1, 5.0, 4.3
-============================== ==================================== ================================ =============================================================
+============================== ==================================== ================================ ===================================================
Note that older or more recent versions of these libraries *may* also work
totally fine with GeoDjango. Your mileage may vary.
@@ -32,8 +32,6 @@ totally fine with GeoDjango. Your mileage may vary.
GEOS 3.12.0 2023-06-27
GEOS 3.13.0 2024-09-06
GEOS 3.14.0 2025-08-21
- GDAL 3.1.0 2020-05-07
- GDAL 3.2.0 2020-11-02
GDAL 3.3.0 2021-05-03
GDAL 3.4.0 2021-11-04
GDAL 3.5.0 2022-05-13
diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt
index 0d1b6ccdca..1c533f1341 100644
--- a/docs/releases/6.1.txt
+++ b/docs/releases/6.1.txt
@@ -345,6 +345,8 @@ backends.
* Support for GEOS 3.8 is removed.
+* Support for GDAL 3.1 and 3.2 is removed.
+
:mod:`django.contrib.postgres`
------------------------------