0

I have some data for country borders. I am making a small program that need to load a border on demand when a position in the program gets close to a country (which consists of multiple loops of GPS points).

It does not have to be super accurate, but on the other hand, loading a long country like Italy should not be as simple as a single GPS with a distance check. But maybe 4 points would be ok.

I need to keep a small database I reckon of each country with some precomputed params that determine when to load it, so its not CPU intensive. How do I automate generation of such params, I am a bit out of ideas..

3
  • 4
    What have you tried? What language/software are you using? If you are using python, I'd recommend looking into shapely.snap. Maybe provide some images of what you are trying to do. Commented Jun 1, 2023 at 22:45
  • While Italy isn't a large country, it is highly irregular, so four vertices seems inadequate by four to six orders of magnitude. Commented Jun 2, 2023 at 12:00
  • I ended up just drawing a box around each country and check how many degrees I was away from them. Thanks for the replies. I programmed it in Nasal, but shapely seems cool. Commented Jun 2, 2023 at 19:59

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.