Copilot commented on code in PR #2267:
URL: https://github.com/apache/sedona/pull/2267#discussion_r2268061145


##########
python/sedona/spark/geopandas/geoseries.py:
##########
@@ -2351,32 +2351,20 @@ def to_crs(
 
         from pyproj import CRS
 
-        old_crs = self.crs
-        if old_crs is None:
-            raise ValueError(
-                "Cannot transform naive geometries.  "
-                "Please set a crs on the object first."
-            )
-        assert isinstance(old_crs, CRS)
-
         if crs is not None:
             crs = CRS.from_user_input(crs)
         elif epsg is not None:
             crs = CRS.from_epsg(epsg)
         else:
             raise ValueError("Must pass either crs or epsg.")
 
-        # skip if the input CRS and output CRS are the exact same
-        if old_crs.is_exact_same(crs):
-            return self
-
         spark_expr = stf.ST_Transform(
             self.spark.column,

Review Comment:
   The removal of the source CRS parameter from ST_Transform may cause issues. 
Sedona's ST_Transform typically requires both source and target CRS to function 
correctly. Without the source CRS, the transformation may fail or produce 
incorrect results for geometries that don't have an embedded SRID.



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