[Gdal-dev] Merging Dems

Frank Warmerdam warmerdam at pobox.com
Wed Jun 21 10:23:51 EDT 2006


Chris Pennock wrote:
> Hi all,
> 
> Merging dems seems like a common task, but I
> cannot find a way to do it well using gdal. Is there a
> best practice I should be aware of?
> 
> I realize that there will always be gaps between dems,
> which must be fixed afterward (thanks Craig and Ben),
> but what is the best way to merge the dems together,
> with "clean" NODATA edges, so that the gaps can
> be filled?
> 
> The problem I run into is that warping with "-rcs" for
> cubic spline resampling, which looks best, leaves the
> edges of the dem "rounded off". E.g. if the data
> should be:
> 
> 1000, 1000, 1000, NODATA, NODATA
> 
> I get instead:
> 
> 1000, 1000, -400, -5000, NODATA
> 
> And so I don't have clean cut offs from data to
> NODATA, which makes gap filling challenging.

Chris,

Could you provide a couple nearby DEMs and the exact command you
use to merge them?  Gdalwarp tries hard to be careful about what
pixels are incorporated into interpolation kernels.  That is
recognised nodata pixels should not be included, and the interpolation
kernel should be updated accordingly.

I *suspect* the appropriate level of gdalwarp is not recognising the
nodata values which could be a local code flaw, or a lack of proper
global nodata information.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list