GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Reverse Geocoder "Problem"  XML
Forum Index -> General
Author Message
Anonymous



I'm trying to use the Geocoding service to find the nearest municipality to the input I give it, however it sometimes picks up neighborhoods in my city.

Here's some results:
Nearest Location:
Country: Canada
Prov./State: Alberta
City: Calgary
Lat: 51.050112282
Lng: -114.085285152

Nearest Location:
Country: Canada
Prov./State: Alberta
City: Silver Springs
Lat: 51.100111099
Lng: -114.151988207

Nearest Location:
Country: Canada
Prov./State: Alberta
City: Forest Lawn
Lat: 51.033412191
Lng: -113.968676512

Now I guess, is there any way I can, or you can implement, so that for all these searches Calgary is returned? Possible to do it by population?

It seems as though the GeoCoder is returning the nearest feature, could a field be added to the result to display the city that feature is in as well? that would solve my problem..
Anonymous



Would it also be possible to limit results from the same current administrative division as the search point?

Reverse Geocoding near a provincial border could confuse some people when the results aren't in the same province.
marc



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

You can use the findNearby Service and only search for PPL, discarding all PPLL :

http://ws.geonames.org/findNearby?lat=51&lng=-114&style=FULL&maxRows=10&radius=20&featureCode=PPL

Or you can do the filtering yourself and use the findNearbyPlaceName and filter by featureCode and/or administrative division : http://ws.geonames.org/findNearbyPlaceName?lat=51&lng=-114&style=FULL&maxRows=10&radius=20

[WWW]
Anonymous



Thanks for the quick reply, I'll try it out over the weekend!
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team