I have a Raster, which covers only the southern part of the country, like this:
I wish to have a Raster, which covers the entire country (including the North part)? The northern part should have the nodata values.
How do I do this using GDAL or QGIS?
( I do not have ArcGIS, so I can't use the answer given here: Increasing raster extent by filling extent with no data using ArcGIS Desktop without Spatial Analyst?)
I tried using gdalwarp
's -te
parameter; It was successful in reducing the extent, but did not extend the extent to the Northern part.
Answer
My suggested workflow:
Create a polygon of the extent you want to cover
rasterize the polygon
fill it with a nodata value using gdalcalc
add the existing raster with gdalwarp without the
-overwrite
option.
No comments:
Post a Comment