GEOSFuncFactory
Lazy loading of GEOS functions.
Attributes
| Attribute | Type | Description |
|---|---|---|
| argtypes | list = null | A list of ctypes types representing the argument types accepted by the GEOS function. |
| restype | type = null | The ctypes type representing the return type of the GEOS function. |
| errcheck | callable = null | A callable used to validate the result of the GEOS function and handle potential errors. |
Constructor
Signature
def GEOSFuncFactory(
func_name: string,
restype: object = None,
errcheck: callable = None,
argtypes: list = None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| func_name | string | The name of the GEOS function to be loaded. |
| restype | object = None | The expected return type of the GEOS function. |
| errcheck | callable = None | An optional error checking function to validate the GEOS function output. |
| argtypes | list = None | A list of types representing the arguments the GEOS function accepts. |
Signature
def GEOSFuncFactory(
func_name: string,
restype: object,
errcheck: callable,
argtypes: list
)
Parameters
| Name | Type | Description |
|---|---|---|
| func_name | string | The name of the GEOS C function to be wrapped and called. |
| restype | object | The expected return type of the GEOS function, used for ctypes conversion. |
| errcheck | callable | A function used to validate the result and handle errors returned by the GEOS C function. |
| argtypes | list | A list of ctypes data types representing the required arguments for the GEOS function. |
Methods
func()
@classmethod
def func() - > [GEOSFunc](../prototypes/threadsafe/geosfunc.md?sid=django_contrib_gis_geos_prototypes_threadsafe_geosfunc)
Retrieves the thread-safe GEOSFunc instance, initializing it with the configured name, argument types, and return types upon first access.
Returns
| Type | Description |
|---|---|
[GEOSFunc](../prototypes/threadsafe/geosfunc.md?sid=django_contrib_gis_geos_prototypes_threadsafe_geosfunc) | A configured, thread-safe callable object representing the GEOS C function. |