bartromgens / geojsoncontour

Convert matplotlib contour plots to geojson
MIT License
90 stars 31 forks source link

Fix: if contour had several separated areas of the same level contour… #26

Open toddscottik opened 1 month ago

toddscottik commented 1 month ago

…_to_geojson extract it as single feature, so all your contours of one level was connected to each other. Use contour.allsegs instead of collection.get_paths() allows to extract every distinct region to independent feature.

I faced with such problem and this is my fix for it. Probably, it can be improved by combining each segment of one level to one feature of type MultiLineString instead of independent LineString features.