shapely.is_valid_input#
- is_valid_input(geometry, **kwargs)#
Returns True if the object is a geometry or None
- Parameters:
- geometryany object or array_like
- **kwargs
For other keyword-only arguments, see the NumPy ufunc docs.
See also
is_geometry
checks if an object is a geometry
is_missing
checks if an object is None
Examples
>>> from shapely import GeometryCollection, Point >>> is_valid_input(Point(0, 0)) True >>> is_valid_input(GeometryCollection()) True >>> is_valid_input(None) True >>> is_valid_input(1.0) False >>> is_valid_input("text") False