-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected results #38
Comments
What precision value do you use? |
It's likely that it's too big. Try using something like |
Odd, with 0.000001 it went a bit further left: Code: const polylabel = require('polylabel');
const polygon = [[
[-122.4018194, 37.7909722],
[-122.4017442, 37.7905837],
[-122.4014781, 37.7906159],
[-122.4015202, 37.7908333],
[-122.401243, 37.7908668],
[-122.4012382, 37.7908417],
[-122.4011967, 37.7908047],
[-122.4011346, 37.7908122],
[-122.4011134, 37.7908568],
[-122.4011183, 37.7908818],
[-122.4010399, 37.7908913],
[-122.4009996, 37.7906828],
[-122.4007716, 37.7907104],
[-122.400845, 37.7910899],
[-122.4018194, 37.7909722]
]];
polylabel(polygon, 0.000001); Debugging it a bit 🤔
Must be missing something but surprised the distance is increasing, gotta read the paper. Also, unrelated, but on this line when there's no chance of a better solution, shouldn't it |
Ah! Nevermind about that last question, I see it still needs to see if there's a better cell in the queue / just doesn't want to add more split cells to look into. |
ooh, got it! Thank you! |
Hi folks!
Not sure I'm doing something wrong, but getting a somewhat unexpected pole of inaccessibility for a U-like polygon. The red marker is what I got from
polylabel()
:I tried changing the precision but didn't notice any difference. On version 1.0.2 of the js library.
Polygon in GeoJSON below:
Any thoughts/feedback appreciated!
Thanks,
The text was updated successfully, but these errors were encountered: