[GH-3017] Implement rotate#3018
Conversation
|
Hey @petern48, I have tried to follow along with the instructions on ticket 2230 and PR example 2231 but if I missed anything on this please let me know! Thank you for putting those instructions together they were very helpful! |
petern48
left a comment
There was a problem hiding this comment.
Thanks for working on this. I've done an initial scan and left some feedback
| Examples | ||
| -------- | ||
| >>> from shapely.geometry import Point, LineString, Polygon | ||
| >>> s = geopandas.GeoSeries( |
There was a problem hiding this comment.
| >>> s = geopandas.GeoSeries( | |
| >>> from sedona.spark.geopandas import GeoSeries | |
| >>> s = GeoSeries( |
we should update the import for sedona instead of geopandas
| sgpd_result = GeoSeries(geom).rotate(45, origin=(0, 0)) | ||
| gpd_result = gpd.GeoSeries(geom).rotate(45, origin=(0, 0)) |
There was a problem hiding this comment.
can we update these to an origin other than (0, 0), just to make sure it works? maybe something like (1, 2).
can we also add add a case for testing "centroid" and a Point() object as input for origin field to make sure they work?
| gpd_s = gpd.GeoSeries(geoms) | ||
|
|
||
| # Test default (degrees, origin='center') | ||
| self.check_sgpd_equals_gpd(s.rotate(90), gpd_s.rotate(90)) |
There was a problem hiding this comment.
test_geoseries.py should be testing the hard-coded expected outputs instead of comparing it directly to the result of what geopandas returns (that's what test_match_geopandas_series.py` is for. Could you update all of these examples to compare to the hard-coded expected output geometries?
Did you read the Contributor Guide?
Is this PR related to a ticket?
[GH-3017] Implement rotate. Closes Geopandas: Implementrotate#3017What changes were proposed in this PR?
Implement rotate
How was this patch tested?
Added tests, verified success of all tests with:
117 passed, 44108 warnings in 140.69s (0:02:20)
Verified formatting with:
Did this PR include necessary documentation updates?