holoviz / spatialpandas

Pandas extension arrays for spatial/geometric operations
BSD 2-Clause "Simplified" License
308 stars 25 forks source link

intersection and spatial join support for Point arrays #21

Closed jonmmease closed 4 years ago

jonmmease commented 4 years ago

This PR adds an initial partial implementation of the intersects and sjoin operations.

From the updated Overview notebook:

Spatialpandas has limited support for computing intersections between shapes. Currently, intersects can be called on Point arrays and can used to compare to any other scalar geometry type.

Spatialpandas has limited spatial join support using the sjoin function. Currently, the left_df argument to sjoin must be a GeoDataFrame or DaskGeoDataFrame with an active Point geometry column. The right_df argument must be a GeoDataFrame (not DaskGeoDataFrame), but it may have any geometry type.

The most common use-case that this functionality is designed to support is performing a spatial join between a large GeoDataFrame or DaskGeoDataFrame of Points and a small to moderate sized GeoDataFrame of (Multi)Polygons.

As usual, the new functionality is tested against geopandas using hypothesis property tests.