I do have a NUTS-2 region shapefile as you can see below
and a raster (.tif) file that represents the soil erosion (tonnes per hectare per year) derived from the RUSLE2015 model.
What I want is to clip the raster according to the extent of the shapefile.
However, when I used the clip and extract by mask tools by also specifying different parameters and values in the enviroments (e.g. processing extent) the final output is as follows:
As I know and show in several similar questions in GIS Stack exchange, this is common to happen as a raster is a kind of matrix which is composed by n rows and m columns, so the extent of it is rectungular. The reddish area are pixels without values so you only have valid pixels in the extent of the shapefile.
By considering the rationality behind this problem, I need to find a solution to avoid the NoData values surrounding the preferred extent as my tif file has already NoData values inside the shapefile extent from which I would like to derive some statistics and information (e.g. area).
Can you think of any way to solve this problem?
Should it be converted to another format?