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

The ArcGIS Sort tool creates a new feature class with features sorted by geometry. For example, it can number features IDs from north to south, etc. Is there a way to renumber the cat field in a GRASS vector map based on geometry in a similar way?

share|improve this question

In GRASS GIS, you can use v.reclass to achieve this goal. For each target category (ID) you can define a where statement to use attribute values to perform the job. See the manual for an example. Other tools like help you to populate the attribute table properly for this task.

share|improve this answer
I had looked at v.reclass, but was holding out for something that didn't require me to put geometry in the attribute table beforehand. Guess I'll just bite the bullet, and maybe file an enhancement request later on. – dericke Dec 10 '12 at 23:33
Is there a way to select only Y coordinates with, or do I need to make a dummy column for the X and drop it later? – dericke Dec 10 '12 at 23:47
The manual says: coor: point coordinates, X,Y or X,Y,Z, so you will need to drop the X column later. – markusN Dec 13 '12 at 22:15

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.