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.
1 Answer
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
-
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. Commented Feb 26, 2011 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.– scwCommented Feb 26, 2011 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.– markusNCommented Feb 26, 2011 at 19:02