Follow

How can I fill in holes of missing data in my DEM file with data in Surfer?

You can fill in holes of missing data in your grid or DEM file a few different ways in Surfer, depending on what you want to fill the data with.

 

Option 1. If you want Surfer to interpolate the data

If the data is missing or NULL and you want Surfer to interpolate the data in those areas, use the Grids | Edit | Convert method to convert the DEM to an XYZ DAT file. If the original DEM had NULL values, then click File | Open and open the data file in the Surfer worksheet, sort by Column C, and delete the rows of data that had the NULL value in Column C. Save and close the file. Then use Grids | New Grid | Grid Data to regrid the data using the Kriging gridding method using the same grid spacing as the original DEM file. Regridding the data will fill in the holes.

Option 2. If you want to fill the areas with a constant value

If the empty areas are filled with NULL values and you want to replace the null value with a different value, you can click Grids | Calculate | Math, and in the Grid Math dialog click Add Grids, select the DEM file and click Open. Enter the function IF (A=-9999, 50, A); where -9999 is the current NULL value and 50 is the value you wish to replace it with. Click OK and the new grid is created. If the checkbox next to Add grid as layer to is checked, a new map or layer is also created with the updated grid file.

Option 3. If you want to fill the areas with data from another grid

If those areas are filled with NULL values and you want to replace the null value with data from another grid, you can click Grids | Calculate | Math, and in the Grid Math dialog click Add Grids, select the DEM file and the other grid file containing the data you want, and click Open. Enter the function IF (A=-9999, B, A); where -9999 is the current NULL value, A is the variable for the DEM grid with NULL data, and B is the variable for the grid with the information you want. Click OK and the new grid is created. If the checkbox next to Add grid as layer to is checked, a new map or layer is also created with the updated grid file.

 

Updated November 7, 2017

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.