Skip to content

Commit

Permalink
GmMultiPolyIntersector for python - fix CI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mkennard-aquaveo committed Jan 3, 2024
1 parent ac3e692 commit 9a65a1c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xmsgrid/python/geometry/GmMultiPolyIntersector_py.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void initGmMultiPolyIntersector(py::module &m) {
BSHP<xms::VecInt2d> vec_polys = xms::VecInt2dFromPyIter(polys);
BSHP<xms::GmMultiPolyIntersectionSorterTerse> sorter(new xms::GmMultiPolyIntersectionSorterTerse);
BSHP<xms::GmMultiPolyIntersector> rval(xms::GmMultiPolyIntersector::New(*vec_pts, *vec_polys, sorter, starting_id));
rval->SetQuery(query);
rval->SetQuery(query == 'covered_by' ? GMMPIQ_COVEREDBY : GMMPIQ_INTERSECTS);
return rval;
}), py::arg("points"), py::arg("polys"), py::arg("starting_id") = 1, py::arg("query") = 'covered_by')
.def_property("query", &xms::GmMultiPolyIntersector::GetQuery, &xms::GmMultiPolyIntersector::SetQuery);
Expand All @@ -44,9 +44,9 @@ void initGmMultiPolyIntersector(py::module &m) {
// ---------------------------------------------------------------------------
gmMpi.def("TraverseLineSegment", [](xms::GmMultiPolyIntersector &self, double x1, double y1,
double x2, double y2) -> py::tuple {
std::vector<int> polyids;
std::vector<double> tvalues;
std::vector<Pt3d> pts;
xms::VecInt polyids;
xms::VecDbl tvalues;
xms::VecPt3d pts;
self.TraverseLineSegment(x1, y1, x2, y2, polyids, tvalues, pts);
return py::make_tuple(xms::PyIterFromVecInt(polyids), xms::PyIterFromVecDbl(tvalues), xms::PyIterFromVecPt3d(pts));
}, py::arg("x1"), py::arg("y1"), py::arg("x2"), py::arg("y2"));
Expand Down

0 comments on commit 9a65a1c

Please sign in to comment.