addnode.sml

  Download

More scripts: TIN

Syntax Highlighing:

comments, key words, predefined symbols, class members & methods, functions & classes
            
# addnode.sml
clear();
tin Tout;
GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
numeric xmin, ymin, xmax, ymax, x, y, z;
# note that node must be inside existing hull
# use TINCreateFromNodes() to make initial TIN
# get the extents - use georef version if needed
GetObjectExtents(Tout, xmin, ymin, xmax, ymax);
print("xmin, ymin, xmax, ymax ", xmin, ymin, xmax, ymax);
x = floor((xmin + xmax) / 2);
y = floor((ymin + ymax) / 2);
z = 100; # set to what makes sense
TINAddNode(Tout, x, y, z);
print("node added at x, y ", x, y);