geojsoncontour icon indicating copy to clipboard operation
geojsoncontour copied to clipboard

Right-hand rule polygons not followed with most recent matplotlib versions

Open AugustinMortier opened this issue 2 years ago • 4 comments

Hello from Norway ! It looks like, since matplotlib 3.8.?, the geojson files computed with geojsoncontour are not always following the right-hand rule. This was probably taken care of by matplotlib before, but recent release notes suggest some "revert contour" deprecation.

AugustinMortier avatar Dec 04 '23 19:12 AugustinMortier

https://pypi.org/project/geojson-rewind/ seems to be able to rewind geojson polygons. Could be used to fix this, or provide tips on how to fix this.

bartromgens avatar Jul 01 '24 19:07 bartromgens

When using geojsoncontour.contour_to_geojson on contours created by plt.contour from matplotlib>=3.8.0, different isolines (with same values) were connected together for my usecase:

Screenshot 2024-07-12 at 14 20 53

After downgrading to matplotlib==3.7.3, the output from geojsoncontour.contour_to_geojson is normal again:

Screenshot 2024-07-12 at 14 21 10

bertcoerver avatar Jul 12 '24 12:07 bertcoerver

They are some breaking changes concerning contourf method in the 3.8 release of matplotlib https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.8.0.html#contourset-is-now-a-single-collection

maxdow avatar Jul 12 '24 16:07 maxdow