GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Inconsistent results for polar regions?  XML
Forum Index -> General
Author Message
kilgore661a



Joined: 23/01/2011 12:08:12
Messages: 9
Offline

Hello Everyone,

http://api.geonames.org/countrySubdivision?lat=-90.0&lng=-200.0&username=whatever

returns "we are afraid we could not find a administrative country subdivision .."

whereas

http://api.geonames.org/countryCode?lat=-90.0&lng=-200.0&username=whatever

returns

Error: invalid lat/lng

Is this a bug?

661


saphir



Joined: 05/06/2010 22:44:39
Messages: 130
Offline

kilgore661a wrote:
Is this a bug? 

Yes indeed... it is a bug on your side...


Latitude -90° is the South Pole
Longitude -200° does not exist, longitudes are from -180° to +180°


Username >>> wait for Marc, I am just user of GeoNames


Regards

saphir
marc



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

Hi 661

What exactly do you expect with longitude = -200 degrees? Where should this be?
There was just no lat/lng validation implemented in the countrySubdivision service.

Best

Marc

[WWW]
kilgore661a



Joined: 23/01/2011 12:08:12
Messages: 9
Offline

marc wrote:
Hi 661

What exactly do you expect with longitude = -200 degrees? Where should this be? 

I have no idea. You have to ask the person who entered those values in the database I am reading.

marc wrote:
There was just no lat/lng validation implemented in the countrySubdivision service. 

Ah, a bug then?

Cheers,

661
saphir



Joined: 05/06/2010 22:44:39
Messages: 130
Offline

Hi kilgore

I tried to help you... but you are still looking for bugs on the wrong side...

Bug #1 >> Why does your database accept impossible coordinates as input ?
If you have not enough rights to change this behavior, then >>>

Bug #2 >> Why does your application not check the input validity from this database ?
Valid latitudes are from -90 to +90 and longitudes from -180 to +180


Basics about polar subdivisions >>

The North Pole is just open sea, frozen but international water with no owner and therefore no subdivision.

All land and ice shelves south of -60° to the South Pole are part of the Antarctic Treaty System with no ownership possible and therefore no subdivisions.
Some countries claim a section of Antarctica as their own, but this is for their own people at home, without any international value. You may define a section as Kilgore-Land... nobody cares...

Regards

saphir
kilgore661a



Joined: 23/01/2011 12:08:12
Messages: 9
Offline

Hi Saphir,

saphir wrote:
Hi kilgore

I tried to help you... but you are still looking for bugs on the wrong side...
 


Sorry, I didn't mean to offend. I didn't reply to your message explicitly because I thought my reply to Marc was an indirect reply to you as well.

saphir wrote:
Bug #1 >> Why does your database accept impossible coordinates as input ?
If you have not enough rights to change this behavior, then >>>

Bug #2 >> Why does your application not check the input validity from this database ?
Valid latitudes are from -90 to +90 and longitudes from -180 to +180 


I'm conscious this is somewhat off-topic, but if others will forgive us for having an interesting (tm) conversation here ...

Bug 1 doesn't apply because, as you suggest, I can't change the database. Bug 2 is moot. I was taught that it is incorrect to validate input when the provider of that input has provided a guarantee that no validation is needed. Since countryCode validates coords for me, I would not therefore check it myself. I assumed that countrySubdivision would provide the same guarantee but as Marc pointed out it doesn't.

In my opinion it all depends on your persepctive. I'd say that if someone forgot to add validation to the countrySubdivision code then it's a geonames bug. if on the other hand there was a reason for countrySubdivision not doing validation e.g. it says in the spec "Must be used after another call that has validated the coords" then the bug is mine. (Although I still can't find the documentation to deternine this is true.)



saphir wrote:
Basics about polar subdivisions ... You may define a section as Kilgore-Land. 

Thanks for the official word on that. I like the idea of Kilgoreland - it suits my delusions of grandeur

661
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team