pwrliang opened a new issue, #415: URL: https://github.com/apache/sedona-db/issues/415
This PR https://github.com/apache/sedona-db/pull/310 will implement GPU-based spatial join. Currently, the relate function of polygon-polygon is a port of [PGStrom](https://heterodb.github.io/pg-strom/), which is not robust and may produce inconsistent results compared to GEOS. These are failed tests. In addition, the polygon-polygon relate functions are not performant because they do not use something like prepared geometry to index line segments of every single polygon. ```c++ // FIXME: wkt1 is a closed polyline, which has no boundary according to JTS's // Mod2BoundaryNodeRule We have to implement a similar rule in gpuspatial to handle this // case correctly TEST(RelateTest, LinesClosedEmpty) { MultiLineString<point_t, index_t> m_ls1; LineString<point_t> ls2; std::string wkt1 = "MULTILINESTRING ((0 0, 0 1), (0 1, 1 1, 1 0, 0 0))"; std::string wkt2 = "LINESTRING EMPTY"; Context<point_t, index_t> ctx1, ctx2; ParseWKTMultiLineString(ctx1, wkt1.c_str(), m_ls1); ParseWKTLineString(ctx2, wkt2.c_str(), ls2); TestRelate(wkt1.c_str(), wkt2.c_str(), m_ls1, ls2); } ``` ```c++ /** * Case from https://github.com/locationtech/jts/issues/270 * Strictly, the lines cross, since their interiors intersect * according to the Orientation predicate. * However, the computation of the intersection point is * non-robust, and reports it as being equal to the endpoint * POINT (-10 0.0000000000000012) * For consistency the relate algorithm uses the intersection node topology. */ TEST(RelateTest, LineStringLineString10) { LineString<point_t> ls1; LineString<point_t> ls2; std::string wkt1 = "LINESTRING (0 0, -10 0.0000000000000012)"; std::string wkt2 = "LINESTRING (-9.999143275740073 -0.1308959557133398, -10 0.0000000000001054)"; Context<point_t, index_t> ctx1, ctx2; ParseWKTLineString(ctx1, wkt1.c_str(), ls1); ParseWKTLineString(ctx2, wkt2.c_str(), ls2); TestRelate(wkt1.c_str(), wkt2.c_str(), ls1, ls2); } ``` ```c++ // FIXME: IM__EXTER_BOUND_1D should not be set TEST(RelateTest, PolygonsNestedWithHole) { Polygon<point_t, index_t> poly1; Polygon<point_t, index_t> poly2; std::string wkt1 = "POLYGON ((40 60, 420 60, 420 320, 40 320, 40 60), (200 140, 160 220, 260 200, 200 140))"; std::string wkt2 = "POLYGON ((80 100, 360 100, 360 280, 80 280, 80 100))"; Context<point_t, index_t> ctx1, ctx2; ParseWKTPolygon(ctx1, wkt1.c_str(), poly1); ParseWKTPolygon(ctx2, wkt2.c_str(), poly2); TestRelate(wkt1.c_str(), wkt2.c_str(), poly1, poly2); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
