@@ -730,8 +730,35 @@ def envelope(self):
730730 # def set_precision(self, grid_size, mode="valid_output"):
731731 # raise NotImplementedError("This method is not implemented yet.")
732732
733- # def representative_point(self):
734- # raise NotImplementedError("This method is not implemented yet.")
733+ def representative_point (self ):
734+ """Return a point that is guaranteed to be within each geometry.
735+
736+ Returns a ``GeoSeries`` of (cheaply computed) points that are guaranteed
737+ to be within each geometry.
738+
739+ Returns
740+ -------
741+ GeoSeries
742+
743+ Examples
744+ --------
745+ >>> from sedona.spark.geopandas import GeoSeries
746+ >>> from shapely.geometry import Polygon, LineString, Point
747+ >>> s = GeoSeries(
748+ ... [
749+ ... Polygon([(0, 0), (1, 0), (1, 1), (0, 1)]),
750+ ... LineString([(0, 0), (1, 1), (1, 0)]),
751+ ... Point(0, 0),
752+ ... ]
753+ ... )
754+ >>> s.representative_point()
755+ 0 POINT (0.5 0.5)
756+ 1 POINT (1 0.5)
757+ 2 POINT (0 0)
758+ dtype: geometry
759+
760+ """
761+ return _delegate_to_geometry_column ("representative_point" , self )
735762
736763 def minimum_bounding_circle (self ):
737764 """Return a ``GeoSeries`` of geometries representing the minimum bounding
@@ -803,8 +830,35 @@ def minimum_bounding_radius(self):
803830 # def minimum_clearance(self):
804831 # raise NotImplementedError("This method is not implemented yet.")
805832
806- # def normalize(self):
807- # raise NotImplementedError("This method is not implemented yet.")
833+ def normalize (self ):
834+ """Return a ``GeoSeries`` of normalized geometries.
835+
836+ Normalization reorganizes the coordinates in a consistent order,
837+ which can be useful for comparison purposes.
838+
839+ Returns
840+ -------
841+ GeoSeries
842+
843+ Examples
844+ --------
845+ >>> from sedona.spark.geopandas import GeoSeries
846+ >>> from shapely.geometry import Polygon, LineString, Point
847+ >>> s = GeoSeries(
848+ ... [
849+ ... Polygon([(0, 0), (1, 0), (1, 1), (0, 1)]),
850+ ... LineString([(0, 0), (1, 1)]),
851+ ... Point(0, 0),
852+ ... ]
853+ ... )
854+ >>> s.normalize()
855+ 0 POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))
856+ 1 LINESTRING (0 0, 1 1)
857+ 2 POINT (0 0)
858+ dtype: geometry
859+
860+ """
861+ return _delegate_to_geometry_column ("normalize" , self )
808862
809863 def make_valid (self , * , method = "linework" , keep_collapsed = True ):
810864 """Repairs invalid geometries.
@@ -869,8 +923,32 @@ def make_valid(self, *, method="linework", keep_collapsed=True):
869923 "make_valid" , self , method = method , keep_collapsed = keep_collapsed
870924 )
871925
872- # def reverse(self):
873- # raise NotImplementedError("This method is not implemented yet.")
926+ def reverse (self ):
927+ """Return a ``GeoSeries`` with the coordinate order reversed.
928+
929+ Returns
930+ -------
931+ GeoSeries
932+
933+ Examples
934+ --------
935+ >>> from sedona.spark.geopandas import GeoSeries
936+ >>> from shapely.geometry import LineString, Point
937+ >>> s = GeoSeries(
938+ ... [
939+ ... LineString([(0, 0), (1, 1), (2, 2)]),
940+ ... LineString([(0, 0), (1, 0), (1, 1)]),
941+ ... Point(0, 0),
942+ ... ]
943+ ... )
944+ >>> s.reverse()
945+ 0 LINESTRING (2 2, 1 1, 0 0)
946+ 1 LINESTRING (1 1, 1 0, 0 0)
947+ 2 POINT (0 0)
948+ dtype: geometry
949+
950+ """
951+ return _delegate_to_geometry_column ("reverse" , self )
874952
875953 def segmentize (self , max_segment_length ):
876954 """Returns a ``GeoSeries`` with vertices added to line segments based on
0 commit comments