dem_add.tcl

This example shows how to make resulting surface approximating smoothed DEM.

Here is the image of the resulting surface:

surface

Pic 1. surface obtained from smoothed DEM

This result was obtained with "examples/globe/dem_add.tcl" script.

00001 #
00002 # This script was generated with funner v2.1beta (www.gridding.info)
00003 
00004 # 
00005 # load plugins
00006 # 
00007 load libglobe[info sharedlibextension]
00008 load libsurfit[info sharedlibextension]
00009 
00010 # remove all previous data and gridding rules
00011 clear_data 
00012 
00013 # set name of surface
00014 set map_name "map_dem_add" 
00015 
00016 # set solver
00017 set_solver "cg" 
00018 
00019 # set tolerance for solver
00020 set tol 1e-005 
00021 
00022 ##
00023 ## load initial data 
00024 ##
00025  
00026 # loads DEM from zipped HGT files (Shuttle Radar Topographic Mission files) 
00027 dem_load_hgt_zip "N00E006.hgt.zip" N00E006.hgt  
00028  
00029 ##
00030 ## construct grid 
00031 ##
00032 grid 0.0005 0.0005 
00033  
00034 ##
00035 ## create gridding rules
00036 ##
00037 
00038 # resulting surface should tend to be constant or plane 
00039 completer 
00040 
00041 # add "resulting surface = DEM values" with weight 
00042 dem_add 1 N00E006.hgt 
00043 
00044 ##
00045 ## run gridding algorithm
00046 ##
00047 surfit 
00048 
00049 ##
00050 ## save results 
00051 ##
00052 
00053 # unload grid from memory
00054 grid_unload 
00055 
00056 # save surface to surfit datafile 
00057 surf_save "dem_add.dat" 



surfit: open source gridding and contouring software.