I am having the following issue when reprojecting imagery tiles using gdalwarp.

These are 4096x4096 imagery tiles, which I'm gdalwarp'ing from WGS84 to a State Plane projection. When reprojected, the tiles, naturally, overlap, and so have added an alpha channel which takes care of it nicely.

However, when viewed together, after reprojection, the tile edges don't quite match up. Note also that this is NOT an issue or artifact with the alpha channel---I can use nodata instead of alpha, or just leave the area black, and the edges remain broken, with holes, just the same. Below is an example of a 1:80 scale crop of the seam between two tiles after projection. It maintains this pattern of holes along the entire seam between two tiles.

The basic command I'm using looks something like this:

gdalwarp -s_srs EPSG:4326 -t_srs EPSG:0000 /path/to/source.jp2 /path/to/dest.tif

I've exhausted most of the options I can think of from gdalwarp ( http://www.gdal.org/gdalwarp.html ) and the warp options ( http://www.gdal.org/structGDALWarpOptions.html#a0ed77f9917bb96c7a9aabd73d4d06e08 ), including different resampling methods, increasing the SAMPLE_STEPS density, and playing with additional SOURCE_EXTRA pixels. All with no change whatsoever.

I realize creating a mosaic first, reprojecting, and then retiling would be one way around this issue, but I'm dealing with tens of thousands of these ~16 megapixel tiles, so as far as I can tell, a mosaic is not feasible.

Any ideas on an approach to deal with these edge inaccuracies? Thanks!

Seam between tiles

1 Answer 1


Creating a mosaic from your source images takes only a few seconds if you use GDAL virtual raster as output. Read

http://www.gdal.org/gdal_vrttut.html and http://www.gdal.org/gdalbuildvrt.html

Often the artifacts like you have can also be avoided by taking care that the individually warped images are aligned to use a common canvas. This can be achieved by using -tap parameter together with -tr parameter. I would try that first. Read about -tap from http://www.gdal.org/gdalwarp.html

  • Thank you! The -tr and -tap combination did indeed solve the problem! To expand on that, because my target SRS was in feet and my imagery was 6-inch, the final command, using -tr and -tap looked something like this: gdalwarp -tr 0.5 0.5 -tap -s_srs EPSG:4326 -t_srs EPSG:0000 /path/to/source.jp2 /path/to/dest.tif Jul 21, 2014 at 19:17
  • I tried this and it did not work - I believe this is because due to the warping from the original square TIFFs (NAD83 to WGS84) there is transparency on the edges and the new TIFFs are no longer square. Therefore there is nothing for gdal to interpolate when creating mosaic on the tile edges. When all the TIFFs are warped from a mosaic it uses the neighboring images to fill in these gaps, at least that's my best guess.
    – Malcolm
    Sep 23, 2021 at 18:37
  • Is it possible to download two adjacent images for a test? If they are adjacent in source CRS it should be possible make them adjacent in target CRS as well, in a pixel perfect way at least with some combination of format and process.
    – user30184
    Sep 23, 2021 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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