Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

Is there a free world cities DB?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sharon - 27 Aug 2007 16:52 GMT
Hi all,
I'm looking for a free world cities data base that includes:
Longitude, latitude and time zone.
Thanks,
Sharon.
Nicholas Paldino [.NET/C# MVP] - 27 Aug 2007 17:03 GMT
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.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> Hi all,
> I'm looking for a free world cities data base that includes:
> Longitude, latitude and time zone.
> Thanks,
> Sharon.
Sharon - 27 Aug 2007 21:10 GMT
Thanks for the reply.
I'll try it.

> Sharon,
>
[quoted text clipped - 10 lines]
>> Thanks,
>> Sharon.
Mark Rae [MVP] - 27 Aug 2007 17:12 GMT
> I'm looking for a free world cities data base that includes:
> Longitude, latitude and time zone.

http://www.google.co.uk/search?hl=en&rlz=1T4GGIH_en-GBGB220GB220&q=world+cities+
database+free&meta
=

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Sharon - 27 Aug 2007 21:04 GMT
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.

>> I'm looking for a free world cities data base that includes:
>> Longitude, latitude and time zone.
>
> http://www.google.co.uk/search?hl=en&rlz=1T4GGIH_en-GBGB220GB220&q=world+cities+
database+free&meta
=
Fred Mellender - 27 Aug 2007 22:02 GMT
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.....

> Hi all,
> I'm looking for a free world cities data base that includes:
> Longitude, latitude and time zone.
> Thanks,
> Sharon.
Mark Rae [MVP] - 27 Aug 2007 22:21 GMT
> 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).

Wikipedia cannot be relied upon under any circumstances...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

clintonG - 27 Aug 2007 23:35 GMT
>> You could construct this using information from various WebPages.
>> E.G.
[quoted text clipped - 4 lines]
>
> Wikipedia cannot be relied upon under any circumstances...

Wikipedis ia very reliable as a starting point. As much as I dislike quoting
politicians Ronald Reagan said "trust but verify."

<%= Clinton Gallagher
        NET csgallagher AT metromilwaukee.com
        URL http://clintongallagher.metromilwaukee.com/
Sharon - 28 Aug 2007 18:15 GMT
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.

> You could construct this using information from various WebPages.
> E.G.
[quoted text clipped - 26 lines]
>> Thanks,
>> Sharon.
Abdullah Kamran - 05 Sep 2007 16:36 GMT
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
Michael A. Covington - 05 Sep 2007 19:06 GMT
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.

>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
[quoted text clipped - 16 lines]
> EggHeadCafe - .NET Developer Portal of Choice
> http://www.eggheadcafe.com
Sharon - 06 Sep 2007 15:38 GMT
Yes daylight saving time is also a problem.
I finally decided to buy the Meridian Global Cities Database.
http://www.meridianworlddata.com/Matrix.asp?guid=A0C3B319-A8A7-4987-8139-6347414
69652&Product%5fint%5fid=158&Region%5fint%5fid=113&Edition%5fint%5fid=102&Licens
e%5fstr%5ftype=Commercial

It includes DST rules.
Thanks for your help,
Sharon.

> What you are calculating is local mean time, not zone time.  Time zones
> are established by law, usually follow 1-hour increments, and have
[quoted text clipped - 27 lines]
>> EggHeadCafe - .NET Developer Portal of Choice
>> http://www.eggheadcafe.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.