gdalwarp cutline off source problems
|Reported by:||warmerdam||Owned by:||warmerdam|
I came across an issue while using gdalwarp (gdal-16) while specifying a tiling extent and a cutline to warp an image into a new image. The cutline is completely outside the source image but intersects the target extent. Here is what I’m experiencing with the attached files:
- Using the cutline with the target extent results in errors
- Using the cutline with the target extent and using -wo "SKIP_NOSOURCE=YES" works fine
- Using the cutline without the target extent and without -wo "SKIP_NOSOURCE=YES" also works fine
Here is my command output for the first case:
e:\DEV>gdalwarp -te -79.980468750000000 39.55078125 -79.8046875 39.726562500000000 -cutline E:\DEV\2009\Frank\skip_nosource\alpha.shp E:\DEV\2009\Frank\skip_nosource\band1_lzw_lr.tif E:\DEV\2009\Frank\skip_nosource\out.tif Creating output file that is 31641P x 31641L. Processing input file E:\DEV\2009\Frank\skip_nosource\band1_lzw_lr.tif. ERROR 1: Attempt to create 7911x0 dataset is illegal,sizes must be larger than zero. ERROR 10: Pointer 'hDataset' is NULL in 'GDALAddBand'. ERROR 10: Pointer 'hDS' is NULL in 'GDALSetGeoTransform'.
I also get a ‘gdalwarp.exe has encountered a problem and needs to close. We are sorry for the inconvenience’ popup. Please let me know what you find.