user50263
user50263

Reputation: 19

countries covered by a GPS trace

I have a GPS trace and I wish to find out which countries does this trace effectively span. In other words if I go over the trace from beginning to end which countries does the trace go over. Is there an API call which can help me accomplish this task?

with kind regards

Rohit

Upvotes: 0

Views: 27

Answers (1)

AlexWien
AlexWien

Reputation: 28767

If you want to program it yourself:

  1. Download the rough country borders as polygons in latitude longitude format (WGS84). (There are stackoverflow answers on this topic)
  2. for each coordinate of the GPS trace call a "point-in-polygon" algorithm, where each country is represented as one polygon. You might want to ignore special situations like enclaves. (That would be a country polygon with holes)

Upvotes: 1

Related Questions