Is there a free world cities DB?

  • Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date
N

Nicholas Paldino [.NET/C# MVP]

Sharon,

You can probably get the latitude and longitude using Google Maps or
Live Search (I know that Live Search has a web service you can perform a
search on, and it will return lat/long coordinates in return).

You will have to go to another service to get time zone information
though.
 
S

Sharon

Hi all,
I'm looking for a free world cities data base that includes:
Longitude, latitude and time zone.
Thanks,
Sharon.
 
S

Sharon

Hey Mark,
I did a Google search, as I always do, before posting this question.
None of the free DB's offer a time zone field.
I haven't even found a commercial one with this field.
Sharon.
 
S

Sharon

Thanks for the reply.
I'll try it.

Nicholas Paldino said:
Sharon,

You can probably get the latitude and longitude using Google Maps or
Live Search (I know that Live Search has a web service you can perform a
search on, and it will return lat/long coordinates in return).

You will have to go to another service to get time zone information
though.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Sharon said:
Hi all,
I'm looking for a free world cities data base that includes:
Longitude, latitude and time zone.
Thanks,
Sharon.
 
F

Fred Mellender

You could construct this using information from various WebPages.
E.G.
File 1: get a list of the tz zones:
http://en.wikipedia.org/wiki/List_of_tz_zones_by_country
(or download the source of this (see
http://en.wikipedia.org/wiki/Tz_database).

File 2:
find a list of cities with their long/latitudes:
e.g. http://www.realestate3d.com/gps/world-latlong.htm

File 3:
find the current times of some world cities. E.G.
http://www.timeanddate.com/worldclock/full.html?sort=2

Extract the information from these WebPages (save the HTML source, write a
program to extract the data). Then merge the data you want.

You should be able to figure out the time zone for a city X by looking up
its current time in File3 and finding a city Y with the same time (also from
File 3), that is also in File 1 (which lists the time zone of city Y, and
will hence be the TZ of X too).


Just an idea.....
 
S

Sharon

Thanks for your reply Fred.
I cannot use this data.
I should have mentioned that the format I need is:
Longitude / Latitude: Long (42.5333333, 1.5333333)
Time Zone: Integer (+1, -4)

I found a good free cities database with longitude and latitude here:
http://www.maxmind.com/download/worldcities/
Now all I need is the time zone.
Regards,
Sharon.
 
A

Abdullah Kamran

I have found a method to find the timezone using longitude of a place from somewhere. I tried it to do some calculations and found it working, it is not very accurate though (needs some improvements)

The timezone changes every 15 degrees on longitude either way. The formula to find timezone is:

(longitude/15) * 3600;

This will give you timezone (or time differnce from GMT) in seconds. And can be used in calculations.

Hope this will help.

Regards,

A Kamran

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
M

Michael A. Covington

What you are calculating is local mean time, not zone time. Time zones are
established by law, usually follow 1-hour increments, and have boundaries
that are not straight lines.

For example, Atlanta (longitude 84 west) is 5.6 hours behind GMT according
to your formula, but in fact it is officially 5 hours in the winter and 4
hours in the summer.

Local mean time is almost always within 1 hour of official (standard) zone
time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top