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.

I need to combine polygons of similar geological classes which are stored in a vector file called geology. I was looking for somethiing like "union selected features" or similar. In the GRASS Book 3ed I found that v.overlay could be useful, however I did not manage to merge/union my classes.

To illustrate it, here an example: I have a polygon with class (column MAIN_LITHO) 'biotite granite' but also 'biotite granite (foliated) and others. These should be all combined into one single multipolygon 'biotite granite'. Later, I want to turn that vector into a raster map but that should be easy.

here is also an image of that example

enter image description here

thank you in advance!

share|improve this question
    
Do you need the merged polygons for anything else but coverting them to raster? –  underdark Aug 19 '11 at 13:59
1  
At present there are 208 classes and I need something around 20 to have something to work with. I found the solution already. reclass would be the magic word. sadly I cannot answer yet my own questions, otherwise I could explain a bit more. What I needed wass either r.reclass or v.reclass. I found it after skimming again through the GRASS book. Sorry for my confusing terminology earlier. –  Jens Oldeland Aug 19 '11 at 18:46

2 Answers 2

The combination of the polygons is fairly easy to obtain in three steps:

  • add a new column (v.db.addcol), copy over the values from either the cat column or the textual column (v.db.update);
  • Update the new column again with a selection of either the categories of interest or string selection (where="MAIN_LITHO LIKE 'biotite%'" ; requires a real SQL backend like SQLite or PostgreSQL) in order to obtain the same value for all biotite entries;
  • Finally run v.dissolve on this new column.

Then you will have the task solved (there is no need to rasterize).

share|improve this answer

You could select your polygons and then calculate a new field to use to dissolve on. Or, as underdark says, if you only need them to create the raster, just export your selection to a new file, and convert that to raster.

share|improve this answer

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.