Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

5 Answers 5

Compose your map and export using d.out.file http://grass.osgeo.org/gdp/html_grass64/d.out.file.html

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
add comment

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
add comment

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
3  
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
add comment

Maybe use ps.map1 to export vectors and the raster to a *.ps. Then just convert the *.ps into *.png (convert out.ps 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 flood_warning.ps 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
add comment

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
add comment

Your Answer

 
discard

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.