Is there any code to add a float or integer value with a raster layer? I can easily do mathematical operations between two raster data. But I am unable to do the same between float or integer number and raster layer. For example if want to execute (256-band3), how can I execute?
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
Try the raster package in R. Something like:
|
|||
|
|
If you have a copy of FME then you can use the RasterExpressionEvaluator transformer. In this case (256-band3) the expression would be simply:
(FME labels bands as 0,1,2 rather than 1,2,3). The nice thing is that it also allows IF statements, so you can work up to complex statements like:
This page on FMEpedia has a bunch of examples. |
|||
|
|
|
Try RasterCalc plugin for QGis. |
|||
|
|
|||
We're looking for long answers that provide some explanation and context. Don't just give a one-line answer: please explain why you're recommending it as a solution. Answers that don't explain anything will be deleted. See Good Subjective, Bad Subjective for more information. |
|||