Monday 4 March 2019

raster - Visualize challenge: show origin of aggregated minimum r.series job


Using r.series with the aggregate minimum option I'm merging multiple viewshed results to visualize how much vertical space a development area has for new buildings. Meaning that a part of the height limitation comes from raster1.tif while the height limitations for another part of the area could come from raster2.tif etc.



enter image description here


Currently I'm classifying the merged results for every 4th meter and coloring it different color so that the reader can understand how much space there is left. This is a working product that fills it's purpose, BUT:


My question is if it's possible to create a compliment map that doesn't care about the actual raster values but rather visualizes the origin of the merged results? Or put in other words: can I style the raster so that values extracted from raster1.tif gets one color and values from raster2.tif another color?


I've been elaborating with a merge that stacks the input layers in different bands but haven't been able to set the color for more than three bands simultaneously, and also the aggregate minimum function is also missing in this attempted solution.


I'm currently using QGIS but also have access to FME, Arc, Mapinfo and PostGIS.



Answer



I've not tried this, but according to the GRASS 6 documentation for r.series there's an option for the method parameter called min_raster. This also seems to be available in GRASS 7 although the docs only list it as an option.



min_raster: raster map number with the minimum time-series value




Likewise for max_raster. It only works with min/max stats (which makes sense).


Also, from this page



The min_raster and max_raster methods generate a map with the number of the raster map that holds the minimum/maximum value of the time-series. The numbering starts at 0 up to n for the first and the last raster listed in input=, respectively.



Although it mentions time series, I think this might work for your particular case given you're looking for the raster number with the minimum value for each cell.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...