sids_from_gdf#

sids_from_gdf(gdf, level, convex=False, force_ccw=True, n_partitions=1, num_workers=None)#

Takes a GeoDataFrame and returns a corresponding series of sets of trixel indices

Parameters:
gdf: geopandas.GeoDataFrame

A dataframe 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

num_workers: int

Number of workers used to lookup STARE indices in parallel

Returns:
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'))
>>> italy = world[world.name=='Italy']
>>> starepandas.sids_from_gdf(italy, level=3, convex=False, force_ccw=True, num_workers=1)
141    [4269412446747230211, 4548635623644200963, 456...
Name: sids, dtype: object