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

Does not return timezone for this lat long: tzwhere.tzNameAt(40.573238372802734, -73.99983978271484) #8

Open
avlakin opened this issue May 20, 2014 · 6 comments

Comments

@avlakin
Copy link

avlakin commented May 20, 2014

tzwhere.tzNameAt(40.573238372802734, -73.99983978271484) => Null

Returns a null, but should be this: http://www.darrinward.com/lat-long/?id=92197

@benjie
Copy link

benjie commented Sep 8, 2014

@thislakin I believe this is probably the same issue I'm facing with the source data, e.g. for the south coast of England:

screenshot 2014-09-08 19 29 21

Seems to be offset by roughly 0.005 degrees North West.

@mattbornski
Copy link
Owner

Interesting. Is there a newer/more correct set of source data available anywhere?

@paulochf
Copy link

I found this problem while using the Python port pytzwhere.
Also, I opened a issue there. pegler/pytzwhere/issues/15

@mattbornski, it also happens at Spain' southern coast.

screenshot from 2015-04-15 17 49 15

@mattbornski
Copy link
Owner

Interesting to note that the Earth's land surface is of course always changing, whereas these polygons were generated by some person at one point in time and are not changing at the same rate. It seems natural to me that if I am off the coast of a landmass, I would treat myself as being in the timezone of that landmass. Is there any convention on that? If (hypothetically) there was some nautical convention that specified that ships at sea are not in any timezone, then what if we added a config flag for the sanity of anybody who is not oceangoing and fudged points outside of all polygons into the nearest polygon?

@benjie
Copy link

benjie commented Apr 15, 2015

When I discovered the issue I shot Eric Muller (the author of the data) an email asking if I was doing something wrong, and he explained:

You have to realize that digital maps have a notion of scale, i.e. of precision of the data. That notion is present in paper maps, where it covers both the precision of the source data and the limits of resolution of printing and of the eye. In digital maps, because we can display them at an arbitrary zoom level, the second factor is not present, but the first is still there.

I think this explains the difference in the boundaries you observe. I used the VMAP0 boundary, which is at a scale of 1/1 million, and OpenStreetMap is probably using a higher scale (their polygons have more points). It's a bit as if VMAP0 had taken a picture with a 1 megapixel camera and OpenStreetMap had taken the same picture with a 10 megapixel camera.

As for the choice of using VMAP0: A digital map is often representing a single layer (a single king of data, e.g. tz boundaries) and is meant to be used in combination with other layers (e.g. political boundaries, or railroads, etc); then the coordination of the various layers is important. When a polygon side is both a tz boundary and a political boundary, it's almost more important that both layers use the same coordinates, rather than use more precise but different coordinates. My map/layer is meant to coordinate well with the VMAP0 layers, so it matches VMAP0 land and political boundaries, however precise those are.

Incidentally here's Paris (these were rendered by downloading Eric's tz_world.zip, running ogr2ogr -f GeoJSON tz_world.geojson tz_world.shp and then filtering just lines matching "Europe/London" or "Europe/Paris" (as necessary) and then pasting them into http://geojsonlint.com/):

screenshot 2014-09-08 19 36 48

@cstich
Copy link

cstich commented Jul 14, 2015

I am not sure how relevant this is for this package, but I implemented a workaround in the python port of this package. See also this discussion.

StephanGeorg pushed a commit to StephanGeorg/tzwhere that referenced this issue Mar 20, 2017
The json data seems corrupt. This fixes [mattbornski#8](mattbornski#18)
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

5 participants