Skip to content
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

Closed
paulochf opened this issue Apr 15, 2015 · 8 comments
Closed

Polygon inaccuracy #15

paulochf opened this issue Apr 15, 2015 · 8 comments

Comments

@paulochf
Copy link

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.

@paulochf
Copy link
Author

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.

@benjie
Copy link

benjie commented Apr 15, 2015

Please see mattbornski/tzwhere#8 for a potential explanation.

@cstich
Copy link
Contributor

cstich commented Jun 18, 2015

I am working on a somewhat 'hacky' workaround for this.

@benjie
Copy link

benjie commented Jun 18, 2015

@cstich I'm interested, please keep us updated :)

@cstich
Copy link
Contributor

cstich commented Jun 19, 2015

@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.

@benjie
Copy link

benjie commented Jun 19, 2015

Neat :)

@cstich
Copy link
Contributor

cstich commented Jul 14, 2015

The code for the lookup hack is now in the master branch.

@cstich cstich closed this as completed Jul 14, 2015
@antoniogamizbadger
Copy link

Hi, is this hack still on the package? I came here with a really similar problem:

tzwhere_instance.tzNameAt(40.689249, -74.0445)

That does not return the timezone, and I suppose it should:

image

That's from the google geocoding tool for developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants