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 am using: v.db.select map=PHL_adm1 where=NAME_1='Bulacan'

My vector map is over the raster map. I want to select the part of the raster map under the polygon(NAME_1='Bulacan') of a vector. Is it possible to do?

share|improve this question
    
What do you want to do with the selection? Do you want to create a new layer from it? –  underdark Jan 29 '11 at 20:36
    
possible duplicate of How to combine a vector and a raster file? –  djq Jan 29 '11 at 23:17
1  
I am not a grass person. But have tried to use it. Here is someplace you might find some answers until someone knowledgable responds...grassbook.org –  Brad Nesom Jan 30 '11 at 3:45

1 Answer 1

up vote 3 down vote accepted

Hi here is the procedure to do that:

v.to.rast - convert vector to raster.
r.mask - create a mask from the raster.
r.resample - to create a new raster clipped by the mask.

share|improve this answer
    
It worked. Thanks! –  teamAngat Jan 31 '11 at 17:53
    
After comparing the initial raster map and the resulting raster map from r.resample, I noticed that the map from r.resample had produced a map with altered values. The portion within the polygon of the initial and resulting map differed in values. How was that possible if the r.resample just crops a map from the mask? –  teamAngat Mar 8 '11 at 17:45

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.