<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "strangely empty results from some subdivision locations"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "strangely empty results from some subdivision locations"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>strangely empty results from some subdivision locations</title>
				<description><![CDATA[ I am trying to find a way to get ISO3166-2 (and failing that FIPS10-4) codes for as many of the admin1 codes as I can.

Using the dump files to get a list of lat/lng for adm1 records and querying the 
http://api.geonames.org/countrySubdivisionJSON endpoint doesn't always return the expected structure.

For example, geonameid 11205389 has latitude 18.177 and longitude -63.09161.

but requesting on http://api.geonames.org/countrySubdivisionJSON?lat=18.177&lng=-63.09161&lang=en&level=1&radius=100&username=<myusername>

returned this json structure: {'distance': 0, 'countryCode': 'AI', 'countryName': 'Anguilla'}

instead of something like this:
{'codes': [{'code': '06', 'level': '1', 'type': 'ISO3166-2'}],
 'adminCode1': '06',
 'distance': 0,
 'countryCode': 'AD',
 'countryName': 'Andorra',
 'adminName1': 'Sant Julià de Loria'}

I'm using the location specified within the source data, so why isn't it returning the information for that record?

Is there a better way to get the iso and fips codes for these records? Something that doesnt' require consuming credits on geonames would be even better. (I'm running things in python, so something on github or pypi is strongly preferred)
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/39157.page#51863</guid>
				<link>http://forum.geonames.org/gforum/posts/list/39157.page#51863</link>
				<pubDate><![CDATA[Fri, 20 Oct 2023 14:53:19]]> GMT</pubDate>
				<author><![CDATA[ kotoro]]></author>
			</item>
	</channel>
</rss>