Open michaelchin opened 3 months ago
Yes, I’ve encountered this error too. I think that it is a mistake to bundle different geometry types in with the plate model. My preference is that these COBs are modified and uploaded to Zenodo or alternatively convert all these polygons / multi polygons to line strings to enforce a uniform geometry type. We can discuss at the next GPlates meeting.
Yes, I’ve encountered this error too. I think that it is a mistake to bundle different geometry types in with the plate model. My preference is that these COBs are modified and uploaded to Zenodo or alternatively convert all these polygons / multi polygons to line strings to enforce a uniform geometry type. We can discuss at the next GPlates meeting.
Thanks Ben
The client seemed not unhappy about modifying their dataset to avoid this error. See the email with a subject "Muller2016 COB Terranes".
related to #226
Have we a solution to this? If I remember correctly, the consensus was to convert any polylines to polygons...?
It happened when I tried to plot COBs of Muller2016. The COBs contains polygon, multipolygon and linestring.
Traceback (most recent call last): File "/Users/mchin/workspace/gplately.git/tests-dir/unittest/./test_plot.py", line 107, in
main(show=True)
File "/Users/mchin/workspace/gplately.git/tests-dir/unittest/./testplot.py", line 83, in main
getattr(gplot, f"plot{key}")(
File "/Users/mchin/workspace/gplately.git/tests-dir/unittest/../../gplately/decorators.py", line 42, in wrapper
return func_pointer(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mchin/workspace/gplately.git/tests-dir/unittest/../../gplately/plot.py", line 818, in plot_continent_ocean_boundaries
return self.plot_feature(
^^^^^^^^^^^^^^^^^^
File "/Users/mchin/workspace/gplately.git/tests-dir/unittest/../../gplately/decorators.py", line 42, in wrapper
return func_pointer(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mchin/workspace/gplately.git/tests-dir/unittest/../../gplately/plot.py", line 698, in plot_feature
return self._plot_feature(ax, partial(self.get_feature, feature), kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mchin/workspace/gplately.git/tests-dir/unittest/../../gplately/plot.py", line 724, in _plot_feature
gdf = _clean_polygons(data=gdf, projection=ax.projection)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mchin/workspace/gplately.git/tests-dir/unittest/../../gplately/utils/plot_utils.py", line 392, in _clean_polygons
data = data.overlay(rects, how="difference")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mchin/micromamba/envs/gplately/lib/python3.11/site-packages/geopandas/geodataframe.py", line 2469, in overlay
return geopandas.overlay(
^^^^^^^^^^^^^^^^^^
File "/Users/mchin/micromamba/envs/gplately/lib/python3.11/site-packages/geopandas/tools/overlay.py", line 274, in overlay
raise NotImplementedError(
NotImplementedError: df1 contains mixed geometry types.