Returns the n-th geometry from a collection of geometries (0-indexed).
Returns the n-th geometry from a collection of geometries (0-indexed).If the index is non-negative, it returns the geometry at that index.
If the index is negative, it counts backward from the end of the collection (e.g., -1 returns the last geometry).
Returns None if the index is out of bounds.Note: Simple geometries act as length-1 collectionsNote: Using Shapely < 2.0, may lead to different results for empty simple geometries due to how
shapely interprets them.
Signature
get_geometry(index) -> GeoSeries
Parameters
int or array_like
required
Position of a geometry to be retrieved within its collection
Returns
GeoSeries
Simple geometries act as collections of length 1. Any out-of-range index value
returns None.