<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "reverse geocoding to get country and adminlevels"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "reverse geocoding to get country and adminlevels"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>reverse geocoding to get country and adminlevels</title>
				<description><![CDATA[ Hi,

I am in the need of determine the country and as much adminlevels (state/county/district) as possible out of a given latitude/longitude.

I just noticed that http://ws.geonames.org/countrySubdivision?lat=37.98100996893789&lng=-87.50335693359375
gives me the country (US) and the state (Indiana), but not the county (Vanderburgh).

For GB this doesn't seems to work: http://ws.geonames.org/countrySubdivision?lat=52.10650519075632&lng=-0.17578125
returns nothing, while the German data seems to be there:
http://ws.geonames.org/countrySubdivision?lat=48.16608541901253&lng=11.66748046875
This will give me the country and the 'Bundesland'. 

But http://ws.geonames.org/postalCodeSearchJSON?postalcode=47714&maxRows=1&country=US&formatted=tr&style=FULL will give me more adminlevels: It returns city, county, state, and country. (But I think they are just generated from a list and not computed by polygon data...)

So my question is: Is there any service out there (on this very useful server or elsewhere) being able to solve this problem?

I searched a long time and found many free shapedata! Are there any tools (or tutorials) how I convert them into something useable for me? (After this is done I will grant them to the public (like this place).)


Any ideas or hints are welcome!
Claus
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/278.page#1507</guid>
				<link>http://forum.geonames.org/gforum/posts/list/278.page#1507</link>
				<pubDate><![CDATA[Mon, 29 Jan 2007 15:13:37]]> GMT</pubDate>
				<author><![CDATA[ cla]]></author>
			</item>
			<item>
				<title>reverse geocoding to get country and adminlevels</title>
				<description><![CDATA[ Try extendedFindNearby service:

http://ws.geonames.org/extendedFindNearby?lat=52.10650519075632&lng=-0.17578125

]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/278.page#1510</guid>
				<link>http://forum.geonames.org/gforum/posts/list/278.page#1510</link>
				<pubDate><![CDATA[Tue, 30 Jan 2007 18:53:38]]> GMT</pubDate>
				<author><![CDATA[ noiv]]></author>
			</item>
			<item>
				<title>reverse geocoding to get country and adminlevels</title>
				<description><![CDATA[ <p></p>

		<cite>noiv wrote:</cite><br>
		<blockquote>Try extendedFindNearby service:

http://ws.geonames.org/extendedFindNearby?lat=52.10650519075632&lng=-0.17578125

&nbsp;
		</blockquote>

That's not exactly what I was looking for!

It's a 'which places are nearby'-search, which might work most of the time, but not always. The fewer places are nearby a given lat/lng the more unexact the result will be...
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/278.page#1511</guid>
				<link>http://forum.geonames.org/gforum/posts/list/278.page#1511</link>
				<pubDate><![CDATA[Tue, 30 Jan 2007 19:17:50]]> GMT</pubDate>
				<author><![CDATA[ cla]]></author>
			</item>
			<item>
				<title>reverse geocoding to get country and adminlevels</title>
				<description><![CDATA[ <p></p>

		<cite>cla wrote:</cite><br>
		<blockquote>I am in the need of determine the country and as much adminlevels (state/county/district) as possible out of a given latitude/longitude.&nbsp;
		</blockquote>Could you please be more precise then.]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/278.page#1512</guid>
				<link>http://forum.geonames.org/gforum/posts/list/278.page#1512</link>
				<pubDate><![CDATA[Tue, 30 Jan 2007 19:43:53]]> GMT</pubDate>
				<author><![CDATA[ noiv]]></author>
			</item>
			<item>
				<title>Re:reverse geocoding to get country and adminlevels</title>
				<description><![CDATA[ Hi Claus

The countrySubdivision service does not yet include the shape files for the US counties. (The files are here on my pc but not yet integrated) 

Did you see the nearest address service?
http://ws.geonames.org/findNearestAddress?lat=37.98100996893789&lng=-87.50335693359375
I am not sure that the shape file will give better results.

The findNearbyPostalCodes service is using zip code area shape files for the US and closests postal codes from lists for other countries.

http://www.geonames.org/export/#findNearbyPostalCodes


Marc

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/278.page#1513</guid>
				<link>http://forum.geonames.org/gforum/posts/list/278.page#1513</link>
				<pubDate><![CDATA[Tue, 30 Jan 2007 22:09:29]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>reverse geocoding to get country and adminlevels</title>
				<description><![CDATA[ <p></p>

		<cite>noiv wrote:</cite><br>
		<blockquote><p></p>

		<cite>cla wrote:</cite><br>
		<blockquote>I am in the need of determine the country and as much adminlevels (state/county/district) as possible out of a given latitude/longitude.&nbsp;
		</blockquote>Could you please be more precise then.&nbsp;
		</blockquote>

Your solution solves the problem 'only' most of the time, but not always. What might happen if I am searching with a lat/lng near the border of an adminlevel when the nearest known place lies in another adminlevel? I think this will happen very often in regions with not that many known places like Africa or Australia....

So the best solution would be a polygon model (or whetever) of adminlevels...
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/278.page#1519</guid>
				<link>http://forum.geonames.org/gforum/posts/list/278.page#1519</link>
				<pubDate><![CDATA[Wed, 31 Jan 2007 10:43:57]]> GMT</pubDate>
				<author><![CDATA[ cla]]></author>
			</item>
			<item>
				<title>Re:reverse geocoding to get country and adminlevels</title>
				<description><![CDATA[ <p></p>

		<cite>marc wrote:</cite><br>
		<blockquote>Hi Claus

The countrySubdivision service does not yet include the shape files for the US counties. (The files are here on my pc but not yet integrated) 
&nbsp;
		</blockquote>
Hi Marc,
this are good news! 
Am I allowed to ask how do you change the shape data into something 'usable' for lat/lng? (Just a short hint or tutorial link would be VERY appreciate.) :)
<p></p>

		<cite>marc wrote:</cite><br>
		<blockquote>
Did you see the nearest address service?
http://ws.geonames.org/findNearestAddress?lat=37.98100996893789&lng=-87.50335693359375
I am not sure that the shape file will give better results.

The findNearbyPostalCodes service is using zip code area shape files for the US and closests postal codes from lists for other countries.

http://www.geonames.org/export/#findNearbyPostalCodes
&nbsp;
		</blockquote>

Hm, this is an interesting idea! (I didn't notice that the zip code search is using shape data!) Searching for the nearest known address and then search in the zip code shape area seems to be better than noiv's suggestion. But again I am not really sure what might happen if I am very close to a border... But nevertheless I will use this! (Mostly because there are no better alternatives.) 

... at least until you told me how I am able to convert shape data into something 'usable'! :-)

Have fun,
Claus


]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/278.page#1520</guid>
				<link>http://forum.geonames.org/gforum/posts/list/278.page#1520</link>
				<pubDate><![CDATA[Wed, 31 Jan 2007 11:06:29]]> GMT</pubDate>
				<author><![CDATA[ cla]]></author>
			</item>
			<item>
				<title>Re:reverse geocoding to get country and adminlevels</title>
				<description><![CDATA[ <p></p>

		<cite>cla wrote:</cite><br>
		<blockquote>
Am I allowed to ask how do you change the shape data into something 'usable' for lat/lng? (Just a short hint or tutorial link would be VERY appreciate.) :)
&nbsp;
		</blockquote>

I don't know what is <i>usable</i> for you. I often use the ogr utilities included in the fwtools kit to convert shape files and load them into a postgres/postgis database.

http://www.gdal.org/ogr/ogrinfo.html
http://fwtools.maptools.org/

Hope this helps

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/278.page#1522</guid>
				<link>http://forum.geonames.org/gforum/posts/list/278.page#1522</link>
				<pubDate><![CDATA[Wed, 31 Jan 2007 17:50:50]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:reverse geocoding to get country and adminlevels</title>
				<description><![CDATA[ <p></p>

		<cite>marc wrote:</cite><br>
		<blockquote>
Hope this helps
&nbsp;
		</blockquote>

Yes! I just started to convert some data! It works! I am impressed!

Now I have to check if it is that 'exact' as I hoped it would be....
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/278.page#1535</guid>
				<link>http://forum.geonames.org/gforum/posts/list/278.page#1535</link>
				<pubDate><![CDATA[Thu, 1 Feb 2007 20:09:19]]> GMT</pubDate>
				<author><![CDATA[ cla]]></author>
			</item>
	</channel>
</rss>