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?

  • 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

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.

  • 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

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.