Hacker News new | ask | show | jobs
by gciruelos 3615 days ago
What I do is the following: For each country, I transform its points from the equirectangular projection I'm given to an azimutal projection centered in some point (that depends on the country).

That point is obtained by computing the midpoint of two random points from the border of the country.

I know it is not the best (if the country is not convex, then the midpoint isn't necessarily inside it), but it works. The code is at the end of the post, if you want to take a look at it.

Thanks for pointing that out though, I'm going to add this to the post.

Edit: you were right, it wasn't even the Mercator projection, it was the equirectangular projection. Thank you!