Skip to content
Tools to find out country where given GPS coordinates are
Branch: master
Clone or download
che0 Merge pull request #2 from guyomd/master
Python 3.6 compatible
Latest commit eedc57f Dec 12, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
README initial import Sep 5, 2010 Python 3.6 compatible Dec 12, 2018


These are two miniature tools intended to help with the task of finding what country are given GPS coordinates in.

The tools are:

 Filter country shapes to create a smaller shape file. Use like this:
 1) get world borders from
 2) run python
      import copyshapes
            lambda x: x.GetField('REGION') == 150,
            'TM_WORLD_BORDERS-0.3.shp', 'EUROPE.shp'

 Find what countries given GPS coordinates are.
     import countries
     cc = countries.CountryChecker('TM_WORLD_BORDERS-0.3.shp')
     print cc.getCountry(countries.Point(49.7821, 3.5708)).iso


This code is in public domain.
You can’t perform that action at this time.