I am looking for a way to get the ISO 3166-2 subdivisions based on latitude and longitude. For example JFK airport has the coordinates 40.6413° N, 73.7781° W. and the ISO 3166-2 code is US-NY. Is there a database or a service to retrieve this data?
Asked
Active
Viewed 576 times
2
-
Have you checked with the local/state/federal geographic/kartographic offices? – Erik Dec 17 '20 at 08:15
-
2How about Geonames - see https://gis.stackexchange.com/questions/1514/list-of-language-codes-by-country – Ian Turton Dec 17 '20 at 08:33
-
1Thanks Ian, by using the endpoint http://api.geonames.org/countrySubdivision (https://www.geonames.org/export/web-services.html#countrysubdiv) I get the ISO 3166-2 codes! – Rogier Dec 17 '20 at 08:52
1 Answers
1
Ian Turton had a good suggestion by checking Geonames. By using the endpoint api.geonames.org/countrySubdivision (geonames.org/export/web-services.html#countrysubdiv) I get the ISO 3166-2 codes
Rogier
- 131
- 2