GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
getting parent location  XML
Forum Index -> General Go to Page: 1, 2 Next 
Author Message
Anonymous



first, thanks for such a great service! Badly needed and very much appreciated, thanks guys.

One thing I'd like to be able to to do is given a geonamesid for a location, look up it's parent locations to form a hierarchy. So if you have the id for a district of a town, you'd then be able to get the town itself, followed by the state, followed by the country.

is anything like this possible?
noiv



Joined: 10/06/2006 16:36:57
Messages: 19
Location: ExploreOurPla.net
Offline

Anonymous wrote:
... you'd then be able to get the town itself, followed by the state, followed by the country..... 
Cool idea, I second that!
[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

I think we should be able to roll out a prototype with country and first order subdivision pretty soon. For more levels of the hierarchy we currently don't have enough information ready. For many countries it should be possible to derive it from other datasets. (US and Europe) For many other countries it will be difficult to get the necessary information.

Would you be interested in a prototype returning the country and the first subdivision (state/province)?

Marc

[WWW]
Anonymous



hi marc

country and first subdivision would be brilliant. In fact, I'd say it would fit the requirements of most users. It's enough to differnetiate between ambiguous place names but not so much that it would cause an information overload for users.

thanks for your help

rick
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

Hi Rick

A first prototype for a hierarchy service is ready. Any comment is welcome.

Example :
http://ws.geonames.org/hierarchy?geonameId=1

It returns country, first subdivision and the geoname record itself. In this order.
Only about a third of all subdivisions are already mapped to their geoname id. If you can tell us which countries are important to you, I have a look at them and make sure these are mapped to their geonameId.

Marc

[WWW]
noiv



Joined: 10/06/2006 16:36:57
Messages: 19
Location: ExploreOurPla.net
Offline

marc wrote:
... A first prototype for a hierarchy service is ready. ....  
Wow, all tested IDs returned correct data.
Can I help to make the relation country -> contintent?

noiv - ExploreOurPla.net
[WWW]
Anonymous



Thanks for this service, and want to mark, that needed also dump of this table with relations between countries, regions and cities.
magesh



Joined: 16/06/2006 12:43:29
Messages: 1
Offline

Dear All,
I want to integrate the geonames website into my website.
but i havn't no idea for the basic step.
Please tell me the initial step to integrate the site with my own site.
Please help me to do that.
Thanks and regards,
Magesh.
Anonymous



Marc

it works great. thanks for taking the time to do this. For me, the priority countries are all the english speaking ones, US, UK, Canada, Australia etc

magesh, which platform/language are you using on your site? PHP, ASP, Java or something else? You need to select the relevant web service from this page :

http://www.geonames.org/export/

and then use your platform or language to query the web service and process the resulting XML data

hth
alex
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

The hierarchy web service now returns the continent in the first position of the result. Example :

http://ws.geonames.org/hierarchy?geonameId=1

Marc

[WWW]
Anonymous



As this is still undocumented, I just wanted to confirm that its OK to use this hierarchy webservice? As I have a really cool idea for a use of it!
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

Yes you can use the service. You can drop me an email (marc@geonames.org) so we can discuss it with you in case we would like to change something before officially releasing the service.

Marc

[WWW]
barryhunter


[Avatar]

Joined: 13/09/2006 21:25:40
Messages: 27
Offline

Sorry that was me again, forgot I wasn't logged in... (found by refreshing the page eventually got a nice b/w captcha could read

I'm just about to try a using the service in a bit of testing, we see how get on, and will contact you before using it properly.

--
- www.nearby.org.uk - www.geograph.org.uk -
[WWW]
noiv



Joined: 10/06/2006 16:36:57
Messages: 19
Location: ExploreOurPla.net
Offline

Wow, service is now more responsive and answer leaner.

noiv - ExploreOurPla.net
[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

The service is now taking the style parameter (SHORT,MEDIUM,LONG,FULL) just like the other services.

Marc

[WWW]
barryhunter


[Avatar]

Joined: 13/09/2006 21:25:40
Messages: 27
Offline

marc wrote:
The service is now taking the style parameter (SHORT,MEDIUM,LONG,FULL) just like the other services.
 


Great! Updated my utility to use it, depending on user options

Hey while here will add a quick plug

http://www.nearby.org.uk/group-kml.php

… Takes a kml [Google Earth] file full of placemarks, and organizes them into a folder tree structure, starting by continent and working down though country to state/county if possible… 

--
- www.nearby.org.uk - www.geograph.org.uk -
[WWW]
agussman



Joined: 25/05/2006 21:20:32
Messages: 2
Offline

The heirarchy web service is cool! Are you dynamically determining the parentage with each query, or have you precomputed them for each location? If its the latter case, is the master list of the heirarchy for each location available for download? I guess I could obtain it by repeatedly querying the webservice, but a directly download seems friendlier

Also, how difficult would it be to add additional "administrative region" layers? For instance, for locations within the US it would be useful for me to know the City/County. Sort of along those lines, it seems like this information could be obtained from vector boundary info for administrative regions. I've been looking around for such info but haven't been found it. Has anyone else come across it?

Thanks,
Aaron
[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

Hi Aaron

The information is already in the download. Look at the field admin1. (admin2 is still missing in the download)

There is also a reverse geocoding service for administrative division :
http://ws.geonames.org/countrySubdivision?lat=47.03&lng=10.2&type=xml

Regards

Marc

[WWW]
mcjennis



Joined: 06/04/2007 23:37:04
Messages: 14
Offline

Hi Marc,
I think this is a very usefull service, but just 2 questions:
- why the hierarchical service for Italy doesn't return admin1 and admin2 in another geoname tag, so I need to ask the subvidision service to do that?
- why in Italy node <adminName1>Umbria</adminName1> ?

thanks Fabrizio
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

Hi Fabrizio

1. admin1 should be there for nearly all entries. admin2 has just been added for adm2 and ppl features.

2. the wrong admin1 code for the toponym "Italy" has been deleted.

Cheers

Marc

[WWW]
 
Forum Index -> General Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.5 © JForum Team