GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
No country code found in mainland Nigeria?  XML
Forum Index -> General
Author Message
digitalfox



Joined: 15/02/2020 22:32:22
Messages: 1
Offline

Hi everyone,

It seems there is an issue with countryCodeJSON API in Nigeria.
When I run:
http://ws.geonames.net/countryCodeJSON?lat=6.5112214&lng=2.7182589&username=demo

I get Code:
"status": {
 "message": "no country code found",
 "value": 15
 }


However, these coordinates correspond to Nigeria mainland: https://goo.gl/maps/kHktdTu6GwKSBSj87
6°30'40.4"N 2°43'05.7"E
Jatu Road, Idiroko, Nigeria

Any leads on what the cause might be?

Thanks!
marc



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

Hi

It is in the border area and the boundary at this location seems to not be fully accurate.
You can use a radius parameter to overcome this kind of issue and get the next country:
http://api.geonames.org/countryCodeJSON?radius=1&lat=6.5112214&lng=2.7182589&username=demo

I will check for more accurate boundaries for Nigeria.

Marc

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