0

Is there any way to use open source tools (preferably QGIS) to rasterize a vector to create a raster with the same coordinates and resolution as an existing raster?

I know that the map size can be set using gdal_rasterize, but I'm hoping for something more precise...

1 Answer 1

1

GRASS will be very helpful to you since it uses a computational region to work on :

In computations,

  • raster input maps are automatically cropped/padded and rescaled (using nearest neighbour resampling) to match the current region in order to produce the output raster map or to query values.

  • Raster output maps have their bounds and resolution equal to those of the current computational region.

  • Vector maps are always considered completely.

So, using GRASS, you will define the region according to the existing raster

   g.region rast=myExistingRaster

(Adding -p option to the command will display raster properties)

And then, run the command to rasterize your vector layer :

   v.to.rast

More info on v.to.rast command is available online.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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