1

I have a large number of geotiffs (a few thousand), that are in a few different projections. IE EPSG:32628, EPSG:32629, EPSG:32630. I would like to reproject the tiffs to 3857 so they are all in the same projection. I am also serving them out as 3857 so I would save some time not reprojecting on the fly.

If I reproject each file on its own gdal is very fast. However the tiffs do not mosaic together as the reproject leaves lines at the edges.

enter image description here

From the image above you can clearly see where the original tiffs were stitched together.

I have thought about using gdalwarp to create one giant image, but the processing might take days and I will likely end up with a tiff too big to handle.

Is there a way to reproject the individual tiffs but take into account surrounding tiffs when doing the reprojection so I don't end up with blank lines at the edges?

  • Add a screenshot about the artifacts that you have between the images. – user30184 Mar 26 '17 at 13:09
  • It is slightly tricky but your artifacts should be NoData thereby easy to remove. You could create mini VRT files of up to 9 images, warp and then clip to a grid but still that's a lot of work. It might just be better to create a single VRT, get the projected extent and tile the output using gdalwarp -te xmin ymin xmax ymax in EPSG:3857. If you call subprocess.popen('gdalwarp -te {} {} {} {}...-multi..'.format(... you could perform a warp per pair of cores (8 cores = 4 processes). Would this sort of thing suit your purpose? – Michael Stimson Mar 27 '17 at 1:27

Your Answer

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

Browse other questions tagged or ask your own question.