Skip to main content
Question

How to fill a hole in a raster DEM

  • August 3, 2020
  • 5 replies
  • 281 views

btl
Contributor
Forum|alt.badge.img+7

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+61

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+7
  • Author
  • Contributor
  • August 4, 2020

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+61

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+7
  • Author
  • Contributor
  • August 4, 2020

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+10
  • Contributor
  • August 6, 2020

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.