Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

1 Answer

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 v.to.db 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 v.to.db, 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
add comment

Your Answer

 
discard

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.