GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Problems with detailed information  XML
Forum Index -> General
Author Message
Crovax



Joined: 21/08/2007 15:21:28
Messages: 5
Offline

The problem is with this service
ws.geonames.org/findNearbyPlaceName?style=FULL&lat=48.865618158309374&lng=2.344207763671875

I need to get only country and city names but instead I get the next detailed info:
Code:
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <geonames>
 <geoname>
 <name>Le Louvre</name>
 <lat>48.8635007970663</lat>
 <lng>2.33875751495361</lng>
 <geonameId>6545270</geonameId>
 <countryCode>FR</countryCode>
 <countryName>France</countryName>
 <fcl>P</fcl>
 <fcode>PPLX</fcode>
 <fclName>city, village,...</fclName>
 <fcodeName>section of populated place</fcodeName>
 <population/>
 <alternateNames/>
 <elevation>0</elevation>
 <adminCode1>A8</adminCode1>
 <adminName1>ГЋle-de-France</adminName1>
 <adminCode2>75</adminCode2>
 <adminName2>DГ©partement de Ville-de-Paris</adminName2>
 <distance>0.8895490128233411</distance>
 </geoname>
 </geonames>
 


But there is no place where 'Paris' is mentioned (I clicked in the center of the city). How should I get ony country+city information?

Thanks,
Eugene
marc



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

Hi Eugene

The 'findNearbyPlaceName' returns all populated places. If you don't care about PPLX you have two possibilities. You can either get more than one row and filter it out yourself or you can use the (not yet documented) 'findNearby' service with the featurecodes you are interested in (PPLC,PPLA and PPL).

http://ws.geonames.org/findNearby?lat=48.865618158309374&lng=2.344207763671875&featureClass=P&featureCode=PPLA&featureCode=PPL&featureCode=PPLC

Regards

Marc

[WWW]
Crovax



Joined: 21/08/2007 15:21:28
Messages: 5
Offline

Thanks very much. That's exactly what I need. Your services are great.
marc



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

I should have added that this service is not yet documented since it is impossible to performance optimize it for all combinations of our 650 feature codes.
If the above combination of codes is requested pretty often we will add a database index to speed it up.

Regards

Marc

[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team