3

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

1 Answer 1

3

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

3
  • 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
    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.
    – scw
    Commented 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.
    – markusN
    Commented Feb 26, 2011 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.