…_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.
…_to_geojson extract it as single feature, so all your contours of one level was connected to each other. Use
contour.allsegs
instead ofcollection.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.