<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "findNearbyPostalCodes webservice: unexpected result with maxRows=1"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "findNearbyPostalCodes webservice: unexpected result with maxRows=1"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>findNearbyPostalCodes webservice: unexpected result with maxRows=1</title>
				<description><![CDATA[ Hi,

While evaluating the results of the findNearbyPostalCodes webservice for locations in The Netherlands, I ran into the following issue:

I used the following queries:

http://ws.geonames.org/findNearbyPostalCodes?lat=51.55&lng=5.09&style=LONG
http://ws.geonames.org/findNearbyPostalCodes?lat=51.55&lng=5.09&style=LONG&maxRows=1

The result of the first query (without maxRows=1):

<geonames>
<code>
<postalcode>5009</postalcode>
<name>Tilburg</name>
<countryCode>NL</countryCode>
<lat>51.55</lat>
<lng>5.1166667</lng>
<adminCode1>NB</adminCode1>
<adminName1>Noord Brabant</adminName1>
<adminCode2/>
<adminName2>MIDDEN-NOORD-BRABANT</adminName2>
<distance>1.843766967748772</distance>
</code>
<code>
<postalcode>5008</postalcode>
<name>Tilburg</name>
<countryCode>NL</countryCode>
<lat>51.55</lat>
<lng>5.1166667</lng>
<adminCode1>NB</adminCode1>
<adminName1>Noord Brabant</adminName1>
<adminCode2/>
<adminName2>MIDDEN-NOORD-BRABANT</adminName2>
<distance>1.843766967748772</distance>
</code>
<code>
<postalcode>5007</postalcode>
<name>Tilburg</name>
<countryCode>NL</countryCode>
<lat>51.55</lat>
<lng>5.1166667</lng>
<adminCode1>NB</adminCode1>
<adminName1>Noord Brabant</adminName1>
<adminCode2/>
<adminName2>MIDDEN-NOORD-BRABANT</adminName2>
<distance>1.843766967748772</distance>
</code>
<code>
<postalcode>5049</postalcode>
<name>Tilburg</name>
<countryCode>NL</countryCode>
<lat>51.55</lat>
<lng>5.1166667</lng>
<adminCode1>NB</adminCode1>
<adminName1>Noord Brabant</adminName1>
<adminCode2/>
<adminName2>MIDDEN-NOORD-BRABANT</adminName2>
<distance>1.843766967748772</distance>
</code>
<code>
<postalcode>5056</postalcode>
<name>Berkel-Enschot</name>
<countryCode>NL</countryCode>
<lat>51.53000002</lat>
<lng>5.0866667</lng>
<adminCode1>NB</adminCode1>
<adminName1>Noord Brabant</adminName1>
<adminCode2/>
<adminName2>MIDDEN-NOORD-BRABANT</adminName2>
<distance>2.235705232137345</distance>
</code>
</geonames>



The results of the second query (with maxRows=1):

<geonames>
<code>
<postalcode>5056</postalcode>
<name>Berkel-Enschot</name>
<countryCode>NL</countryCode>
<lat>51.53000002</lat>
<lng>5.0866667</lng>
<adminCode1>NB</adminCode1>
<adminName1>Noord Brabant</adminName1>
<adminCode2/>
<adminName2>MIDDEN-NOORD-BRABANT</adminName2>
<distance>2.235705232137345</distance>
</code>
</geonames>


In my opinion, the second query should return the closest result, but as you see it doesn’t. Doesn’t that sort ascending on distance?

Regards,
Marco

]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/173.page#933</guid>
				<link>http://forum.geonames.org/gforum/posts/list/173.page#933</link>
				<pubDate><![CDATA[Thu, 5 Oct 2006 17:59:34]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
			<item>
				<title>Re:findNearbyPostalCodes webservice: unexpected result with maxRows=1</title>
				<description><![CDATA[ Thanks Marco. This is was a bug and was fixed right now.

Regards,

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/173.page#935</guid>
				<link>http://forum.geonames.org/gforum/posts/list/173.page#935</link>
				<pubDate><![CDATA[Thu, 5 Oct 2006 22:18:31]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:findNearbyPostalCodes webservice: unexpected result with maxRows=1</title>
				<description><![CDATA[ Hi Marc,

Thank you for your quick response!

Regards,
Marco]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/173.page#937</guid>
				<link>http://forum.geonames.org/gforum/posts/list/173.page#937</link>
				<pubDate><![CDATA[Fri, 6 Oct 2006 08:16:03]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
	</channel>
</rss>