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 vector map that contains 100 points. For each point, I would like to shift it 250 units in a random location. It's easy enough to shift all points in a specified direction using

v.edit map=<mapname> type=point move=250,250

But what I need to do is to do this for each point and vary the direction randomly. The magnitude of the shift can be constant. (i.e. xshift can be -250 or 250).

Is there a solution that doesn't require me to iterate over the set of points individually?

Ideally, I'd like a solution that doesn't require me to use Python -- I'm trying to do all this with bash.

share|improve this question
up vote 1 down vote accepted

You may want to use v.perturb - random location perturbations of GRASS vector points. It allows you to select the distribution of perturbation and the deviation in map units.

share|improve this answer
Yes. This is what I need. – ShaunLangley Apr 17 '13 at 23:30

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.