I have a big raster image with medium details, but for some regions I do have far more details as a seperate raster image.

Now I'd like to display both of them in my map that I render with Tilemill. So now I would need to cut a hole out of the bigger raster (exactly the shape of the small one) file so that both layers will be properly displayed on my map. (Note: I don't display it with an opacity of 100%)

I found that using the gdalwarp -cutline shape.shp input.tif output.tif command I can cut a raster. But I need the inverse of that. Is there a parameter for gdal which I am missing?

Thanks a lot


You can use gdal_merge which will combine the rasters. Have a look at the description of gdal_merge:

This utility will automatically mosaic a set of images. All the images must be in the same coordinate system and have a matching number of bands, but they may be overlapping, and at different resolutions. In areas of overlap, the last image will be copied over earlier ones.

| improve this answer | |
  • Hey Torsten, I now resumed the work on this... But the gdal_merge is of no help for us, as the different GeoTiffs have different resolutions Also increasing the resolution on the low-resolution GeoTiff would make a really really huge raster-file. So I'd really like to just cut a hole into my geotiff... Any idea how that works? – Georg Aug 26 '14 at 12:55

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.