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
Polygon inaccuracy #15
Comments
I tested the original package mattbornski/tzwhere and it returns null. The problem isn't this package fault, but still, I guess people should know it happens. |
Please see mattbornski/tzwhere#8 for a potential explanation. |
I am working on a somewhat 'hacky' workaround for this. |
@cstich I'm interested, please keep us updated :) |
@benjie I just pushed the workaround to the development branch. It should work but I haven't done a lot of testing yet. You can see usage in the README.md. Basically you can tell the library now to look for a reasonable candidate if it doesn't find a proper timezone. If you have more than one candidate, it picks the closest. There are also potentially edge cases, where this doesn't work. |
Neat :) |
The code for the lookup hack is now in the master branch. |
I found out that, in some regions, the polygons are kind of inaccurate. In my case, I was testing with some points along Spain's southern coast and eventually they got outside the polygon. When I plotted the points and the polygon, I saw a 1km-wide land strip outside the polygon, where my point was located.
I don't know if its a bug or feature, but I think it's necessary to warn this package users that it may happen.
One suggestion I can make is adding actual "timezone polygons" and use them as fallback cases.
The text was updated successfully, but these errors were encountered: