Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a world map. I need random point geometry. So, how can I randomly generate point coordinates? Any programming language. Also, I am using SRID 4326.

Any programming language.

share|improve this question
Do you just need a single point? – Nathan W Apr 28 '13 at 8:43
Yes, but it should be absolutely random coordinate. – Bob Apr 28 '13 at 8:45
But algorthm for n points will be also a good choice – Bob Apr 28 '13 at 8:46
up vote 5 down vote accepted

With some Python:

from random import uniform
x, y = uniform(-180,180), uniform(-90, 90)

or for a loop:

def newpoint():
   return uniform(-180,180), uniform(-90, 90)

points = (newpoint() for x in xrange(10))
for point in points:
   print point
share|improve this answer
Nice, simple solution. – Fezter Apr 29 '13 at 1:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.