petern48 commented on code in PR #2386:
URL: https://github.com/apache/sedona/pull/2386#discussion_r2422365665


##########
python/tests/geopandas/test_match_geopandas_series.py:
##########
@@ -585,7 +585,10 @@ def test_is_ring(self):
             self.check_pd_series_equal(sgpd_result, gpd_result)
 
     def test_is_ccw(self):
-        pass
+        for geom in self.linestrings:

Review Comment:
   ```suggestion
           for geom in self.geoms:
   ```
   
   Since the docs explicitly specify the expected result for non-linear 
geometries is False, then we should test that they do correctly return that 
result.



##########
python/tests/geopandas/test_geoseries.py:
##########
@@ -882,7 +882,21 @@ def test_is_ring(self):
         self.check_pd_series_equal(result, expected)
 
     def test_is_ccw(self):
-        pass
+        s = GeoSeries(
+            [
+                LinearRing([(0, 0), (0, 1), (1, 1), (0, 0)]),
+                LinearRing([(0, 0), (1, 1), (0, 1), (0, 0)]),
+                LineString([(0, 0), (1, 1), (0, 1)]),
+                Point(3, 3),

Review Comment:
   ```suggestion
                   Point(3, 3),
                   LineString(),
                   MultiLineString([LineString([(0, 0), (1, 1), (0, 1), (-1, 
-1)])]),
                   GeometryCollection([LineString([(0, 0), (1, 1), (0, 1), (-1, 
-1)])]),
   ```
   
   A few more cases, I'd like to test. The first is `LINESTRING EMPTY`. The 
other two are all collections of a single linestring that would return True. 
Make sure to validate that the expected result is the same as geopandas.



##########
python/tests/geopandas/test_geoseries.py:
##########
@@ -882,7 +882,21 @@ def test_is_ring(self):
         self.check_pd_series_equal(result, expected)
 
     def test_is_ccw(self):
-        pass
+        s = GeoSeries(
+            [
+                LinearRing([(0, 0), (0, 1), (1, 1), (0, 0)]),
+                LinearRing([(0, 0), (1, 1), (0, 1), (0, 0)]),

Review Comment:
   ```suggestion
                   LinearRing([(0, 0), (1, 1), (0, 1), (0, 0)]),
                   LineString([(0, 0), (1, 1), (0, 1), (-1, -1)]),
   ```
   Let's add a line that isn't a full ring that should return True.



-- 
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]

Reply via email to