GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Qutesion regarding adminCode1  XML
Forum Index -> General
Author Message
Kaj



Joined: 24/07/2009 15:22:59
Messages: 3
Offline

Hi,

I'm writing a small applications that needs to communicate with an external system. The application needs to know country, region (where region maps to adminCode1) and city name.

I have implemented a search toward geonames, and I'm searching using latitude and longitude. A query looks like this:

http://ws.geonames.org/findNearbyPlaceName?lat=60.13333&lng=18.65=style=FULL

And I get this back:

<geonames>
<geoname>
<name>Herräng</name>
<lat>60.1333333</lat>
<lng>18.65</lng>
<geonameId>2706563</geonameId>
<countryCode>SE</countryCode>
<countryName>Sweden</countryName>
<fcl>P</fcl>
<fcode>PPL</fcode>
<fclName>city, village,...</fclName>
<fcodeName>populated place</fcodeName>
<population />
<alternateNames />
<elevation>0</elevation>
<continentCode>EU</continentCode>
<adminCode1>26</adminCode1>
<adminName1>Stockholm County</adminName1>
<adminCode2 />
<adminName2 />
<timezone dstOffset="2.0" gmtOffset="1.0">
Europe/Stockholm</timezone>
<distance>0.0004</distance>
</geoname>
</geonames>

Everything looks great. I know got country, adminCode1 and city. The external system does however expect a "short version" of adminCode1. That is, they expect Stockholm instead of "Stockholm County". I then made a new query against geonames, and did something like this:

http://ws.geonames.org/search?adminCode1=26&country=SE&featureClass=A&featureCode=ADM1&lang=en&style=FULL

And I get:

<geonames style="FULL">
<totalResultsCount>1</totalResultsCount>
<geoname>
<name>Stockholm County</name>
<lat>59.5</lat>
<lng>18.0</lng>
<geonameId>2673722</geonameId>
<countryCode>SE</countryCode>
<countryName>Sweden</countryName>
<fcl>A</fcl>
<fcode>ADM1</fcode>
<fclName>country, state, region,...</fclName>
<fcodeName>first-order administrative division</fcodeName>
<population />
<alternateNames>Comte de Stockholm,Comté de
Stockholm,Stockholm,Stockholm County,Stockholms Laen,Stockholms
Län,Stockholms laen,Stockholms län</alternateNames>
<elevation />
<continentCode>EU</continentCode>
<adminCode1>26</adminCode1>
<adminName1>Stockholms Län</adminName1>
<adminCode2 />
<adminName2 />
<alternateName lang="sv">Stockholms län</alternateName>
<alternateName lang="fr">Stockholm</alternateName>
<alternateName lang="en">Stockholm County</alternateName>
<alternateName lang="de">Stockholm</alternateName>
<timezone dstOffset="2.0" gmtOffset="1.0">
Europe/Stockholm</timezone>
<score>1.0</score>
</geoname>
</geonames>

I can't see that I get a "short version" (as a developer of the external system calls it). He's now on vacation for serveral weeks, and I'm stuck.

Is there a way to get short version, whatever that is?

I hope that I have posted in the correct forum, and that someone can shed some light

Thanks
Kaj
marc



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

Kaj

The alternatename "Stockholm" for English was previously missing the 'isShortName' flag. You have added it, but we regenerate the admin names only periodically and it takes some time till changes are reflected in the web service. Your update is now visible.

Best

Marc

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