Random geographic coordinates (on land, avoid ocean)

前端 未结 16 1134
死守一世寂寞
死守一世寂寞 2020-12-08 10:03

Any clever ideas on how to generate random coordinates (latitude / longitude) of places on Earth? Latitude / Longitude. Precision to 5 points and avoid bodies of water. <

16条回答
  •  伪装坚强ぢ
    2020-12-08 10:20

    Assuming Atlantis isn't in the database, you could randomly select cities. This also provides a more realistic distribution of points if you intend to mimic human activity: https://simplemaps.com/data/world-cities

    There's only 7,300 cities in the free version.

提交回复
热议问题