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 have a raster map that I generated from cropping/masking from a bigger raster map. It produced a map with only a portion of not null values. I only want to have a map that is zoomed in to the portion of not null values in order to save it into a PNG file. I only succeeded in setting the region (g.region) to the portion, but not cutting the map that only contains that portion.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

you can do that with the help of MASK and r.resample (make a copy of your raster before) This video would guide you : http://www.youtube.com/watch?v=0tfcyxRvEJ8

share|improve this answer
    
Thanks! it was very helpful. Given the resulting map that I generated, can i save the map in PNG format? I tried running the r.out.png, but it failed and produced errors. –  teamAngat Feb 26 '11 at 17:26
    
how did it fail? you may want to try r.out.gdal with the PNG driver instead, its more robust than the one-off exporters. –  scw Feb 26 '11 at 17:36
    
You can use r.out.gdal to export to PNG. But r.out.png works fine, you "just" have to write into a directory in which you have permissions to save files. –  markusN Feb 26 '11 at 19:02

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.