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


##########
python/tests/geopandas/test_match_geopandas_series.py:
##########
@@ -878,7 +878,48 @@ def test_force_2d(self):
         self.check_sgpd_equals_gpd(sgpd_3d, gpd_3d)
 
     def test_force_3d(self):
-        pass
+        # force_3d was added from geopandas 1.0.0
+        if parse_version(gpd.__version__) < parse_version("1.0.0"):
+            pytest.skip("geopandas force_3d requires version 1.0.0 or higher")
+        # 1) Promote 2D to 3D with z = 4
+        for geom in self.geoms:
+            if isinstance(geom[0], (LinearRing, GeometryCollection, 
MultiPolygon)):

Review Comment:
   Ah, I realize you're not *yet* familiar with iterating with Java changes. 
You need to update your code to reflect the changes I made in this 
[PR](https://github.com/apache/sedona/pull/2526). I'm guessing you likely 
followed this 
[guide](https://github.com/apache/sedona/blob/0523fbdc600d86b8088feba39db829a5dccc11d8/docs/setup/compile.md#L4)
 for dev env setup, since it was mentioned in the original geopandas EPIC 
issue. 
   
   1. First, make sure you pull in the latest main and merge it into this 
branch.
   2. Now, even after you get the changes, you need to rebuild the Sedona JAR 
and move it to your SPARK_HOME directory. These are the two commands in section 
3) of those compile docs.
   
   Basically, you just need to redo the 2 commands in section 3, and then the 
changes should be reflected when you run pytest.
   ```
   mvn clean install -DskipTests -Dgeotools
   cp spark-shaded/target/sedona-spark-shaded-*.jar $SPARK_HOME/jars/
   ```
   
   Note, if you run into trouble with the first command succeeding, you may 
need to specify versions in the `mvn` build command. e.g. Here's what I run 
each time: `mvn clean install -DskipTests -Dgeotools -Dspark=3.4 -Pscala2.12`. 
The same command likely would still work for you if you set up the same 
versions as in those docs. @chay0112 Give it a try. Knowing how to do this is 
also very helpful for getting into fixing small Java bugs, like I had done 
earlier.



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