<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Inconsistent results for polar regions?"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "Inconsistent results for polar regions?"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Inconsistent results for polar regions?</title>
				<description><![CDATA[ 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


]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/2217.page#8996</guid>
				<link>http://forum.geonames.org/gforum/posts/list/2217.page#8996</link>
				<pubDate><![CDATA[Mon, 24 Jan 2011 04:36:21]]> GMT</pubDate>
				<author><![CDATA[ kilgore661a]]></author>
			</item>
			<item>
				<title>Inconsistent results for polar regions?</title>
				<description><![CDATA[ <p></p>

		<cite>kilgore661a wrote:</cite><br>
		<blockquote>Is this a bug?&nbsp;
		</blockquote>
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]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/2217.page#8998</guid>
				<link>http://forum.geonames.org/gforum/posts/list/2217.page#8998</link>
				<pubDate><![CDATA[Mon, 24 Jan 2011 06:56:14]]> GMT</pubDate>
				<author><![CDATA[ saphir]]></author>
			</item>
			<item>
				<title>Re:Inconsistent results for polar regions?</title>
				<description><![CDATA[ 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]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/2217.page#8999</guid>
				<link>http://forum.geonames.org/gforum/posts/list/2217.page#8999</link>
				<pubDate><![CDATA[Mon, 24 Jan 2011 06:56:23]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:Inconsistent results for polar regions?</title>
				<description><![CDATA[ <p></p>

		<cite>marc wrote:</cite><br>
		<blockquote>Hi 661

What exactly do you expect with longitude = -200 degrees? Where should this be?&nbsp;
		</blockquote>
I have no idea. You have to ask the person who entered those values in the database I am reading.
<p></p>

		<cite>marc wrote:</cite><br>
		<blockquote>There was just no lat/lng validation implemented in the countrySubdivision service.&nbsp;
		</blockquote>
Ah, a bug then? :-)

Cheers,

661
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/2217.page#9000</guid>
				<link>http://forum.geonames.org/gforum/posts/list/2217.page#9000</link>
				<pubDate><![CDATA[Mon, 24 Jan 2011 07:01:35]]> GMT</pubDate>
				<author><![CDATA[ kilgore661a]]></author>
			</item>
			<item>
				<title>Re:Inconsistent results for polar regions?</title>
				<description><![CDATA[ Hi kilgore

I tried to help you... but you are still looking for bugs on the wrong side...

Bug #1 &gt;&gt; Why does your database accept impossible coordinates as input ?
If you have not enough rights to change this behavior, then &gt;&gt;&gt;

Bug #2 &gt;&gt; Why does your application <b>not</b> check the input validity from this database ?
Valid latitudes are from -90 to +90 and longitudes from -180 to +180


Basics about polar subdivisions &gt;&gt;

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]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/2217.page#9003</guid>
				<link>http://forum.geonames.org/gforum/posts/list/2217.page#9003</link>
				<pubDate><![CDATA[Mon, 24 Jan 2011 10:47:30]]> GMT</pubDate>
				<author><![CDATA[ saphir]]></author>
			</item>
			<item>
				<title>Re:Inconsistent results for polar regions?</title>
				<description><![CDATA[ Hi Saphir,

<p></p>

		<cite>saphir wrote:</cite><br>
		<blockquote>Hi kilgore

I tried to help you... but you are still looking for bugs on the wrong side...
&nbsp;
		</blockquote>

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.

<p></p>

		<cite>saphir wrote:</cite><br>
		<blockquote>Bug #1 &gt;&gt; Why does your database accept impossible coordinates as input ?
If you have not enough rights to change this behavior, then &gt;&gt;&gt;

Bug #2 &gt;&gt; Why does your application <b>not</b> check the input validity from this database ?
Valid latitudes are from -90 to +90 and longitudes from -180 to +180&nbsp;
		</blockquote>

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.)



<p></p>

		<cite>saphir wrote:</cite><br>
		<blockquote>Basics about polar subdivisions ... You may define a section as Kilgore-Land.&nbsp;
		</blockquote>
Thanks for the official word on that. I like the idea of Kilgoreland - it suits my delusions of grandeur :-)

661]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/2217.page#9006</guid>
				<link>http://forum.geonames.org/gforum/posts/list/2217.page#9006</link>
				<pubDate><![CDATA[Mon, 24 Jan 2011 14:27:18]]> GMT</pubDate>
				<author><![CDATA[ kilgore661a]]></author>
			</item>
	</channel>
</rss>