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


##########
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:
   Hi Peter, Thanks for your suggestions.
   I believe if we remove Multipolygon and GeometryCollections the test would 
still fail for geoms, something like below
   `FAILED
   
============================================================================== 
FAILURES 
==============================================================================
   _______________________________________________________________ 
TestMatchGeopandasSeries.test_force_3d 
_______________________________________________________________
   
   python/tests/geopandas/test_match_geopandas_series.py:890: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ 
   python/tests/geopandas/test_geopandas_base.py:70: in check_sgpd_equals_gpd
       cls.assert_geometry_almost_equal(a, e, tolerance)
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ 
   
   cls = <class 
'tests.geopandas.test_match_geopandas_series.TestMatchGeopandasSeries'>
   left_geom = <POLYGON Z ((0 0 4, 0 1 4, 1 0 4, 0 0 4), (0.1 0.1 4, 0.1 0.2 4, 
0.2 0.1 4, ...>
   right_geom = <MULTIPOLYGON Z (((0 0 4, 0 1 4, 1 0 4, 0 0 4), (0.1 0.1 4, 0.1 
0.2 4, 0.2 0...>, tolerance = 0.01
   
   ValueError: Geometry equality check failed for POLYGON Z ((0 0 4, 0 1 4, 1 0 
4, 0 0 4), (0.1 0.1 4, 0.1 0.2 4, 0.2 0.1 4, 0.1 0.1 4)) and MULTIPOLYGON Z 
(((0 0 4, 0 1 4, 1 0 4, 0 0 4), (0.1 0.1 4, 0.1 0.2 4, 0.2 0.1 4, 0.1 0.1 4)))
   `
   



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