piyushka-ally commented on code in PR #2772:
URL: https://github.com/apache/sedona/pull/2772#discussion_r2969909543
##########
python/sedona/spark/geopandas/base.py:
##########
@@ -489,9 +489,36 @@ def is_ring(self):
"""
return _delegate_to_geometry_column("is_ring", self)
- # @property
- # def is_ccw(self):
- # raise NotImplementedError("This method is not implemented yet.")
+ @property
+ def is_ccw(self):
+ """Return True for Polygon/MultiPolygon geometries whose exterior ring
+ is counter-clockwise oriented.
+
+ Returns False for non-polygon geometry types (e.g. LineString, Point).
+
+ Notes
+ -----
+ Unlike geopandas, which also supports LinearRing inputs, this
+ implementation uses Sedona's ``ST_IsPolygonCCW`` which only recognises
+ Polygon and MultiPolygon geometries. All other geometry types return
+ ``False``.
Review Comment:
Yes please.
No worries, I will try to pick some more functions I can implement. Thanks
for reviewing my PR.
--
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]