diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-11-25 11:21:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-25 11:21:13 +0100 |
| commit | 70e93bc17bc00c4d1ade9ba600ffe180a6973d66 (patch) | |
| tree | 4de717a5695bb04767fb047b304aca63faf501c9 /django | |
| parent | d86802f13fd821f006371b95d888d294297874fd (diff) | |
Fixed #36756 -- Dropped support for GDAL 3.1 and 3.2.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/gis/gdal/libgdal.py | 4 | ||||
| -rw-r--r-- | django/contrib/gis/gdal/prototypes/geom.py | 24 |
2 files changed, 7 insertions, 21 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( |
