I see people using the -wo SOURCE_EXTRA=100 option in their gdalwarp command when reprojecting to WGS84. What does it do? In the documentation it says:

"-wo" Set a warp option. TheGDALWarpOptions::papszWarpOptionsdocs show all options. Multiple-wooptions may be listed.

But I can't find this "TheGDALWarpOptions::papszWarpOptionsdocs" doc anywhere. Anyone able to explain or even better point me towards this document?


If you are on page https://gdal.org/programs/gdalwarp.html the box with text GDALWarpOptions::papszWarpOptions is a link and it leads to https://gdal.org/api/gdalwarp_cpp.html#_CPPv4N15GDALWarpOptions16papszWarpOptionsE.

SOURCE_EXTRA: This is a number of extra pixels added around the source window for a given request, and by default it is 1 to take care of rounding error. Setting this larger will increase the amount of data that needs to be read, but can avoid missing source data.

Extra pixels may be needed if the transformation rotates and warps the image quite a lot for avoiding odd behavior near the boundaries of "chunks" or subsets of image which gdalwarp is working on. Value 100 feels rather large to me but at least it should guarantee that the computed output window gets all the pixels that are needed from the input window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.