TransWikia.com

Raster can't be clipped inside the polygon's boundaries

Geographic Information Systems Asked by Antonije on September 4, 2021

Here is the link what it looks like when its clipped: https://prnt.sc/r7wjfi

I just want a raster which is inside of the polygon’s boundaries. I work in QGIS. Any suggestions?

One Answer

This is easier when your clipping layer is a raster too.

so use one of the rasterizer options first. I usually go for the Grass tool v.to.rast, it seems to give good results. As 'source of raster values' use the option 'val' and fill in the value 1. This should be the default too. In Advanced Options select your first raster layer as the extent and make sure the cell sizes are identical too.

Now you should have a raster the same size and cellsize as your first raster but with a 1 or null value and a blob in the shape of your vector.

Now use the raster calculator with the formula (original raster value) x (your rasterized vector).

Everything within the vector blob should keep the same value, everything outside has value 0.

Answered by Borgh on September 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP