I have two vector maps. The two maps cover the same area but are split up into polygons differently (i.e. if you were to imagine one map placed above the other, the lines defining the polygons would not line up).

Map1 has its polygons colored red where crime is greater than some threshold, else white.

Map2 has its polygons colored red where poverty level is greater than some threshold, else white.

I wish to create a single map with polygons coloured red where either crime or poverty are above their thresholds. As the polygons from each map are different, new polygons would have to be created. I'm using GRASS.

Each file has an attribute table with several columns describing the polygons.

v.overlay with an 'OR' operation looks like a good candidate, but I can't figure out how to specify the correct attribute column to use for the OR merge.


I think the most straightforward way would be to use v.extract to get only the "red" areas from each map, then v.overlay on those. i.e.

v.extract map1 out=hi_crime type=area where="<an expression to select only the areas above your threshold>"

v.extract map2 out=hi_poverty type=area where="<expression to select proverty above thresh>" 

v.overlay ain=hi_crime bin=hi_poverty out=crime_or_poverty operator=or

This should leave you with an attribute table attached to the new crime_or_poverty map combining all the columns of both original maps.

  • Thanks @Micha, that worked. (I then did a v.overlay opperator=OR, with a map of the outline of the country to get the white bits back) – spiderplant0 May 29 '12 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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