GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
A strange result  XML
Forum Index -> General
Author Message
ptomblin


[Avatar]

Joined: 16/10/2007 01:30:57
Messages: 18
Offline

I got a strange result today doing some geonames queries:
Code:
 curl 'http://ws.geonames.org/countrySubdivision?lat=17.0&lng=113.308333&radius=1&maxRows=10'
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <geonames>
 <countrySubdivision>
 <countryCode/>
 <countryName/>
 <adminCode1>0Z</adminCode1>
 <adminName1>null.0Z</adminName1>
 <distance>49.595635427441934</distance>
 </countrySubdivision>
 </geonames>
 


No country, but a state code of "0Z"? It's out in the middle of no-where in the South China Sea, near the Paracel Islands. If you use the "ocean" query instead of "countrySubdivision", it returns "<name>South China Sea</name>" as expected.

[WWW]
marc



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

Thanks. It has been fixed. There were two bugs in this response. First it should not return a point this far away when asking with a radius of 1km and second it should not return a response with an null country code. Both bugs have been fixed.

The response returned was based on the 'Dido Bank' in the Spratly Islands

http://www.geonames.org/1821200/dido-bank.html
http://en.wikipedia.org/wiki/Spratly_Islands

The US government is using the country code 'PG' for these disputed islands, ISO did not assign a country code to them. This is the reason we have set the country code to 'null' as we don't really know which ISO county code would make sense for these uninhabited islands.

Best

Marc

[WWW]
ptomblin


[Avatar]

Joined: 16/10/2007 01:30:57
Messages: 18
Offline

marc wrote:

The US government is using the country code 'PG' for these disputed islands, ISO did not assign a country code to them. 


My waypoint generator (http://navaid.com/) started off using DAFIF data, so naturally I used FIPS 10-4 country codes. Unfortunately
-the US Government doesn't use FIPS 10-4 for anything any more so they haven't been making new ones as new countries and territories come into being and
- the mapping between ISO 3166-1 and FIPS 10-4 isn't exactly 1:1

(BTW: I know this is a phpBB error and not yours, but the preview function doesn't show the same results as the actual post for quote and list tags.)
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team