Fixed #33030 -- Fixed broken links to GDAL docs.

This commit is contained in:
Märt Häkkinen 2021-08-22 20:34:03 +03:00 committed by Mariusz Felisiak
parent 3e6a3e8853
commit ed317e79e3
11 changed files with 22 additions and 21 deletions

View File

@ -44,8 +44,8 @@ from django.contrib.gis.gdal.prototypes import ds as capi
from django.utils.encoding import force_bytes, force_str from django.utils.encoding import force_bytes, force_str
# For more information, see the OGR C API source code: # For more information, see the OGR C API documentation:
# https://www.gdal.org/ogr__api_8h.html # https://gdal.org/api/vector_c_api.html
# #
# The OGR_DS_* routines are relevant here. # The OGR_DS_* routines are relevant here.
class DataSource(GDALBase): class DataSource(GDALBase):

View File

@ -9,14 +9,15 @@ from django.utils.encoding import force_bytes, force_str
class Driver(GDALBase): class Driver(GDALBase):
""" """
Wrap a GDAL/OGR Data Source Driver. Wrap a GDAL/OGR Data Source Driver.
For more information, see the C API source code: For more information, see the C API documentation:
https://www.gdal.org/gdal_8h.html - https://www.gdal.org/ogr__api_8h.html https://gdal.org/api/vector_c_api.html
https://gdal.org/api/raster_c_api.html
""" """
# Case-insensitive aliases for some GDAL/OGR Drivers. # Case-insensitive aliases for some GDAL/OGR Drivers.
# For a complete list of original driver names see # For a complete list of original driver names see
# https://www.gdal.org/ogr_formats.html (vector) # https://gdal.org/drivers/vector/
# https://www.gdal.org/formats_list.html (raster) # https://gdal.org/drivers/raster/
_alias = { _alias = {
# vector # vector
'esri': 'ESRI Shapefile', 'esri': 'ESRI Shapefile',

View File

@ -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. # The OGR definition of an Envelope is a C structure containing four doubles.
# See the 'ogr_core.h' source file for more information: # 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): class OGREnvelope(Structure):
"Represent the OGREnvelope C Structure." "Represent the OGREnvelope C Structure."
_fields_ = [("MinX", c_double), _fields_ = [("MinX", c_double),

View File

@ -29,7 +29,7 @@ OGRERR_DICT = {
} }
# CPL Error Codes # CPL Error Codes
# https://www.gdal.org/cpl__error_8h.html # https://gdal.org/api/cpl.html#cpl-error-h
CPLERR_DICT = { CPLERR_DICT = {
1: (GDALException, 'AppDefined'), 1: (GDALException, 'AppDefined'),
2: (GDALException, 'OutOfMemory'), 2: (GDALException, 'OutOfMemory'),

View File

@ -7,7 +7,7 @@ from django.utils.encoding import force_bytes, force_str
# For more information, see the OGR C API source code: # 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. # The OGR_F_* routines are relevant here.
class Feature(GDALBase): class Feature(GDALBase):

View File

@ -8,7 +8,7 @@ from django.utils.encoding import force_str
# For more information, see the OGR C API source code: # 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. # The OGR_Fld_* routines are relevant here.
class Field(GDALBase): class Field(GDALBase):

View File

@ -1,7 +1,7 @@
""" """
The OGRGeometry is a wrapper for using the OGR Geometry class The OGRGeometry is a wrapper for using the OGR Geometry class
(see https://www.gdal.org/classOGRGeometry.html). OGRGeometry (see https://gdal.org/api/ogrgeometry_cpp.html#_CPPv411OGRGeometry).
may be instantiated when reading geometries from OGR Data Sources OGRGeometry may be instantiated when reading geometries from OGR Data Sources
(e.g. SHP files), or when given OGC WKT (a string). (e.g. SHP files), or when given OGC WKT (a string).
While the 'full' API is not present yet, the API is "pythonic" unlike 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: # 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. # The OGR_G_* routines are relevant here.
class OGRGeometry(GDALBase): class OGRGeometry(GDALBase):

View File

@ -15,7 +15,7 @@ from django.utils.encoding import force_bytes, force_str
# For more information, see the OGR C API source code: # 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. # The OGR_L_* routines are relevant here.
class Layer(GDALBase): class Layer(GDALBase):

View File

@ -12,9 +12,9 @@ from django.contrib.gis.gdal.prototypes.generation import (
) )
# For more detail about c function names and definitions see # For more detail about c function names and definitions see
# https://gdal.org/gdal_8h.html # https://gdal.org/api/raster_c_api.html
# https://gdal.org/gdalwarper_8h.html # https://gdal.org/doxygen/gdalwarper_8h.html
# https://www.gdal.org/gdal__utils_8h.html # https://gdal.org/api/gdal_utils.html
# Prepare partial functions that use cpl error codes # Prepare partial functions that use cpl error codes
void_output = partial(void_output, cpl=True) 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. # 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]) 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]) 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]) unlink_vsi_file = int_output(std_call('VSIUnlink'), [c_char_p])

View File

@ -5,7 +5,7 @@ from ctypes import (
c_double, c_float, c_int16, c_int32, c_ubyte, c_uint16, c_uint32, 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 = { GDAL_PIXEL_TYPES = {
0: 'GDT_Unknown', # Unknown or unspecified type 0: 'GDT_Unknown', # Unknown or unspecified type
1: 'GDT_Byte', # Eight bit unsigned integer 1: 'GDT_Byte', # Eight bit unsigned integer
@ -44,7 +44,7 @@ GDAL_RESAMPLE_ALGORITHMS = {
'Mode': 6, 'Mode': 6,
} }
# See https://www.gdal.org/gdal_8h.html#ace76452d94514561fffa8ea1d2a5968c # See https://gdal.org/api/raster_c_api.html#_CPPv415GDALColorInterp
GDAL_COLOR_TYPES = { GDAL_COLOR_TYPES = {
0: 'GCI_Undefined', # Undefined, default value, i.e. not known 0: 'GCI_Undefined', # Undefined, default value, i.e. not known
1: 'GCI_GrayIndex', # Grayscale 1: 'GCI_GrayIndex', # Grayscale

View File

@ -191,7 +191,7 @@ def get_ogr_db_string():
db = connections.databases['default'] db = connections.databases['default']
# Map from the django backend into the OGR driver name and database identifier # 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). # TODO: Support Oracle (OCI).
drivers = { drivers = {