zwrankin / porygon

A Python package to manipulate and visualize geospatial data
MIT License
2 stars 0 forks source link

Speed up point-to-polygon functions #8

Open zwrankin opened 4 years ago

zwrankin commented 4 years ago

The process of matching points to polygons is computationally expensive and can be slow. H3 has a snappy C backend, but my other constructors use geopandas/shapely's within function that can be slow. For the Chicago traffic accident dataset, matching 200K records to 80 census tracts takes 10 minutes.

This is an open issue in geopandas: https://github.com/geopandas/geopandas/issues/430 They are currently (as of October 2019) working to integrate the optimized pygeos library into geopandas as per https://github.com/geopandas/geopandas/issues/1155.

At this time I do not plan to directly integrating pygeos into porygon, instead hoping that the integration into geopandas goes smoothly.