sids_from_geoseries#
- sids_from_geoseries(series, level, convex=False, force_ccw=True, n_partitions=1, num_workers=None)#
Takes a GeoSeries and returns a corresponding series of sets of trixel indices
- Parameters
- series: geopandas.GeoSeries
A geopandas.GeoSeries containing features to look (sets of) STARE indices up for
- level: int
STARE level
- convex: bool
Toggle if STARE indices for the convex hull rather than the G-Ring should be looked up
- force_ccw: bool
Toggle if a counterclockwise orientation of the geometries should be enforced
- n_partitions: int
Number of workers used to lookup STARE indices in parallel
- num_workers: int
number of workers
- Returns
- sids
A numpy array of length=len(gdf.index) holding the set of stare indices of each geometry
Examples
>>> import geopandas >>> import starepandas >>> world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres')) >>> germany = world[world.name=='Germany'] >>> starepandas.sids_from_geoseries(germany.geometry, level=3, convex=True) 121 [4251398048237748227, 4269412446747230211, 427... Name: sids, dtype: object