module documentation

This module houses the error-checking routines used by the GDAL ctypes prototypes.
Function arg​_byref Return the pointer argument's by-reference value.
Function check​_arg​_errcode The error code is returned in the last argument, by reference. Check its value with check_err before returning the result.
Function check​_const​_string Similar functionality to check_string, but does not free the pointer.
Function check​_envelope Check a function that returns an OGR Envelope by reference.
Function check​_errcode Check the error code returned (c_int).
Function check​_geom Check a function that returns a geometry.
Function check​_geom​_offset Check the geometry at the given offset in the C parameter list.
Function check​_pointer Make sure the result pointer is valid.
Function check​_srs Undocumented
Function check​_str​_arg This is for the OSRGet[Angular|Linear]Units functions, which require that the returned string pointer not be freed. This returns both the double and string values.
Function check​_string No summary
Function ptr​_byref Return the pointer argument passed in by-reference.
def arg_byref(args, offset=-1):
Return the pointer argument's by-reference value.
def check_arg_errcode(result, func, cargs, cpl=False):
The error code is returned in the last argument, by reference. Check its value with check_err before returning the result.
def check_const_string(result, func, cargs, offset=None, cpl=False):
Similar functionality to check_string, but does not free the pointer.
def check_envelope(result, func, cargs, offset=-1):
Check a function that returns an OGR Envelope by reference.
def check_errcode(result, func, cargs, cpl=False):
Check the error code returned (c_int).
def check_geom(result, func, cargs):
Check a function that returns a geometry.
def check_geom_offset(result, func, cargs, offset=-1):
Check the geometry at the given offset in the C parameter list.
def check_pointer(result, func, cargs):
Make sure the result pointer is valid.
def check_srs(result, func, cargs):

Undocumented

def check_str_arg(result, func, cargs):
This is for the OSRGet[Angular|Linear]Units functions, which require that the returned string pointer not be freed. This returns both the double and string values.
def check_string(result, func, cargs, offset=-1, str_result=False):
Check the string output returned from the given function, and free the string pointer allocated by OGR. The str_result keyword may be used when the result is the string pointer, otherwise the OGR error code is assumed. The offset keyword may be used to extract the string pointer passed in by-reference at the given slice offset in the function arguments.
def ptr_byref(args, offset=-1):
Return the pointer argument passed in by-reference.