3

For modeling purposes, I need to use two raster maps that contain exactly the same number of rows and columns. How should I process my maps to obtain this result? For now, my maps don't have the same number of rows and columns...

1 Answer 1

1

Supposing that they are aligned with the same resolution (cell size), in QGIS you can do that with this approach. For example, I have these 2 raster maps where it is obvious that I should clip the big one by the small map:

enter image description here

First, open layer properties of the "small" map and copy its extent in a text editor (see next image, red rectangle). Modify the order 1, 2, 3, 4, without commas, to 1, 4, 3, 2 and copy it.

enter image description here

Close layer properties and open Clipper Tool in Raster -> Extraction -> Clipper. Select the names of input and output files, and drag with the mouse one arbitrary area on the map and click on the icon pencil for editing gdal_translate command. Change projwin parameters for the modified at text editor.

enter image description here

After OK, the clipped image it will have the same number of rows and columns if they have the same resolution.

enter image description here

1

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.