The point returned for the polygon
var polygon = [[[12.8569046,43.7153127],[12.85684,43.7153125],[12.8568395,43.7152068],[12.8568758,43.7152072],[12.8568766,43.7151763],[12.8570085,43.7151777],[12.8570083,43.7152309],[12.8569055,43.7152302],[12.8569046,43.7153127]]];
is not a Point inside the polygon itself.
var point = polylabel(polygon,1,true);
debug output:
found best 0 after 2 probes num probes: 2 best distance: -0.0000023558598186856006
sample image with the returned point outside the given polygon:
The point returned for the polygon
var polygon = [[[12.8569046,43.7153127],[12.85684,43.7153125],[12.8568395,43.7152068],[12.8568758,43.7152072],[12.8568766,43.7151763],[12.8570085,43.7151777],[12.8570083,43.7152309],[12.8569055,43.7152302],[12.8569046,43.7153127]]];
is not a Point inside the polygon itself.var point = polylabel(polygon,1,true);
debug output:found best 0 after 2 probes num probes: 2 best distance: -0.0000023558598186856006
sample image with the returned point outside the given polygon: