(func)
return wrapper
Decorator which helps avoid GEOS operations on null pointers.
Decorator which helps avoid GEOS operations on null pointers.
Decorator which helps avoid GEOS operations on null pointers .
def exceptNull(func):
    """Decorator which helps avoid GEOS operations on null pointers."""
    @wraps(func)
    def wrapper(*args, **kwargs):
        if not args[0]._geom or args[0].is_empty:
            raise ValueError("Null/empty geometry supports no operations")
        return func(*args, **kwargs)
    return wrapper
def exceptNull ( func ) : @ wraps ( func ) def wrapper ( * args , * * kwargs ) : if not args [ 0 ] . _geom or args [ 0 ] . is_empty : raise ValueError ( "Null/empty geometry supports no operations" ) return func ( * args , * * kwargs ) return wrapper