gauravbyte commented on code in PR #2455:
URL: https://github.com/apache/sedona/pull/2455#discussion_r2464815408
##########
python/tests/geopandas/test_geoseries.py:
##########
@@ -1954,6 +1954,83 @@ def test_contains(self):
def test_contains_properly(self):
pass
+ def test_relate(self):
+ s = GeoSeries(
+ [
+ Point(0, 0),
+ Point(0, 0),
+ LineString([(0, 0), (1, 1)]),
+ ]
+ )
+ s2 = GeoSeries(
+ [
+ Point(0, 0),
+ Point(1, 1),
+ LineString([(0, 0), (1, 1)]),
+ ]
+ )
+ # "ABCDEFGHI" DE-9 Format
+ # A Dimension of intersection
+ # B Dimension of interior intersection
+ # C Dimension of boundary intersection
+ # D Interior of first geometry intersects exterior of second
+ # E Exterior of first geometry intersects interior of second
+ # F Boundary of first geometry intersects exterior of second
+ # G Exterior of first geometry intersects boundary of second
+ # H Exterior of first geometry intersects exterior of second
+ # I Dimension of intersection for interiors
+ # 0 = false, 1 = point, 2 = line, F = area
+
+ # 1. Test with single geometry
+ point = Point(0, 0)
+ result = s.relate(point)
+ expected = pd.Series(["0FFFFFFF2", "0FFFFFFF2", "FF10F0FF2"])
+ assert_series_equal(result.to_pandas(), expected)
Review Comment:
Resolved in the commit
https://github.com/apache/sedona/pull/2455/commits/6f14d51392d141fe0dc18077508b3e5da022131e
--
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]