From 397b4874ab0707d3fb86bd722c03fe6d98dafffd Mon Sep 17 00:00:00 2001 From: "H. Thomson Comer" Date: Wed, 15 Feb 2023 11:31:45 -0600 Subject: [PATCH] Remove dead code. --- .../cuspatial/core/binpreds/binpreds.py | 40 +------------------ 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/python/cuspatial/cuspatial/core/binpreds/binpreds.py b/python/cuspatial/cuspatial/core/binpreds/binpreds.py index 7466e3627..1429e9e87 100644 --- a/python/cuspatial/cuspatial/core/binpreds/binpreds.py +++ b/python/cuspatial/cuspatial/core/binpreds/binpreds.py @@ -213,21 +213,8 @@ def postprocess(self, point_indices, point_result): return cudf.Series([False] * len(self.lhs)) result = cudf.DataFrame({"idx": point_indices, "pip": point_result}) df_result = result - # Discrete math recombination - if contains_only_linestrings(self.rhs): - df_result = ( - result.groupby("idx").sum().sort_index() - == result.groupby("idx").count().sort_index() - ) - elif contains_only_polygons(self.rhs) or contains_only_multipoints( - self.rhs - ): - partial_result = result.groupby("idx").sum() - df_result = (partial_result > 0) & ( - partial_result < len(point_result) - ) - else: - df_result = result.groupby("idx").sum() > 1 + partial_result = result.groupby("idx").sum() + df_result = (partial_result > 0) & (partial_result < len(point_result)) point_result = cudf.Series( df_result["pip"], index=cudf.RangeIndex(0, len(df_result)) ) @@ -247,26 +234,3 @@ def preprocess(self, lhs, rhs): if contains_only_polygons(rhs): (lhs, rhs) = (rhs, lhs) return super().preprocess(lhs, rhs) - - def postprocess(self, point_indices, point_result): - """Postprocess the output GeoSeries to ensure that they are of the - correct type for the predicate.""" - result = cudf.DataFrame({"idx": point_indices, "pip": point_result}) - df_result = result - # Discrete math recombination - if ( - contains_only_linestrings(self.rhs) - or contains_only_polygons(self.rhs) - or contains_only_multipoints(self.rhs) - ): - # process for completed linestrings, polygons, and multipoints. - # Not necessary for points. - df_result = ( - result.groupby("idx").sum().sort_index() - == result.groupby("idx").count().sort_index() - ) - point_result = cudf.Series( - df_result["pip"], index=cudf.RangeIndex(0, len(df_result)) - ) - point_result.name = None - return point_result