Are spatialpandas
and antimeridian
optional dependencies?
#756
-
Hello, I'm going through the Visualizing Grid Topology notebook in the documentation. I tried to run File ~/miniforge3/envs/xcdat_test_uxarray/lib/python3.12/site-packages/uxarray/grid/geometry.py:134, in _build_geodataframe_with_antimeridian(polygon_shells, antimeridian_face_indices)
131 """Builds a ``spatialpandas.GeoDataFrame`` including any faces that cross
132 the antimeridian."""
133 # import optional dependencies
--> 134 from spatialpandas.geometry import MultiPolygonArray
135 from spatialpandas import GeoDataFrame
137 polygons = _build_corrected_shapely_polygons(
138 polygon_shells, antimeridian_face_indices
139 )
ModuleNotFoundError: No module named 'spatialpandas' I assumed that I'm just making sure if I should install |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I installed File ~/miniforge3/envs/xcdat_test_uxarray/lib/python3.12/site-packages/uxarray/grid/geometry.py:149, in _build_corrected_shapely_polygons(polygon_shells, antimeridian_face_indices)
148 def _build_corrected_shapely_polygons(polygon_shells, antimeridian_face_indices):
--> 149 import antimeridian
150 from shapely import polygons as Polygons
152 # list of shapely Polygons representing each face in our grid
ModuleNotFoundError: No module named 'antimeridian' |
Beta Was this translation helpful? Give feedback.
-
I also see this GitHub issue reference the same things: #461 (comment) |
Beta Was this translation helpful? Give feedback.
-
Both of those modules are indeed required. I'll look into getting the recipe fix. Thank you for catching this! |
Beta Was this translation helpful? Give feedback.
Hi @tomvothecoder
Both of those modules are indeed required. I'll look into getting the recipe fix.
Thank you for catching this!