I am currently attempting to orthorectify an image using GDAL. I have a very detailed DEM that I would like to rectify the image on top of. However, the DEM is smaller than the image itself; this is fine though since I only want to orthorectify a small portion of the image. However, to do so I must crop the image to that small region or orthorectify and then crop. The issue is that since the DEM is smaller than the image, orthorectification failed with the "too many points failed to transform" error message with GDAL warp. As such, the alternative would be to crop the image, but I have no idea how to crop non-orthoimages in GDAL. The input file is currently in a VRT file which refers to the originalDEM file and contains the RPC camera information.
So in short, how can I accomplish this task with GDAL? Are there any other tools I can use? Or will I have to completely rethink my approach? Is there a way I can buffer my DEM with 0 values so that it orthorectifies without errors and then crop it? Or would I have to figure out how to crop it first?