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 am trying to save a raster and vector into a PNG file. The vector is overlayed on top of the raster map. I was only able to save the raster file into a png using r.out.png but without the vector.

share|improve this question

Compose your map and export using d.out.file

share|improve this answer
d.out.file did not work. It displays "Command 'd.out.file' not yet implemented in the GUI. Try adding it as a command layer instead." – teamAngat Mar 20 '11 at 13:45

Try this:

d.mon start=png
d.rast RASTER
d.vect VECTOR
d.mon stop=png

This will basically render VECTOR layer on top RASTER layer to a file called map.png.

Other things you could do with d.mon start=png - d.mon stop=png:

  • Type d.erase to wipe the slate clean before committing with d.mon stop=png
  • Include the legend with d.rast.leg:

    d.mon start=png
    d.rast.leg RASTER
    d.vect VECTOR
    d.mon stop=png
  • Put the legend to a separate image with d.legend:

    d.mon start=png
    d.legend RASTER
    d.mon stop=png

Useful stuff..

share|improve this answer

I think this is going to depend on what software you're using.

Also, I think that in saving them as a .png, you're going to be losing any distinction between the two, as far as being able to use them separately.

Anyways, in the case that you're using Arcgis, you should be able to go:

File --> Export Map, where you can save your current view as a .png.

share|improve this answer
I'm using GRASS. I'm finding a script that would make it work instead of using the save option in the interface – teamAngat Mar 20 '11 at 6:26

Maybe use ps.map1 to export vectors and the raster to a *.ps. Then just convert the *.ps into *.png (convert out.png)

share|improve this answer
I cannot convert the .ps to .png. I tried # convert to PNG pstoimg -antialias -aaliastext -out flood_warning.png -scale 1.3 \ -crop tb but it does not work. Is there another way to do it? – teamAngat Mar 20 '11 at 14:26
What happened.. the error message? – markusN Mar 20 '11 at 19:23
It displays: ERROR: pstoimg : illegal request – teamAngat Mar 21 '11 at 7:58

The simplest way, I guess. Display the desired layers to elaborate your map and simply make a screenshot. Then, save as png.

share|improve this answer

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.