Closed stonetip closed 6 years ago
If I'm counting correctly there are 10 interior rings in the json, but the image shows more than 10 holes, so the polygon cannot be valid. The algorithm cannot work with invalid polygons. Please correct me if I'm wrong.
I checked a simplified version of the feature for validity in both QGIS and ArcGIS and it seems fine. I also tested it as geoJSON in geoJSONLint. The label point still ended up in the same place. I even temporarily removed all the actual rings and that resulted in an even less likely point. Even with a simpler, definitely single polygonic shape, the results aren't as expected (which I've indicated by manually placing the encircled red point):
The attached is the verified and tested file for the original polygon: weyer1_S2.json.txt
So I've got that position with precision set to 0.01
:
I'm sorry for the noise with polygon validity.
You know, I've got to go back and look at my code. I'm thinking I either set the precision too coarse or left it out altogether (if that's possible). Because, judging by the image from @talaj above that placement is perfect.
I assume this was just a badly picked precision, right?
That was the case. Thanks.
I may misunderstand the way this algorithm works. And from reading the description, it is an impressive bit of work. However, this is just one of several examples where the output is unexpected:
weyer1.json.txt