starepandas.STAREDataFrame.stare_intersection#

STAREDataFrame.stare_intersection(other)#

Returns a STARESeries of the (STARE) spatial intersection of self with other.

Parameters
otherArray-like

The STARE index value collection representing the object to find the intersection with.

Returns
intersectionSTARESeries

A series of STARE index values representing the STARE interesection of each feature with other

Examples

>>> import shapely
>>> nodes1 = [[102, 33], [101, 35], [105, 34], [104, 33], [102, 33]]
>>> nodes2 = [[102, 34], [106, 35], [106, 33], [102, 33.5], [102, 34]]
>>> polygon1 = shapely.geometry.Polygon(nodes1)
>>> polygon2 = shapely.geometry.Polygon(nodes2)
>>> sids1 = starepandas.sids_from_polygon(polygon1, level=5, force_ccw=True)
>>> sids2 = starepandas.sids_from_polygon(polygon2, level=5, force_ccw=True)
>>> df = starepandas.STAREDataFrame(sids=[sids1])
>>> df.stare_intersection(sids2).iloc[0]
array([694117292568477701, 701435641962954757, 701998591916376069])