Complex polygon only return two parts
DenisCarriere opened this issue · comments
Complex polygons should return multiple parts (only return with two parts).
From the image you added it indeed looks like the algorithm failed to correctly identify the simple polygons of the input polygons. I advise you to turn on the debug parameter and follow how the algorithm walks over the edges. This way you can find out where it makes its mistake!
@mclaeysb kinda hard a troubleshoot a library I didn't build, I would have no clue where to start. This why I added the dynamic testing in test/in
, here are the results of test/out/complex.geojson
Just had some time to look in to this. Was due the dependancy geojson-polygon-self-intersections
which had some trouble with the exactly vertical line (meridian). Fixed that issue in the dependancy and published to npm. Running npm update
inside the simplepolygon
directory solves this.