Search code examples
google-mapsgpsgiscoordinatescoordinate-systems

Get countries within range of LAT/LONG coordinates


Trouble!

I'm looking for a way to find the countries within a given range of LAT/LONG coordinates.

E.g.:

When viewing an area in Africa using Google Maps, I get out which countries that are in my current view.

This is a bit ambitious, and I think the main problem will be dealing with accuracy of the needed polygons. The accuracy of these don't need to be all that great, the borders can probably be tens of miles off, or even more.

This will be needed for the entire world.


Solution

  • You can solve this easily using QGIS based on the assumption that you have

    1. A GIS layer of Africa (if not you can find one using google
    2. A point layer based on Lat long (or you can use Qgis's text delimited import)

    using ftools -or- Vector menu, there is a feature called points in polygons that should solve your problem