Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 5 down vote accepted

See here for an answer:

"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)."

share|improve this answer
Could you summarize the answer here, please? – underdark Jul 30 '11 at 22:45
Of course, I have edited my answer. – markusN Aug 1 '11 at 16:22

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

share|improve this answer
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 at 11:55

Your Answer


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.