<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Trouble finding nearby city for latitutde/longitude"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "Trouble finding nearby city for latitutde/longitude"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Trouble finding nearby city for latitutde/longitude</title>
				<description><![CDATA[ I'm having trouble finding the nearest city for a given latitude/longitude.  I have tried a number of different queries, but can't seem to get it right.  Here is an example...

Latitude: 40.7173387333125
Longitude: -73.9941215515137
Visually, this is in the heart of New York City.  I'm looking for a query that returns the nearest CITY for a specific LAT/LONG.

http://ws.geonames.org/findNearbyPlaceName?lat=40.7173387333125&lng=-73.9941215515137
--- returns 'Allen Turnkey Housing'

Same query using the following fcode =
PPLX returns 'China Town'
PPLC returns nothing.
PPLA returns nothing.
PPL returns 'Allen Turnkey Housing'
PPLL returns 'Meat Packing District'
PPLS returns nothing.

Half the lat/longs within NYC return the city, half return something more specific (as noted above)... Is there a way to consistently return the nearest city?  In the case above, it would always be NYC?


Thanks,

Matt.]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/891.page#3995</guid>
				<link>http://forum.geonames.org/gforum/posts/list/891.page#3995</link>
				<pubDate><![CDATA[Fri, 9 May 2008 16:14:46]]> GMT</pubDate>
				<author><![CDATA[ qmnonic]]></author>
			</item>
			<item>
				<title>Re:Trouble finding nearby city for latitutde/longitude</title>
				<description><![CDATA[ Hi Matt

The problem, unfortunately, is anything else than trivial and I fear there is no easy and global solution. 

For the US the street level data from the US Census might give better results :
http://ws.geonames.org/findNearestAddress?lat=40.7173387333125&lng=-73.9941215515137 

Or probably better even the nearby postal codes :
http://ws.geonames.org/findNearbyPostalCodes?lat=40.7173387333125&lng=-73.9941215515137
The postal code solution also has the advantage that it works for many countries (ca 50). 

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/891.page#4000</guid>
				<link>http://forum.geonames.org/gforum/posts/list/891.page#4000</link>
				<pubDate><![CDATA[Mon, 12 May 2008 07:43:02]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
	</channel>
</rss>