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

Denmark coords resolve as Asia/Phnom_Penh #1

Open
cicika opened this issue Feb 20, 2015 · 10 comments
Open

Denmark coords resolve as Asia/Phnom_Penh #1

cicika opened this issue Feb 20, 2015 · 10 comments

Comments

@cicika
Copy link

cicika commented Feb 20, 2015

Hi!

There's a patch of Denmark that resolves into Asia/Phnom_Penh timezone, which is quite unusual. I would have addressed the problem myself, but, admittedly, I have been playing with the language only for a short while, and wouldn't even know where to start.

Example coords: 55.850667, 12.56804

Awesome lib by the way and a wonderful solution to the problem.

Thanks!

@porjo
Copy link

porjo commented Mar 5, 2015

I have confirmed this using latest tz_world data. Using this code, I found the bounding box of this anomaly to be:

http://bbox.me/osm/index.html?bbox=55.812497,12.562490,56.000007,12.750010

I've opened the tz_world shapefile in Qgis and AFAIK it looks OK. Selecting 'Asia/Phnom_Penh' and zooming in on that does not include any area near Denmark.

@bradfitz
Copy link
Owner

bradfitz commented Mar 5, 2015

Sorry, I can't look at this anytime soon. I'm offline for two weeks starting tomorrow, on vacation. Let me know if you discover any other clues.

@porjo
Copy link

porjo commented Mar 6, 2015

I notice that the tests are failing and timezone Asia/Phnom_Penh appears in the output. Coincidence?

Sorry, ignore that. Tests were failing due to non-existence of tables. Tests are OK 😊

latlong_test.go contains this comment alluding to a previous bug involving Asia/Phnom_Penh

                // previous bug with the wrong oceanIndex. This pixmap
                // leaf resolves to leaf index 0xff (Asia/Phnom_Penh).
                // It was being treated as a special value. It's not.

@cicika
Copy link
Author

cicika commented Apr 30, 2015

Singapore airport also resolves to Asia/Phnom_Penh... If I ever get the time I might make a pull request.

@sidazhang
Copy link

@bradfitz I know that this library isn't supposed to be very accurate and you probably don't have time to mantain this.

Would you have recommendations for a more accurate go library to use?

@bradfitz
Copy link
Owner

Not off the top of my head.

@bradfitz
Copy link
Owner

@cicika, @sidazhang, could either of you try this again with the latest data?

@porjo
Copy link

porjo commented Apr 10, 2017

I tested this earlier and thought it looked good, but turns out that the coords @cicika supplied now return no timezone! e.g.

        lat := 55.850667
	lon := 12.56804
	fmt.Println(latlong.LookupZoneName(lat, lon))

returns blank. I've tried a few other locations around the globe and they return correct results.

@alex-fung
Copy link

I still get the above result – blank zone names for certain lat, lng's, looks like it's usually when it's close to the water.

@vsile
Copy link

vsile commented Feb 19, 2019

For Singapore I also get blank zone names

lat := 1.294719
long := 103.774107
fmt.Println(latlong.LookupZoneName(lat, long))

How to fix it?

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

6 participants