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 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 cant figure out how to specify the correct attribute column to use for the OR merge.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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

 
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.