Skip to main content
Question

How to fill a hole in a raster DEM


btl
Contributor
Forum|alt.badge.img+3
  • Contributor

I'm trying to replace part of a raster DEM so I cut a hole in it and created a few points in a shapefile to define new heights in the hole - I want to interpolate across the hole to these new heights keeping everything else the same.

 

I'm using RasterDEMGenerator but the hole is filled with elevation=0 except for tiny spikes where my control points are

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+48

How do you have the RasterDEMGenerator set up? And how does the spacing of the new points relate to the DEM spacing?


btl
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • August 4, 2020
redgeographics wrote:

How do you have the RasterDEMGenerator set up? And how does the spacing of the new points relate to the DEM spacing?

I'm working in degrees so:

  • Output X and Y spacing = 5 * 10^-5 (the spacing of the original raster)
  • Surface tolerance - I have tried large and small numbers, seems to make very little difference
  • Interpolation method - tried all three, mostly left on AUTO
  • No data value - left blank

I have 3 control points and I'm trying to use them to interpolate across a hole, which is maybe around 500 cells cut from the original dem - as shown in the pic below.

pic

 

 


redgeographics
Celebrity
Forum|alt.badge.img+48

Thinking out loud here, how about generating a TIN first of the original DEM and the control points and then create a new DEM from that?


btl
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • August 4, 2020
redgeographics wrote:

How do you have the RasterDEMGenerator set up? And how does the spacing of the new points relate to the DEM spacing?

OK. The problem is when I cut the hole - it's creating values at zero, not nulls. So I just need to filter these out before channelling everything into RasterDEMGenerator.


lefred06
Contributor
Forum|alt.badge.img+8
  • Contributor
  • August 6, 2020
btl wrote:

OK. The problem is when I cut the hole - it's creating values at zero, not nulls. So I just need to filter these out before channelling everything into RasterDEMGenerator.

Hi,

If your initial DEM is already a Raster, you might have to set a nodata value on this initial DEM (the one with the hole) to prevent values from the "hole" to be considered as "real" values.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings