-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better support for binary predicates with large inputs. (#1166)
Closes #1142 This PR adds a few bugfixes and optimizations that improve performance when large `GeoSeries` are used with binary predicates. It also corrects a few errors in the predicate logic that were revealed when the size of the feature space increased by combining all possible features in the `dispatch_list`. Changes: `contains.py` - Add `pairwise_point_in_polygon` and steps to resemble `quadtree` results. `contains_geometry_processor.py` - Drop `is True` and add a TODO for future optimization. `feature_contains.py` - Refactor `_compute_polygon_linestring_contains` to handle `GeoSeries` containing `LineStrings` of varying lengths. `feature_contains_properly.py` - Add `pairwise_point_in_polygon` as default mode with documentation. - Add `PointMultiPointContains` which is needed by internal methods. `feature_crosses.py` - Drop extraneous `intersection` `feature_disjoint.py` - Add `PointPointDisjoint` and drop extraneous `intersections`. `feature_equals.py` - Fix LineStringLineStringEquals which wasn't properly handling LineStrings with varying lengths. `feature_intersects.py` - Drop extraneous `intersection` `feature_touches.py` - Fix LineStringLineStringTouches. It is slow and needs further optimization. - Fix PolygonPolygonTouches. It is also slow and needs further optimization. `geoseries.py` - Drop index from `input_types`. - Fix `point_indices` for `Point` type. - Optimize `reset_index` which was doing a host->device copy. `binpred_test_dispatch.py` - Add test case `test_binpred_large_examples.py` - Test large sets of all the dispatched tests together. `test_equals_only_binpreds.py` - Test corrections to input_types indexes. `test_binpred_large_examples.py` - Use the features from `test_dispatch` to create large `GeoSeries` and compare results with `GeoPandas`. `test_feature_groups.py` - Test each of the `dispatch_list` feature sets combined into a single GeoSeries. `binpred_utils.py` - Don't count hits when point and polygon indexes don't match (a bug in `_basic_contains_count`). - Optimize mask generation in `_points_and_lines_to_multipoints` `column_utils.py` - Optimize `contains_only` calls. Authors: - H. Thomson Comer (https://github.com/thomcom) Approvers: - Mark Harris (https://github.com/harrism) - Michael Wang (https://github.com/isVoid) URL: #1166
- Loading branch information
Showing
16 changed files
with
410 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.