Now lets change extent for A. In Raster calculator enter expression: will simply leave A values unchanged. Execute expression and save its result – it will be a template for raster A. ![]() In Raster calculator ( Raster -> Raster calculator) insert expression: * 0, highlight VR raster (by clicking on it) in Raster bands and click on Current layer extent button. Now we will create a templates for expanded A and B. Here choose rasters A and B to become a virtual raster ( VR) and do not define noData values. Go to Raster -> Miscellaneous -> Build Virtual Raster. We will use QGIS’s Raster calculator plugin. Firstly we need to create an empty georeferenced image with needed extent. Say, we need to add A values to B values and get the final image to have extent that will contain both images. There are two overlapping (one band) rasters A and B. Lets examine one of the worst case scenarios. In QGIS you can change extent of the rasters. But in case of georeferenced images you will loose spatial reference information. With regular (not georeferenced) images you can simply load them in GIMP and increase or decrease canvas for amount of pixels you like. When you need to perform algebraic operations with two or more rasters you often have to ensure that these rasters have the same extent, otherwise the operation either won’t be allowed (in SAGA for example) or you will get output raster cropped to the overlapping part. UPDATE: you can download Processing script for this task here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |