summaryrefslogtreecommitdiff
path: root/django/contrib
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2025-08-12 08:47:03 +0100
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-08-21 16:46:41 +0200
commitfb0d463b1f88a38f3e7cd8d66ed6c69309f97901 (patch)
tree506c10b0a18b191fe50fde775273d20ad031686d /django/contrib
parent7063d31cc37028e0f945faa43030ce23dc1a5c23 (diff)
Fixed #36382 -- Confirmed support for GDAL 3.11.
TIGER driver was removed in GDAL 3.11. https://github.com/OSGeo/gdal/commit/eb793be0395ccba50e053a46b30cb90deb530990
Diffstat (limited to 'django/contrib')
-rw-r--r--django/contrib/gis/gdal/datasource.py3
-rw-r--r--django/contrib/gis/gdal/driver.py11
-rw-r--r--django/contrib/gis/gdal/libgdal.py2
3 files changed, 12 insertions, 4 deletions
diff --git a/django/contrib/gis/gdal/datasource.py b/django/contrib/gis/gdal/datasource.py
index 5e644c142c..168481e993 100644
--- a/django/contrib/gis/gdal/datasource.py
+++ b/django/contrib/gis/gdal/datasource.py
@@ -4,8 +4,7 @@ an interface for reading vector geometry data from many different file
formats (including ESRI shapefiles).
When instantiating a DataSource object, use the filename of a
-GDAL-supported data source. For example, an SHP file or a
-TIGER/Line file from the government.
+GDAL-supported data source. For example, an SHP file.
The ds_driver keyword is used internally when a ctypes pointer
is passed in directly.
diff --git a/django/contrib/gis/gdal/driver.py b/django/contrib/gis/gdal/driver.py
index 1d4ca4c07a..0fb93501a8 100644
--- a/django/contrib/gis/gdal/driver.py
+++ b/django/contrib/gis/gdal/driver.py
@@ -2,6 +2,7 @@ from ctypes import c_void_p
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import GDALException
+from django.contrib.gis.gdal.libgdal import GDAL_VERSION
from django.contrib.gis.gdal.prototypes import ds as capi
from django.utils.encoding import force_bytes, force_str
@@ -23,8 +24,6 @@ class Driver(GDALBase):
"esri": "ESRI Shapefile",
"shp": "ESRI Shapefile",
"shape": "ESRI Shapefile",
- "tiger": "TIGER",
- "tiger/line": "TIGER",
# raster
"tiff": "GTiff",
"tif": "GTiff",
@@ -32,6 +31,14 @@ class Driver(GDALBase):
"jpg": "JPEG",
}
+ if GDAL_VERSION[:2] <= (3, 10):
+ _alias.update(
+ {
+ "tiger": "TIGER",
+ "tiger/line": "TIGER",
+ }
+ )
+
def __init__(self, dr_input):
"""
Initialize an GDAL/OGR driver on either a string or integer input.
diff --git a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgdal.py
index 6a942fb630..f92a1cdea0 100644
--- a/django/contrib/gis/gdal/libgdal.py
+++ b/django/contrib/gis/gdal/libgdal.py
@@ -22,6 +22,7 @@ if lib_path:
elif os.name == "nt":
# Windows NT shared libraries
lib_names = [
+ "gdal311",
"gdal310",
"gdal309",
"gdal308",
@@ -38,6 +39,7 @@ elif os.name == "posix":
lib_names = [
"gdal",
"GDAL",
+ "gdal3.11.0",
"gdal3.10.0",
"gdal3.9.0",
"gdal3.8.0",