shapely.is_prepared

Contents

shapely.is_prepared#

is_prepared(geometry, **kwargs)#

Returns True if a Geometry is prepared.

Note that it is not necessary to check if a geometry is already prepared before preparing it. It is more efficient to call prepare directly because it will skip geometries that are already prepared.

This function will return False for missing geometries (None).

Parameters:
geometryGeometry or array_like
**kwargs

See NumPy ufunc docs for other keyword arguments.

See also

is_valid_input

check if an object is a geometry or None

prepare

prepare a geometry

Examples

>>> from shapely import Point, prepare
>>> geometry = Point(0, 0)
>>> is_prepared(Point(0, 0))
False
>>> prepare(geometry)
>>> is_prepared(geometry)
True
>>> is_prepared(None)
False