Skip to content

Commit

Permalink
Drop 112 and 117 error checks since 1186 fixed them.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcom committed Aug 2, 2023
1 parent a7b263b commit c2679fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def _compute_polygon_linestring_contains(
final_result = contains + point_intersects_count == (
rhs_sizes_less_line_intersection_size
)

return final_result

def _compute_predicate(self, lhs, rhs, preprocessor_result):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import cudf

import cuspatial
from cuspatial.utils.column_utils import contains_only_linestrings


def sample_single_geometries(geometries):
Expand Down Expand Up @@ -98,15 +97,6 @@ def run_test(pred, lhs, rhs, gpdlhs, gpdrhs):

# Special case for error in GEOS MultiLineString contains
# https://github.com/libgeos/geos/issues/933
if (
pred != "intersects"
and contains_only_linestrings(lhs)
and contains_only_linestrings(rhs)
and (lhs.sizes > 2).any()
and (rhs.sizes > 2).any()
):
# 112 and 117 are wrong
got[[112, 117]] = False
assert (got.values_host == expected.values).all()

# Forward
Expand Down Expand Up @@ -177,7 +167,17 @@ def test_linestring_multilinestring(predicate): # noqa: F811
lines_rhs = sample_multiples_right(
features, linestring_linestring_dispatch_list
)

# Create multilinestrings from sample_multiples_right output
size = len(linestring_linestring_dispatch_list)

# Necessary to produce safe MultiLineStrings via affine_transform
gpdlines_rhs = lines_rhs.to_geopandas()
gpdlines_rhs[size::2] = gpdlines_rhs[size::2].apply(
lambda geom: affine_transform(geom, [1, 0, 0, 1, 1, 1])
)
lines_rhs = cuspatial.from_geopandas(gpdlines_rhs)

top_sizes = cp.concatenate(
[cp.array([0]), lines_rhs[:size].sizes.cumsum()]
)
Expand Down

0 comments on commit c2679fc

Please sign in to comment.