Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two DEMs in .tif format and I am looking to merge the two. The main problem with merging these are that they are different resolutions (one is 10m and one is ~20m). Also, another problem with merging the two is that they overlap and I am not sure of the most effective way of dealing with that overlap. Obviously I want to keep the values of the better resolution.

So what are the best methods here?

  • Is there a python script available that works best with merging rasters? I would like to automate this with a script if possible.
  • Which process of resampling is best for DEM data? Bipolar, Cubic... ?
  • What is the best way to merge overlapping DEMs?
share|improve this question
up vote 6 down vote accepted

Question 1

The attached script mosaics a list of rasters into a new raster dataset. Make sure to specify "MINIMUM" if you would like to maintain your 10m resolution raster datasets.

Question 2

Bilinear interpolation and cubic convolution are both good choices for resampling continuous data. Nearest neighbor is best for discrete raster datasets. Keep in mind that resampling a 30m resolution DEM to 10m will not improve the quality of the DEM, but rather will create more pixels that represents 30m resolution.

Question 3

The Mosaic to New Raster (Data Management) tool is your best choice.

You can see Mosaic to New Raster does a great job at merging overlapping rasters and color balancing. enter image description here

import arcpy
from arcpy import env

# Set overwrite
arcpy.env.overwriteOutput = 1

# Set environment
env.workspace = r'C:\temp'
Dir = env.workspace

# Produce a list of raster datasets
rasters = arcpy.ListRasters()
list = ";".join(rasters)

# Raster to new mosaic
output = "new_dem" 
arcpy.MosaicToNewRaster_management(list,Dir, output, "", "", "", 1, "MINIMUM") 
share|improve this answer
Perfect! Thanks! I think the bug is gone now. It produced a tif for me just fine. – Spatial Pariah Apr 22 '13 at 0:48

Look into mosaics for the overlapping issue.

For the resolution, look into resampling.

These can be done different ways depending on which platform, software, etc.

share|improve this answer
Sorry, I meant to say that I am working in ArcGIS Desktop for this. – Spatial Pariah Apr 21 '13 at 16:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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