GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
findNearbyPostalCodes webservice: unexpected result with maxRows=1  XML
Forum Index -> General
Author Message
Anonymous



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

marc



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

Thanks Marco. This is was a bug and was fixed right now.

Regards,

Marc
[WWW]
Anonymous



Hi Marc,

Thank you for your quick response!

Regards,
Marco
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team