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 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...
Function ptr_byref Return the pointer argument passed in by-reference.
def arg_byref(args, offset=-1): (source)

Return the pointer argument's by-reference value.

def check_arg_errcode(result, func, cargs, cpl=False): (source)

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): (source)

Similar functionality to `check_string`, but does not free the pointer.

def check_envelope(result, func, cargs, offset=-1): (source)

Check a function that returns an OGR Envelope by reference.

def check_errcode(result, func, cargs, cpl=False): (source)

Check the error code returned (c_int).

def check_geom(result, func, cargs): (source)

Check a function that returns a geometry.

def check_geom_offset(result, func, cargs, offset=-1): (source)

Check the geometry at the given offset in the C parameter list.

def check_pointer(result, func, cargs): (source)

Make sure the result pointer is valid.

def check_srs(result, func, cargs): (source)

Undocumented

def check_str_arg(result, func, cargs): (source)

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): (source)

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): (source)

Return the pointer argument passed in by-reference.