|
|
|
|
|
by leni536
3616 days ago
|
|
> We cannot use those (xi,yi)(xi,yi) directly, because they come from a Mercator projection of the earth, thus they are distorted. I had to apply a transformation to them in order to get coordinates that aren’t distorted. In order to do that I used the pyproj library. Nitpick: you apply a transformation where they are less distorted. There is no "distorsionless" mapping from R^2->sphere. A more accurate approach would be to use spherical geometry to calculate the actual areas, but I doubt that it would change the values too much though. Also I would be curious what was the exact projection you used and how you choose the parameters for each 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!