Jump to content

Determine Country from Coordinates


DougDawn
Followers 2

Recommended Posts

Is there a website or app that I can use to input coordinates and receive the country name? I need it for caches very close to international boundaries, both searching and planting.

 

Google has a geocoding Web service. You send it a URL with the lat and lon in it and it returns either XML or JSON with lots of geographical data.

 

The URL looks like this:

 

http://maps.google.com/maps/api/geocode/xml?latlng=<lat>,<lon>&sensor=false

 

where <lat> and <lon> are latitude and longitude in digital degrees.

 

Here's a sample for you to try, near a country boundary:

 

http://maps.google.com/maps/api/geocode/xml?latlng=45.500,-73.454&sensor=false

 

That will show you that you are in Canada. Change the "xml" to "json" to get the response in that format instead. Neither one is particularly human-friendly, but it has the information you want.

Edited by fizzymagic
Link to comment

Is there a website or app that I can use to input coordinates and receive the country name? I need it for caches very close to international boundaries, both searching and planting.

 

You can plug the coordinates into Google and let their maps do the work, or you can download Google Earth.

Thanks, but I'm not confident that the line representing the international bdry on GE is totally accurate.

Link to comment

Is there a website or app that I can use to input coordinates and receive the country name? I need it for caches very close to international boundaries, both searching and planting.

 

Google has a geocoding Web service. You send it a URL with the lat and lon in it and it returns either XML or JSON with lots of geographical data.

 

The URL looks like this:

 

http://maps.google.com/maps/api/geocode/xml?latlng=<lat>,<lon>&sensor=false

 

where <lat> and <lon> are latitude and longitude in digital degrees.

 

Here's a sample for you to try, near a country boundary:

 

http://maps.google.com/maps/api/geocode/xml?latlng=45.500,-73.454&sensor=false

 

That will show you that you are in Canada. Change the "xml" to "json" to get the response in that format instead. Neither one is particularly human-friendly, but it has the information you want.

Thanks, looks interesting. I'll have to try that.

Link to comment

Is there a website or app that I can use to input coordinates and receive the country name? I need it for caches very close to international boundaries, both searching and planting.

 

You can plug the coordinates into Google and let their maps do the work, or you can download Google Earth.

Thanks, but I'm not confident that the line representing the international bdry on GE is totally accurate.

 

Why not? Google doesn't produce all the data one can view on their maps. Much of it comes from third party sources such as AutoNavi. Try going to Google maps and zoom out a bit then start panning around to different countries. Note the text at the bottom of the map and you'll see it change frequently as you look at different areas on the map. You could try other geocoding services (such as geonames) and get the same results as they may be using data from the same source. Geonames has a complete list of their data sources (http://www.geonames.org/data-sources.html) and as you can see, there are a lot of them. How are you capturing the lat/long coordinates that you're sending to a geocoding service? It's likely far less accurate than the equipment a GIS surveying agency such as the U.S. Geological Survey is using.

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Followers 2
×
×
  • Create New...