I need to output a PNG file of a raster map overlayed with boundaries present in a vector map. The problem is, the r.out.png script only exports a raster map. My boundaries are in a vector format. When I tried to convert the vector boundaries into a raster, in order for me to combine them, the converted raster from vector contained the filled vector boundaries. I only need the lines to be present in the raster map. Is there a way to do it? I cannot use the d.rast and d.vect since I am calling the scripts in a shell script so there would not be any GRASS windows open.

2 Answers 2


See here for an answer: http://lists.osgeo.org/pipermail/grass-user/2011-July/061498.html

"If you want to convert the boundaries to rasterized lines instead of the area, you would first need to convert the boundaries to lines and then convert the vector lines to raster.

Also make sure that the computational region is correctly set (extents at least overlapping with the vector map and the desired resolution)."

  • 1
    Could you summarize the answer here, please?
    – underdark
    Jul 30, 2011 at 22:45
  • Of course, I have edited my answer.
    – markusN
    Aug 1, 2011 at 16:22

Please check section "6.7 Vector data transformations to raster" from Grass Book 3rd edition. It explains you are looking for.

  • This doesn't explain anything. When you answer a question, please make it helpful also for people who don't have access to a specific book.
    – ArMoraer
    Apr 25, 2016 at 11:55

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.