jeudi 7 décembre 2017

Lightweight tool for generating random coordinates for specific region / country?

For now, I'm generating geo positions with only random module:

from random import uniform
geo_position =  (uniform(-90, 90), uniform(-180, 180))

Obviously, this method can produce a dot somewhere in the ocean or about it. So I want to be able to specify some region (e.g. Asia) or even country and get the dot from that area.

Are there any tools/snippets for this?




Aucun commentaire:

Enregistrer un commentaire