New answers tagged gdalwarp
This is problem in the GDAL library. It appears that GDALSuggestedWarpOutput() is giving weird output for width and height of the output file. I haven't found a way to work around this yet.
For irregular polygons, and assuming that your geotiff raster file is a binary raster, you could use GDAL_Calc: GDAL_Calc.py -A Mask.tif -B CutBigImageToClip.tif --outfile=SmallerFile.tif --NoDataValue=0 --Calc="B*(A>0)" This query will populate 0 where Mask.tif <= 0 and BigImage where the Mask > 0. To do this both rasters must be the same cell ...
I don't know if it's possible to clip a raster with an other raster but you could use gdaltindex to build the shapefile with the extent of your raster. http://www.gdal.org/gdaltindex.html
After searching around for similar situations, I fixed the issue by' Reordering the bands to RGBN (They were BGRN) with gdal translate Converting the images from Uint16 to Byte with gdal_translate Lastly, I warped them using gdalwarp using the -tr and -tap options. The solution at step 3 I found at: Holes between imagery tiles projected using gdalwarp
Top 50 recent answers are included