odc.geo.geom.count_coordinates
- odc.geo.geom.count_coordinates(g)[source]
Count the number of coordinates in a geometry.
- Parameters:
g (
Union[Geometry,Iterable[Geometry],BoundingBox]) – Geometry, iterable of geometries, or bounding box to count coordinates for- Return type:
- Returns:
Number of coordinates in the input geometry(ies)
- Examples:
>>> point = geom.point(10, 20, crs="EPSG:4326") >>> count_coordinates(point) 1 >>> line = geom.line([(0, 0), (1, 1), (2, 2)], crs="EPSG:4326") >>> count_coordinates(line) 3 >>> bbox = geom.BoundingBox(0, 0, 10, 10, crs="EPSG:4326") >>> count_coordinates(bbox) 4 >>> geometries = [point, line] >>> count_coordinates(geometries) 4