pyinterp.geometry.cartesian.algorithms.num_geometries#
- pyinterp.geometry.cartesian.algorithms.num_geometries(geometry: pyinterp.core.geometry.cartesian.Point) int#
- pyinterp.geometry.cartesian.algorithms.num_geometries(geometry: pyinterp.core.geometry.cartesian.Segment) int
- pyinterp.geometry.cartesian.algorithms.num_geometries(geometry: pyinterp.core.geometry.cartesian.Box) int
- pyinterp.geometry.cartesian.algorithms.num_geometries(geometry: pyinterp.core.geometry.cartesian.LineString) int
- pyinterp.geometry.cartesian.algorithms.num_geometries(geometry: pyinterp.core.geometry.cartesian.Ring) int
- pyinterp.geometry.cartesian.algorithms.num_geometries(geometry: pyinterp.core.geometry.cartesian.Polygon) int
- pyinterp.geometry.cartesian.algorithms.num_geometries(geometry: pyinterp.core.geometry.cartesian.MultiPoint) int
- pyinterp.geometry.cartesian.algorithms.num_geometries(geometry: pyinterp.core.geometry.cartesian.MultiLineString) int
- pyinterp.geometry.cartesian.algorithms.num_geometries(geometry: pyinterp.core.geometry.cartesian.MultiPolygon) int
Returns the number of geometries in a multi-geometry or 1 for single geometries.
For multi-geometries (MultiPoint, MultiLineString, MultiPolygon), returns the number of component geometries. For single geometries, returns 1.
- Parameters:
geometry – Geometric object to count geometries in.
- Returns:
The number of geometries.