By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 2,030 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

A class that provides place names in the world?

P: n/a
Can anyone please tell me if there is a class that provides place
names in the world? I am trying to implement a Flight system and if
there was such a class then it could've contributed towards the system
so that if anyone has typed in garbage, then it had showed an error
message.

I am aware of the alternative which is to implement my own class of
place names, but if there is already a class that provides place names
then I will not need to bother implementing such a class. Please tell
me if there is.

Thank you all.
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
ka******@hotmail.com (Mohammed Mazid) wrote in message news:<7c**************************@posting.google. com>...
Can anyone please tell me if there is a class that provides place
names in the world? I am trying to implement a Flight system and if
there was such a class then it could've contributed towards the system
so that if anyone has typed in garbage, then it had showed an error
message.

I am aware of the alternative which is to implement my own class of
place names, but if there is already a class that provides place names
then I will not need to bother implementing such a class. Please tell
me if there is.

Thank you all.


What are you going to do ?????
You do not really want to use a class with thousands of constants, do you ?

Use a database.
Jul 17 '05 #2

P: n/a
All I wanted to know if there was a Java class that has all the names
of places. I have alternatives but it will be time-consuming and
there are probably millions places in the world! I just want to know
if there is such a class.

ma***@applejuicenet.de (Torsten Krall) wrote in message news:<63**************************@posting.google. com>...
ka******@hotmail.com (Mohammed Mazid) wrote in message news:<7c**************************@posting.google. com>...
Can anyone please tell me if there is a class that provides place
names in the world? I am trying to implement a Flight system and if
there was such a class then it could've contributed towards the system
so that if anyone has typed in garbage, then it had showed an error
message.

I am aware of the alternative which is to implement my own class of
place names, but if there is already a class that provides place names
then I will not need to bother implementing such a class. Please tell
me if there is.

Thank you all.


What are you going to do ?????
You do not really want to use a class with thousands of constants, do you ?

Use a database.

Jul 17 '05 #3

P: n/a
Mohammed Mazid wrote:
All I wanted to know if there was a Java class that has all the names
of places. I have alternatives but it will be time-consuming and
there are probably millions places in the world! I just want to know
if there is such a class.
"Places" can mean a lot of things. Do you want like the geography of
the area? Its airports? its wind pattern? or you just want the list of
cities in the world?

One city can have many airports. Whatever this is it can't just be in a
class. it would be in a database or datafile. What are you looking
for perciceley?

Would the stuff in the flightgear project help you?

ma***@applejuicenet.de (Torsten Krall) wrote in message news:<63**************************@posting.google. com>...
ka******@hotmail.com (Mohammed Mazid) wrote in message news:<7c**************************@posting.google. com>...
Can anyone please tell me if there is a class that provides place
names in the world? I am trying to implement a Flight system and if
there was such a class then it could've contributed towards the system
so that if anyone has typed in garbage, then it had showed an error
message.

I am aware of the alternative which is to implement my own class of
place names, but if there is already a class that provides place names
then I will not need to bother implementing such a class. Please tell
me if there is.

Thank you all.


What are you going to do ?????
You do not really want to use a class with thousands of constants, do you ?

Use a database.

Jul 17 '05 #4

P: n/a
The list of cities. I know that database is the only solution, but if
there is a class already that provides all the names of the cities,
then why do I need to bother?

Just would like to know if there is such a class that provides names
of cities.

I would assume that if I was entering the place name in a Java
program, I would have an if statement:

//Assume there is a class for names of cities called Cities
Cities cities = new Cities();
if placeName != cities
System.out.println("City not found!");

I know there is no such class as Cities, but let's assume there was,
I'd want to have an if statement like that. I was only wondering if
there was a collection class that hold names of cities.

Yoyoma_2 <Yoyoma_2@[at-]Hotmail.com> wrote in message news:<Ve37c.866184$X%5.717972@pd7tw2no>...
Mohammed Mazid wrote:
All I wanted to know if there was a Java class that has all the names
of places. I have alternatives but it will be time-consuming and
there are probably millions places in the world! I just want to know
if there is such a class.


"Places" can mean a lot of things. Do you want like the geography of
the area? Its airports? its wind pattern? or you just want the list of
cities in the world?

One city can have many airports. Whatever this is it can't just be in a
class. it would be in a database or datafile. What are you looking
for perciceley?

Would the stuff in the flightgear project help you?

ma***@applejuicenet.de (Torsten Krall) wrote in message news:<63**************************@posting.google. com>...
ka******@hotmail.com (Mohammed Mazid) wrote in message news:<7c**************************@posting.google. com>...

Can anyone please tell me if there is a class that provides place
names in the world? I am trying to implement a Flight system and if
there was such a class then it could've contributed towards the system
so that if anyone has typed in garbage, then it had showed an error
message.

I am aware of the alternative which is to implement my own class of
place names, but if there is already a class that provides place names
then I will not need to bother implementing such a class. Please tell
me if there is.

Thank you all.

What are you going to do ?????
You do not really want to use a class with thousands of constants, do you ?

Use a database.

Jul 17 '05 #5

P: n/a
Mohammed Mazid wrote:
The list of cities. I know that database is the only solution, but if
there is a class already that provides all the names of the cities,
then why do I need to bother?

Just would like to know if there is such a class that provides names
of cities.

I would assume that if I was entering the place name in a Java
program, I would have an if statement:

//Assume there is a class for names of cities called Cities
Cities cities = new Cities();
if placeName != cities
System.out.println("City not found!");

I know there is no such class as Cities, but let's assume there was,
I'd want to have an if statement like that. I was only wondering if
there was a collection class that hold names of cities.

No but i know there is a partial list of places for time zone stuff.

I googled it and i found
http://www.atravco.com/airportcodes1.html
Take that and copy/paste it into a file then make SQL statements to load
them into your database. Prefferably by region.

I think that should do it.

Yoyoma_2 <Yoyoma_2@[at-]Hotmail.com> wrote in message news:<Ve37c.866184$X%5.717972@pd7tw2no>...
Mohammed Mazid wrote:

All I wanted to know if there was a Java class that has all the names
of places. I have alternatives but it will be time-consuming and
there are probably millions places in the world! I just want to know
if there is such a class.


"Places" can mean a lot of things. Do you want like the geography of
the area? Its airports? its wind pattern? or you just want the list of
cities in the world?

One city can have many airports. Whatever this is it can't just be in a
class. it would be in a database or datafile. What are you looking
for perciceley?

Would the stuff in the flightgear project help you?

ma***@applejuicenet.de (Torsten Krall) wrote in message news:<63**************************@posting.google. com>...
ka******@hotmail.com (Mohammed Mazid) wrote in message news:<7c**************************@posting.google. com>...
>Can anyone please tell me if there is a class that provides place
>names in the world? I am trying to implement a Flight system and if
>there was such a class then it could've contributed towards the system
>so that if anyone has typed in garbage, then it had showed an error
>message.
>
>I am aware of the alternative which is to implement my own class of
>place names, but if there is already a class that provides place names
>then I will not need to bother implementing such a class. Please tell
>me if there is.
>
>Thank you all.

What are you going to do ?????
You do not really want to use a class with thousands of constants, do you ?

Use a database.

Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.