diff --git a/django/contrib/gis/gdal/datasource.py b/django/contrib/gis/gdal/datasource.py index 6b7112b30e..7def6118a8 100644 --- a/django/contrib/gis/gdal/datasource.py +++ b/django/contrib/gis/gdal/datasource.py @@ -44,8 +44,8 @@ from django.contrib.gis.gdal.prototypes import ds as capi from django.utils.encoding import force_bytes, force_str -# For more information, see the OGR C API source code: -# https://www.gdal.org/ogr__api_8h.html +# For more information, see the OGR C API documentation: +# https://gdal.org/api/vector_c_api.html # # The OGR_DS_* routines are relevant here. class DataSource(GDALBase): diff --git a/django/contrib/gis/gdal/driver.py b/django/contrib/gis/gdal/driver.py index 13d92e96d9..f90b886251 100644 --- a/django/contrib/gis/gdal/driver.py +++ b/django/contrib/gis/gdal/driver.py @@ -9,14 +9,15 @@ from django.utils.encoding import force_bytes, force_str class Driver(GDALBase): """ Wrap a GDAL/OGR Data Source Driver. - For more information, see the C API source code: - https://www.gdal.org/gdal_8h.html - https://www.gdal.org/ogr__api_8h.html + For more information, see the C API documentation: + https://gdal.org/api/vector_c_api.html + https://gdal.org/api/raster_c_api.html """ # Case-insensitive aliases for some GDAL/OGR Drivers. # For a complete list of original driver names see - # https://www.gdal.org/ogr_formats.html (vector) - # https://www.gdal.org/formats_list.html (raster) + # https://gdal.org/drivers/vector/ + # https://gdal.org/drivers/raster/ _alias = { # vector 'esri': 'ESRI Shapefile', diff --git a/django/contrib/gis/gdal/envelope.py b/django/contrib/gis/gdal/envelope.py index 7921c978c8..98c333f483 100644 --- a/django/contrib/gis/gdal/envelope.py +++ b/django/contrib/gis/gdal/envelope.py @@ -17,7 +17,7 @@ from django.contrib.gis.gdal.error import GDALException # The OGR definition of an Envelope is a C structure containing four doubles. # See the 'ogr_core.h' source file for more information: -# https://www.gdal.org/ogr__core_8h_source.html +# https://gdal.org/doxygen/ogr__core_8h_source.html class OGREnvelope(Structure): "Represent the OGREnvelope C Structure." _fields_ = [("MinX", c_double), diff --git a/django/contrib/gis/gdal/error.py b/django/contrib/gis/gdal/error.py index 71b862e58b..b5646dd751 100644 --- a/django/contrib/gis/gdal/error.py +++ b/django/contrib/gis/gdal/error.py @@ -29,7 +29,7 @@ OGRERR_DICT = { } # CPL Error Codes -# https://www.gdal.org/cpl__error_8h.html +# https://gdal.org/api/cpl.html#cpl-error-h CPLERR_DICT = { 1: (GDALException, 'AppDefined'), 2: (GDALException, 'OutOfMemory'), diff --git a/django/contrib/gis/gdal/feature.py b/django/contrib/gis/gdal/feature.py index 9f8063d1f5..82a9089c16 100644 --- a/django/contrib/gis/gdal/feature.py +++ b/django/contrib/gis/gdal/feature.py @@ -7,7 +7,7 @@ from django.utils.encoding import force_bytes, force_str # For more information, see the OGR C API source code: -# https://www.gdal.org/ogr__api_8h.html +# https://gdal.org/api/vector_c_api.html # # The OGR_F_* routines are relevant here. class Feature(GDALBase): diff --git a/django/contrib/gis/gdal/field.py b/django/contrib/gis/gdal/field.py index dfd25d7bfb..8fc731acc6 100644 --- a/django/contrib/gis/gdal/field.py +++ b/django/contrib/gis/gdal/field.py @@ -8,7 +8,7 @@ from django.utils.encoding import force_str # For more information, see the OGR C API source code: -# https://www.gdal.org/ogr__api_8h.html +# https://gdal.org/api/vector_c_api.html # # The OGR_Fld_* routines are relevant here. class Field(GDALBase): diff --git a/django/contrib/gis/gdal/geometries.py b/django/contrib/gis/gdal/geometries.py index 0aa1161243..d807b3e8b9 100644 --- a/django/contrib/gis/gdal/geometries.py +++ b/django/contrib/gis/gdal/geometries.py @@ -1,7 +1,7 @@ """ The OGRGeometry is a wrapper for using the OGR Geometry class - (see https://www.gdal.org/classOGRGeometry.html). OGRGeometry - may be instantiated when reading geometries from OGR Data Sources + (see https://gdal.org/api/ogrgeometry_cpp.html#_CPPv411OGRGeometry). + OGRGeometry may be instantiated when reading geometries from OGR Data Sources (e.g. SHP files), or when given OGC WKT (a string). While the 'full' API is not present yet, the API is "pythonic" unlike @@ -53,7 +53,7 @@ from django.utils.encoding import force_bytes # For more information, see the OGR C API source code: -# https://www.gdal.org/ogr__api_8h.html +# https://gdal.org/api/vector_c_api.html # # The OGR_G_* routines are relevant here. class OGRGeometry(GDALBase): diff --git a/django/contrib/gis/gdal/layer.py b/django/contrib/gis/gdal/layer.py index 4f7a2b3f83..012f70bdb0 100644 --- a/django/contrib/gis/gdal/layer.py +++ b/django/contrib/gis/gdal/layer.py @@ -15,7 +15,7 @@ from django.utils.encoding import force_bytes, force_str # For more information, see the OGR C API source code: -# https://www.gdal.org/ogr__api_8h.html +# https://gdal.org/api/vector_c_api.html # # The OGR_L_* routines are relevant here. class Layer(GDALBase): diff --git a/django/contrib/gis/gdal/prototypes/raster.py b/django/contrib/gis/gdal/prototypes/raster.py index 600493a442..3fc9446ce8 100644 --- a/django/contrib/gis/gdal/prototypes/raster.py +++ b/django/contrib/gis/gdal/prototypes/raster.py @@ -12,9 +12,9 @@ from django.contrib.gis.gdal.prototypes.generation import ( ) # For more detail about c function names and definitions see -# https://gdal.org/gdal_8h.html -# https://gdal.org/gdalwarper_8h.html -# https://www.gdal.org/gdal__utils_8h.html +# https://gdal.org/api/raster_c_api.html +# https://gdal.org/doxygen/gdalwarper_8h.html +# https://gdal.org/api/gdal_utils.html # Prepare partial functions that use cpl error codes void_output = partial(void_output, cpl=True) @@ -95,7 +95,7 @@ auto_create_warped_vrt = voidptr_output( ) # Create VSI gdal raster files from in-memory buffers. -# https://gdal.org/cpl__vsi_8h.html +# https://gdal.org/api/cpl.html#cpl-vsi-h create_vsi_file_from_mem_buffer = voidptr_output(std_call('VSIFileFromMemBuffer'), [c_char_p, c_void_p, c_int, c_int]) get_mem_buffer_from_vsi_file = voidptr_output(std_call('VSIGetMemFileBuffer'), [c_char_p, POINTER(c_int), c_bool]) unlink_vsi_file = int_output(std_call('VSIUnlink'), [c_char_p]) diff --git a/django/contrib/gis/gdal/raster/const.py b/django/contrib/gis/gdal/raster/const.py index 935c736ec8..c246a6a190 100644 --- a/django/contrib/gis/gdal/raster/const.py +++ b/django/contrib/gis/gdal/raster/const.py @@ -5,7 +5,7 @@ from ctypes import ( c_double, c_float, c_int16, c_int32, c_ubyte, c_uint16, c_uint32, ) -# See https://www.gdal.org/gdal_8h.html#a22e22ce0a55036a96f652765793fb7a4 +# See https://gdal.org/api/raster_c_api.html#_CPPv412GDALDataType GDAL_PIXEL_TYPES = { 0: 'GDT_Unknown', # Unknown or unspecified type 1: 'GDT_Byte', # Eight bit unsigned integer @@ -44,7 +44,7 @@ GDAL_RESAMPLE_ALGORITHMS = { 'Mode': 6, } -# See https://www.gdal.org/gdal_8h.html#ace76452d94514561fffa8ea1d2a5968c +# See https://gdal.org/api/raster_c_api.html#_CPPv415GDALColorInterp GDAL_COLOR_TYPES = { 0: 'GCI_Undefined', # Undefined, default value, i.e. not known 1: 'GCI_GrayIndex', # Grayscale diff --git a/tests/gis_tests/inspectapp/tests.py b/tests/gis_tests/inspectapp/tests.py index d4b9ccedc4..932d5bd9ab 100644 --- a/tests/gis_tests/inspectapp/tests.py +++ b/tests/gis_tests/inspectapp/tests.py @@ -191,7 +191,7 @@ def get_ogr_db_string(): db = connections.databases['default'] # Map from the django backend into the OGR driver name and database identifier - # https://www.gdal.org/ogr/ogr_formats.html + # https://gdal.org/drivers/vector/ # # TODO: Support Oracle (OCI). drivers = {