[GIS] Checking if GPS coordinate is in country polygon

geojsongeotoolsjava

In order to check in which country GPS coordinate is in, I've found this github repo, where there is GeoJSON file for each country.

I've loaded the files to geojson.io, and they seem very accurate.

However, when I'm loading them into to my application code, some of the GPS coordinates fails to resolve.

For example, GPS coordinate from Paris [2.356652, 48.845483] which I would expect to resolve to France.
Looking at france.gsojson polygon coordinates I find they're in completely different scale, for example 722.5350952148436,51.10007257240614.

What am I missing here? How come the coordinates are completely different? and is there a way to convert one to another?

My code is written in Java and I'm using GeoTools libraries.

Best Answer

The earth is 360 degrees round. So if you add 360 to any longitude you get back to where you started from. Your example of "722.5350952148436,51.10007257240614" is probably double wrapped round the world, and the longitude should have 360*2 = 720 subtracted from it to get 2.535....

The creator may have messed this up when adding the French dependencies, or before that. File an issue.

Actually there is a closed issue already there: https://github.com/georgique/world-geojson/issues/2