Tutorial: Surface Modeling

28
Surface Modeling page 1 Tutorial Surface Modeling with TNTmips ® S U R F A C E S

Transcript of Tutorial: Surface Modeling

Page 1: Tutorial: Surface Modeling

Surface Modeling

page 1

Tutorial

SurfaceModeling

with

TNTmips®

SURFACES

Page 2: Tutorial: Surface Modeling

Surface Modeling

page 2

Before Getting Started

You can print or read this booklet in color from MicroImages’ web site. Theweb site is also your source for the newest tutorial booklets on other topics.You can download an installation guide, sample data, and the latest versionof TNTmips.

http://www.microimages.com

This booklet introduces the powerful Surface Modeling process in TNTmips®.Surface modeling creates approximations of functional surfaces from the 3Dinformation you provide. A functional surface combines spatial location with thevalue for some variable (such as elevation, chemical concentration, or populationdensity) at that location. Functional surfaces are commonly represented as DigitalElevation Models (raster), isolines (vector contours), or Triangular IrregularNetworks (TIN object). You can create any of these surface forms and convertbetween them in the Surface Modeling process. You can also create serial profilesof functional surfaces.

Prerequisite Skills This booklet assumes that you have completed the exercisesin the tutorial booklets Displaying Geospatial Data and TNT Product Concepts.Those exercises introduce essential skills and basic techniques that are notcovered again here. Please consult those booklets and the TNTmips referencemanual for any review you need.

Sample Data The exercises presented in this booklet use sample data that isdistributed with the TNT products. If you do not have access to a TNT productsDVD, you can download the data from MicroImages’ web site. In particular, thisbooklet uses sample files in the SURFMODL data collection.

More Documentation This booklet is intended only as an introduction to SurfaceModeling. Details of the processes described here can be found in a variety oftutorial booklets, color plates, and Quick Guides, which are all available fromMicroImages’ web site.

TNTmips Pro, Basic, and Free TNTmips comes in three versions: TNTmips Pro(which requires a software license key), low-cost TNTmips Basic, and TNTmipsFree. This booklet refers to all versions as “TNTmips.” TNTmips Basic andTNTmips Free provide all the capabilities of TNTmips Pro but limit the size of thegeospatial objects and attribute tables that can be used in your project.

Surface Modeling is not available in TNTview, TNTedit, or TNTatlas. All theexercises can be completed in TNTmips Free using the sample geodata provided.

Randall B. Smith, Ph.D., 14 August 2013©MicroImages, Inc., 1997—2013

Page 3: Tutorial: Surface Modeling

Surface Modeling

page 3

STEPSlaunch TNTmipsselect Terrain / SurfaceModeling from theTNTmips menu

The Surface Modeling process in TNTmips includesa set of operations that allow you to transform spatialdata representing a three-dimensional surface fromone form to another. The most familiar example ofsuch data is probably the variation in elevation ofthe Earth’s surface. However, any variable can bevisualized and analyzed as a three-dimensionalsurface as long as it varies relatively smoothly at thechosen map scale and has only a single value ateach location. Examples include crop yield data,population density data, the concentration ofdissolved chemicals at the ocean surface orgroundwater table, geophysical measurements suchas gravity, and many others.

A three-dimensional surface can be approximated ina number of forms, including irregularly-spaced pointobservations, a regular grid of values, or contour linesof equal value (isolines). In TNTmips, irregularly-spaced point data can be stored as points in a vectoror shape object, as nodes in a TIN (TriangulatedIrregular Network), or in a database objectcontaining X and Y coordinates in addition to thevalue to be mapped. Gridded measurements arestored as a raster object, and contours as a vector orshape object. Each of these data types can be usedas input for one or more of the Surface Modelingoperations.

Each Surface Modeling operation produces a specifictype of object. The Surface Fitting operationproduces a raster grid, Contouring produces vectorcontour lines, and Triangulation produces a TIN. TheProfiling operation creates a series of parallel verticalprofiles of a surface raster. Most operations providea choice of several different methods for producingthe desired surface. Your choice of method maydepend on the type of input data as well as theintended use for the output surface.

Welcome to Surface Modeling

The exercises on pages 4-15 of this booklet show youhow to create surfacerasters with the SurfaceFitting operation.Techniques for producingvector contours with theContouring operation areintroduced on pages 16-19.Pages 20-24 lead youthrough the creation of TINobjects with theTriangulation operation.Pages 25-26 show youhow to create stackedvertical profiles of asurface raster with theProfiling operation. Page27 presents graphical andtabular summaries of allSurface Modelingoperations and methods.

Page 4: Tutorial: Surface Modeling

Surface Modeling

page 4

Let’s start by running a sample Surface Fittingoperation. Surface Fitting interpolates a regular gridof values from data in the input object and outputsthe grid as a raster object. The input data can be inthe form of points stored in a vector object or in adatabase that has X and Y coordinate fields for eachrecord. You can also use vector contour lines or thenodes and/or edges in a TIN object as input. Theinput object used in this exercise is a 3D vector objectcontaining 500 irregularly-spaced sample elevationpoints from a topographic surface. The elevation isstored as a Z-value for each point.

STEPSselect Surface Fittingfrom the Operationoption menupress the Input Objectbuttonselect the ELEV_PTS

vector object from theSURFACE Project File inthe SURFMODL datacollectionpress the Run buttonand name a new ProjectFile SURFOUT

accept the default nameprovided for the outputsurface raster

Begin Surface Fitting

Keep the Surface Modeling window open withthe current settings for the next exercise.

Surface Modeling uses astandard View window toautomatically display inputand output objects.

Click on the Input Objectbutton to choose theinput object.

Select a Surface Modeling operation

Use the standard Layer Managerwindow to change display settings for

any input or output objects shown in theSurface Modeling View. If the Layer Manageris not open, press the Layer Controls iconbutton on the View to open it.

Page 5: Tutorial: Surface Modeling

Surface Modeling

page 5

The Input and Output tabbed panels of the SurfaceModeling window let you control the selection ofdata from the input object and the size and spatialresolution of the output surface raster. In this exerciseyou examine these controls and set a cell size for thenext surface raster to be generated from the ELEV_PTS

vector object.

The controls on the Input tabbed panel vary de-pending on the operation and input object type youhave selected. Since the current input vector objectcontains points, the Points subpanel is active. Thesecontrols determine which points are used to gener-ate the surface raster values and where to find the“elevation” value. In this case all of the points inthe object are valid elevation measurements, so thedefault selection of All that ap-pears on the Select option but-ton is appropriate. The defaultselection of Object on the ZValue: option menu is also ap-propriate, as we are surface fit-ting the elevation value storedas the Z-value in the 3D (XYZ)vector object. A By Query op-tion is also provided on eachof these menus, allowing youto use a database query to select a subset of thepoints as input for the process and to use valuesstored in any database field as the Z value.

The Cell Size subpanel on the Output tabbed panelis used to set the size of the output raster cells inmeters. The previous Surface Fitting operation cal-culated a cell size of 59 meters from the geographicextents of the input object and the default outputraster size. When you enter new cell size values inthe Line and Column numeric fields, the size of theoutput raster is recalculated and the Raster Size pa-rameter fields are automatically updated.

Set Input and Output Parameters

Keep the Surface Modelingwindow open with thecurrent settings.

Click a tab to reveal itsattached panel.

STEPSexamine the Pointscontrols on the Inputtabbed panelclick the Output tab toreveal the Output tabbedpanelin the Cell Size subpanel,enter 60.0 in the Lineand Column text fieldschoose 16-bit signedfrom the Cell Type menu

To change a parametervalue, highlight the fieldwith the mouse cursor andtype in the desired value.

Page 6: Tutorial: Surface Modeling

Surface Modeling

page 6

The Inverse Distance method interpolates a valuefor each cell in the output raster using a set of nearbyinput elements. The Z-values of these elements areweighted so that nearby elements contribute moreto the result than those farther away. This methodcan be used with vector or shape objects containingpoints or contours, or with database or TIN objects.

The Search Area parameter determines the shape ofthe selection area, while the Search Distance valuedetermines its size. You can set the Search Distancein raster cells or in map distance units. The settingsused here create a circular selection area with an1800-meter radius (30 cells with the current outputcell size of 60 meters). The spacing of adjacent pointsin this input object varies from 200 to about 2000meters, so these settings should provide an adequateset of points for each raster cell location. The

Weighting Power parameter determines the ex-ponent used in the distance function thatdetermines the weighting factors applied to theinput Z-values. With the default setting of 2.00,the weighting factors decrease in value by thesquare of the distance.

Surface Fitting by Inverse DistanceSTEPS

select Inverse Distancefrom the Method optionmenuclick on the Parameterstab and choose Circlefrom the Search Areaoption menuset the Search Distancevalue to 1800 andchoose meters from theunits menuset the Weighting Powerto 2.0press the Run buttonand direct the outputraster to the SURFOUT

Project Fileaccept the default nameprovided for the outputsurface raster

Keep the Surface Modeling window open withthe current settings for the next exercise.

To measure the distancesbetween points in an input object,press the GeoToolbox icon buttonon the View window anduse the Ruler tool. Formore information see thetutorial booklet entitledSketching and Measuring.

The Search Distance parameter controls thesize of the area used to select input datavalues for interpolation.

Press the Open 2D View icon button to re-openthe View window if you have closed it or tobring the open View to the foreground.

Page 7: Tutorial: Surface Modeling

Surface Modeling

page 7

The Polynomial surface fitting method finds a best-fit surface defined by a polynomial equation thattreats the mapped value as a mathematical functionof geographic position. You can use vector point,TIN, and database objects as input with this method.

The polynomial method finds the best-fit surface byminimizing the sum of the squared deviations be-tween the input values and the calculated surface.Because this is a best-fit for the entire set of inputpoints, typically the output surface does not matchthe original value at each input point. This methodis most useful for portraying generalized spatialtrends for a “noisy” mapped value.

The Polynomial Order parameter controlsthe form of the polynomial equation,which in turn defines the complexity ofthe computed surface. A second-orderpolynomial equation defines a paraboliccurved surface with only one sense of curvature(concave or convex). A third-order (cubic) equationallows one change in senseof curvature in any cross-section. Higher-orderequations allow for in-creasing complexity andmore local detail. The fifth-order polynomial surfaceyou generate here depictsthe generalized trends in el-evation in the input pointobject, but does not conveythe detail present in the sur-face raster produced in theprevious exercise by the In-verse Distance method.

STEPSselect Polynomial fromthe Method option menuon the Parameters tabset the Polynomial Orderparameter value to 5press the Run buttonand direct the outputraster to the SURFOUT

Project Fileaccept the default nameprovided for the outputsurface raster

Keep the SurfaceModeling windowopen with thecurrent settings forthe next exercise.

The PolynomialOrder parametercontrols thecomplexity of thecomputed surface.

Polynomial Trend Analysis

For each operation Surface Modeling offers a variety of methods that can beused with particular types of input objects. The Method option menu showsonly those methods that can be used with the current input object type.

Page 8: Tutorial: Surface Modeling

Surface Modeling

page 8

Surface Fitting by Univariate CurveSTEPS

press the Input Objectbutton and select theELEV_CONT vector objectfrom the SURFACE ProjectFilepress [Yes] on theQuestion dialog toremove previous resultlayersselect Univariate Curvefrom the Method optionmenuon the Output panel setthe Line and Column cellsize to 60.0on the Parameters panelchoose Cubic from theInterpolation menu andLinear from the Slopemenupress the Run buttonand direct the outputraster to the SURFOUT

Project File

The Univariate Curve surface fitting method is spe-cially tailored to create a surface raster from contourlines. Its strategy is to assign each output cell valueby interpolating between the enclosing pair of con-tours along an approximation of the steepest pathof descent through that cell. To approximate thatpath, the closest points on the uphill and downhillcontour lines are found and those distances andcontour elevations control the interpolation.

Three interpolation methods are provided. The Lin-ear method creates a smooth surface between eachcontour pair but leaves an abrupt change in slope ateach contour. The Cubic and Hermite methods arecurve-fitting procedures that include the local slopevalues at each contour line as inputs to the interpo-lation. These methods interpolate curving surfacesthat meet more smoothly at the contours. Alongridgelines and valley bottoms, however, opposingslope surfaces may meet at sharp angles.

Slope values at thecontour lines arecalculated using either aLinear method (neighboring 4 cells) orQuadratic method (neighboring 8 cells).

When the input vector object contains elevationcontours, the Lines subpanel is shown. For 3-Dinput objects, use the default selection of Objecton the Z Value option menu.

NOTE: in subsequent exercises inwhich you are asked to choose anew input object, always chooseYes on the Question dialog toremove previous result layers.

Page 9: Tutorial: Surface Modeling

Surface Modeling

page 9

Evaluate the Surface Raster ResultThe display interface in the Surface Modeling pro-cess includes many tools that you can use to evaluatethe quality of any computed surface raster. DataTipsallow you to compare the elevation value of an ele-ment in the input object with the computed elevationat the same location in the surface raster. Relief shad-ing the surface raster provides a more natural andrevealing view of the surface than a simple grayscaledisplay, highlighting the shape of the surface at allscales, including minor details. The Profile View inthe GeoToolbox lets you construct and view verticalelevation profiles along any transect to help assessthe shape of the surface. More information aboutthese tools is available in the tutorial booklets Sketch-ing and Measuring and Analyzing Terrain andSurfaces.

STEPSin the Layer Managerwindow, left-click on theicon for surface rasterlayer entry to open theLayer Controlsclick on the Shading tabin the Raster LayerControls windowturn on the ReliefShading toggledrag the radius line in thecircle graphic to thenorthwest quadrantenter 3.0 in the Z Scalingfieldclick [OK] on the RasterLayer Controls windowpress theGeoToolbox iconbutton on theViewpress the Rulericon button in theGeoToolboxleft-click and drag withthe mouse in the View todraw a ruler linepress the OpenProfile View iconbutton in the GeoToolbox

Profile line set by Ruler tooland resulting Profile View.

Relief shading provides a more understandableimage of the output surface and can revealartifacts created by the surface fitting method.

Page 10: Tutorial: Surface Modeling

Surface Modeling

page 10

Surface Fitting by Minimum CurvatureSTEPS

select MinimumCurvature from theMethod option menupress the Input Objecticon button and selectthe BATHYM vector objectfrom the GMB Project Fileon the Parameters panelset the Search Distancevalue to 60 cellsset the Tension value to0.0set the Coarse GridRatio menu to 8set the other parametersto the values shown inthe interface illustrationpress the Run buttonsince you have alreadycreated a raster namedMinimum Curvature,modify the default objectname and direct theoutput raster to theSURFOUT Project Fileturn on Relief Shadingfor the output raster andset the Z Scaling to 12.0

The Minimum Curvature method fits a two-dimen-sional cubic spline surface to the input points, TINnodes, or contour line vertices. This surface is con-structed to have a minimum overall curvature,producing a smoothly varying surface. The AllowedVariation parameter lets you determine whether thesurface must pass exactly through the data points(value 0) or can deviate from them by the specifiedamount.

This method uses an interative approach beginningwith an initial coarse-resolution grid of output cells.The Coarse Grid Ratio parameter sets the spacing(in number of output cells) between cells in this ini-tial grid. Initial cell values for the coarse grid aredetermined from the input object using either theInverse Distance or Profiles Method. A cubic sur-face is fit to the coarse grid values, which areiteratively adjusted to minimize the surface curva-ture. Iterations cease for each grid value when thechange falls below the Matching Tolerance value orthe Maximum Iterations value is reached. A finer-resolution grid is interpolated from the adjusted

coarse grid and its values areiteratively adjusted, with theprocess repeating until the fi-nal raster dimensions arereached.

The contours used in this exercisedepict seafloor bathymetry, and sotheir Z values are negative. Thearea outlined by the box is shown inmore detail on the following page.

Page 11: Tutorial: Surface Modeling

Surface Modeling

page 11

Minimum Curvature with Tension

STEPSset the Tensionparameter for theMinimum Curvaturemethod to 0.75set the Coarse GridRatio option menu to 16

press [Run], rename theoutput raster and directit to the SURFOUT ProjectFileturn on Relief Shadingfor the output raster andset the Z Scaling to 12.0

-2900

-2900

-3000

-3000

-2800

-2800

Detail of computed surface from previous page (left) and this page (right) with profilesalong the green line. Green dots on profiles mark points where profile crosses inputcontour lines; arrows on left profile mark crossings of nonexistent contours due tounconstrained oscillations of the minimum curvature surface between widely-spacedcontours. Increasing the Coarse Grid Ratio and Tension values helps damp theseextraneous oscillations.

-2600

-2800

-3000

-3200

10000 20000 30000 400000

-2600

-2800

-3000

-3200

10000 20000 30000 400000

Dep

th b

elow

Sea

Lev

el (

m)

Distance (meters) Distance (meters)

The Minimum Curvature method can produce sur-faces with large oscillations and unnecessaryinflections along the the boundary and in areas whereinput values are widely spaced. Examples of suchoscillations occurs in the boxed area in the surfaceillustration on the previous page (shown in moredetail below) and between the other widely-spacedcontours on the right side of the sample area.

To reduce these spurious oscilla-tions, use the largest Coarse Grid Ratio setting (16)to produce an initial smooth, low resolution surfacefor further iterative refinement. You can also increasethe Tension setting, which varies between 0 and 1.0.The effect is similar to that of increasing the tensionon a physical elastic surface stretched to fit the datavalues. Increasing the tension value simplifies thesurface shape between input data points (reducesits curvature) and increases curvature at the datapoint locations.

Page 12: Tutorial: Surface Modeling

Surface Modeling

page 12

STEPSpress the Input Objectbutton and select theMAUI_TIN object from theMAUISURF Project Fileselect TriangleInterpolation from theMethod option menuon the Output panel turnon the Match Referencetoggle buttonchoose the DEM_135object from the MAUISURF

Project File as thereference

Surface Fitting by Triangle InterpolationThe Triangle Interpolation surface fitting method isdesigned for TIN objects. A vector or shape objectcan also be used as input, in which case the methodbuilds a temporary TIN object from the input ele-ments. The method uses the elevation values at thenodes of the TIN triangles to compute a surface thatfits each triangular area. “Holes” in the TIN are notfilled, and separate TIN hulls generate separate el-evation surfaces (as illustrated by the island surfacescreated in this exercise). Raster cells in areas out-side the TIN hulls are marked as null and areautomatically displayed transparent in the View.

The Match Reference optionon the Output tabbed panelenables you to match the di-mensions, orientation, andcell size of your output sur-face raster to an existinggeoreferenced raster objectthat covers the same area asyour input data. This optionworks with any Surface Fit-

ting method except the Bidirectional method, whichis discussed on a later page.

When the input TIN object hasmore than one hull, TriangleInterpolation produces aseparate elevation surface foreach hull, with interveningcells marked as null.

on the Parameters panelchoose Linear from theInterpolation menupress [Run], name theoutput raster Linear anddirect it to the SURFOUT

Project File

Page 13: Tutorial: Surface Modeling

Surface Modeling

page 13

STEPSon the Parameters panelchoose Quintic from theInterpolation menupress [Run], name theoutput raster Quinticand direct it to theSURFOUT Project File

Triangle Interpolation Options

on the Parameters panelchoose Nonic from theInterpolation menupress [Run], name theoutput raster Nonic anddirect it to the SURFOUT

Project Fileturn on Relief Shadingfor the surface rasterscreated by the Linear,Quintic, and Nonicoptions to compare theirshapes

You can choose from several interpolation proce-dures on the Parameters tabbed panel. The Linearoption used in the previous exercise fits a simpleplanar surface to each triangle in the input TIN ob-ject. The planar surfaces of adjacent triangles maymeet at distinct angles along their shared edges.This option essentially repro-duces the triangular-facetedTIN surface in raster form.

The Quintic and Nonic op-tions fit a curving polynomialsurface to each triangle. The Quintic option uses a5th-order polynomial, while the nonic option uses a9th-order polynomial. These polynomial expressionsare derived using not only the nodes of the currenttriangle, but those of the surrounding triangles aswell. The slope and change in slope in differentdirections around each triangle node are computedand used to constrain the shape of the current tri-angle surface to ensure that it will join relativelysmoothly with the surfaces derived from the adja-cent triangles. The Quintic option produces asmoother, less angular surface than the Linear op-tion but may not eliminate all triangle edge artifacts.The Nonic option provides more degrees of freedomto produce a more complexly curved local surfacewith fewer triangle edge artifacts.

Linear Interpolation Quintic Interpolation Nonic Interpolation

Page 14: Tutorial: Surface Modeling

Surface Modeling

page 14

Bidirectional Surface FittingSTEPS

press the Input Objectbutton and select theBB_MAG object from theBB_MAG Project Fileselect Bidirectional fromthe Method option menu

on the Output panel setthe Line and Column cellsize to 31.0choose 32-bit floating-point from the Cell Typeoption menuon the Parameters panelchoose Cubic BSplinefrom the Along LineSpline Type menuselect Quadratic BSplinefrom the Across LineSpline Type menupress [Run] and directthe output raster to theSURFOUT Project File

The Bidirectional surface fitting method is designedfor use with aeromagnetic and other geophysicaldata that are collected along groups of nearly paral-lel transect lines. Input data for the Bidirectionalmethod must be in the form of 3D vector lines, with

one line for each transect andline vertices representing mea-surement locations. In mostcases the distance betweenmeasurements along eachtransect is much less than thespacing between adjacent

transects, so there is an inherent directional bias inthe distribution of the observation points.

The Bidirectional method interpolates raster valuesin two steps: first along each transect line, then per-pendicular to the dominant transect direction. Withthe Direction Type option set to Auto, the processautomatically determines the predominant transectdirection. Alternatively, you can set this option toManual and enter an azimuth value to be used as thepredominant direction.

You can choose different methods for interpolatingalong and across the transect lines. Three interpo-

lation methods are provided for eachdirection. The methods are Linear,Quadratic BSpline, and CubicBSpline. The latter two methods pro-duce surfaces with smoother, moregradual changes in curvature than theLinear splining method.

These transect lines are from anaeromagnetic survey of a single 7.5-minute map quadrangle, withmagnetic intensity values innanoteslas.

Page 15: Tutorial: Surface Modeling

Surface Modeling

page 15

The Surface Modeling process in TNTmips alsoincludes several additional surface fitting methodsthat are not used in the exercises in this booklet.Brief summaries of these methods are providedbelow.

Kriging Kriging is a statistical approach tointerpolation that assumes that the input data valuessample a continuous surface, so that nearby datavalues should be similar in value (dependent) andwidely separated values should be nearlyindependent. Kriging interpolates a value for eachoutput raster cell by calculating a weighted averageof the values at nearby points. The statisticalvariation in values over different distances and indifferent directions (depicted graphically as avariogram) is analyzed to determine the shape andsize of the point selection area and the set ofweighting factors that will produce the minimum errorin the elevation estimate. The variation in inputvalues can be assumed to consist of local variationson a regional trend (the drift). Ordinary krigingassumes no drift, or the drift can be modeled as alinear or nonlinear function. Known directions ofanisotropy can also be factored into the calculations.Kriging can be used with input vector points, TINs,and database objects.

Profiles This method uses a multi-directional linearinterpolation procedure to create a surface rasterfrom contour lines. The process searches for pairsof input elevations on opposite sides of each outputcell. After edge cells are interpolated, the processsearches in eight different directions (up, down, left,right, and diagonally) and uses the closest pair ofvalues (including edge cells) to assign an outputelevation value. A Search Distance parameterdetermines the radius of the search.

Other Surface Fitting Methods

Use the Cell Type optionmenu on the Output tabbedpanel to choose theappropriate data type forthe computed surfaceraster. When the inputrepresents elevations of theEarth’s surface in meters orfeet, a16-bit signed integercell type is usuallyappropriate, since its rangeof -32,768 to +32,767covers the entire elevationrange. For sub-meter orsub-foot vertical accuracyin elevation, or for surfacefitting other numeric valueswith a smaller range, youcan choose 32-bit floatingpoint output, but the storedsize of the raster will besignificantly larger. Inaddition, floating-pointrasters cannot becompressed.

Page 16: Tutorial: Surface Modeling

Surface Modeling

page 16

Contouring a TIN ObjectSTEPS

choose Contouring fromthe Operation optionmenupress [Yes] on theQuestion dialog toremove previous resultlayerspress [Input Object] andselect the ELEV_TIN

object from the SURFACE

Project File

on the Parameters panelset the Starting Levelparameter value to 100set the Intervalparameter value to 100press [Run] and directthe output vector objectto the SURFOUT Project File

The next series of exercises explore the Contouringoperation, which creates a 3D vector object with linesof equal value (contours or isolines) at a specifiedinterval. TIN and raster objects can serve as inputfor contouring.

The Linear method is the only one available for con-touring TIN objects. It treats each TIN triangle as aplanar surface. When a contour is found to passbetween two TIN nodes, the location of its intersec-

tion with the triangle edge isdetermined by linear interpo-lation from the node Z-values(or values you specify by aquery). Each output contourline is made up of straight-line segments (one segmentper triangle crossed), with di-rection changes occurring atthe triangle edges.

IMPORTANT: Choosing a new Surface Modeling operation clears the previousInput Object selection. You are also asked to choose whether or not to removeprevious result layers from the View window before beginning the new SurfaceModeling operation.

Page 17: Tutorial: Surface Modeling

Surface Modeling

page 17

The Linear method is also available for contouringraster objects. It locates contours from the rastervalues by linear interpolation in the line and columndirections.

You have the option of smoothing the input rastervalues to reduce local detail prior to finding con-tours. The Smoothing Method options are foundon the Input tabbed panel.With no smoothing, contourlines may appear jagged. Thesmoothing methods produceincreasing smoothing as youincrease the Filter WindowSize. The smoothing filtersinclude Weighted Average, Gaussian, Quadratic,Cubic, and Quartic.

STEPSpress [Input Object] andselect the ELEV_RAST

object from the SURFACE

Project Fileon the Parameters panelset the Starting Levelparameter to 100 andthe Interval parameter to100

on the Input panelchoose WeightedAverage from theSmoothing Method menuselect 7 x 7 from theFilter Window Sizemenuchoose None from theResampling Methodmenupress [Run] and directthe output vector objectto the SURFOUT ProjectFile

Contouring a Raster: Linear Method

Increase the Filter WindowSize to produce smoother,more curving contours.

No smoothing

Weighted Average7 x 7 Filter Size

Choose raster smoothing options from the SmoothingMethod option menu on the Input tabbed panel.

on the Input panelchoose None from theSmoothing Methodoption menupress [Run] and directthe output vector objectto the SURFOUT ProjectFile

Page 18: Tutorial: Surface Modeling

Surface Modeling

page 18

Contouring with ResamplingSTEPS

on the Input panelchoose 3x3 from theWindow Size menu;keep the WeightedAverage smoothingmethodchoose CubicConvolution from theResampling Methodmenu

choose 8 from theResolution Factor menupress [Run] and directthe output vector objectto the SURFOUT Project File

The Linear contouring method can also producesmoother contours by resampling the input raster toa smaller cell size prior to computing contour lines.This procedure uses the values of the surroundingcells in the input raster to interpolate values for thenew smaller cells.

Use the Resampling Method menu to choose eitherthe Bilinear Interpolation or Cubic Convolution

method to interpolate the newcell values. The ResolutionFactor sets how fine a subdi-vision of the original cell gridis created by the resampling.A resolution factor of 2 subdi-vides each cell into a 2 by 2grid of smaller cells (4 cells), afactor of 4 divides each cellinto a 4 by 4 grid (16 cells), andso on. Resampling to higher

resolution can be used alone or in combination withraster smoothing. In this exercise minimal smooth-ing is applied in combination with resampling by afactor of 8.

The illustration below compares results ofsmoothing with resampling the input raster tohigher resolution. The yellow contour line wasproduced in the previous exercise usingWeighted Averaging smoothing with a 7 x 7 filterwindow. The pink contour line produced in thecurrent exercise using resampling captures morelocal detail while still showing smooth curves atthe scale of the original input raster.

Page 19: Tutorial: Surface Modeling

Surface Modeling

page 19

Contouring by Iterative ThresholdingSTEPS

choose IterativeThresholding from theMethod option buttonpress [Run] and directthe output vector objectto the SURFOUT Project File

The Iterative Thresholding contour method for ras-ter objects takes an image segmentation approachto locating contours. Each contour value is used asa threshold to segment the elevation raster into ar-eas equal to or below the threshold and those withraster values above the threshold. The contour lineis generated along the bound-ary of these regions in such away that the line passesthrough the centers of all cellswith a value equal to the con-tour value (unless the cell is alocal maximum or minimum)and always passes betweencells whose values bracket thecontour value.

Iterative thresholding pro-duces a mathematicallyaccurate result, but one that may produce noisy,angular contours. This method is also severaltimes slower than the other contouring meth-ods.

You can smooth the contour lines produced by this and other contouring methodsusing the Vector Filters process (Geometric Filter from the TNTmips menu). TheLine Densification filter adds vertices to lines to make them better approximate asmooth curve. You can find more information about Line Densification in theAdvanced Vector Editing and Digitizing Soil Maps tutorials.

Page 20: Tutorial: Surface Modeling

Surface Modeling

page 20

You have worked with TINs as input objects inprevious exercises. To create a TIN object, use theTriangulation operation. Triangulation computes aTIN from points in a vector or database object, fromvector contours, or from a raster object.

When the input object contains point data or con-tours, the Delaunay triangulation method is used.This method uses the input points (or contour linevertices) to create a triangular network meeting theDelaunay criterion (described in the exercise on Sur-face Fitting by Triangulation). For an input databaseobject or 2D vector object, By Query is the activeselection on the Z Value option button on the Inputtabbed panel. You must use a query to specify adatabase table and field containing the values toassign as Z-values for the output TIN nodes.

STEPSchoose Triangulationfrom the Operationoption menupress [Yes] on theQuestion dialog toremove previous resultlayerspress [Input Object] andselect the ELEV_PTS_2D

object from the SURFACE

Project Filein the Points section ofthe Input panel, press[Specify...] next to the ZValue option buttonin the Script Editorwindow, press theInsert Field iconbuttonin the Insert Fieldwindow, chooseELEV_PTS from the Tablemenu and Z_VAL from theField menu; press[Insert]press [OK] in the ScriptEditor windowpress [Run] and directthe output TIN object tothe SURFOUT Project File

Triangulation from Point Data

Press [Specify...] to open the Script Editorwindow and create a query that specifies thetable and field containing the desired Z values.

A value query has the simple form TABLE.FIELD,specifying the field in the attached database tablethat contains the desired values.

Page 21: Tutorial: Surface Modeling

Surface Modeling

page 21

Triangulation from a RasterSTEPS

press [Input Object] andselect the ELEV_RAST

object from the SURFACE

Project Fileclick the Parameters tabon the Parameterstabbed panel, set theAccuracy parametervalue to 12 and theNode Limit value to 1400press [Run] and directthe output TIN object tothe SURFOUT Project File

The Adaptive Densification method of Triangula-tion is used to create a TIN from a raster object.After placing initial TIN nodes at the corners of theinput raster to form two large triangles, this methodsubdivides triangles in a number of iterations to cre-ate a denser TIN structure. A triangle is subdividedby placing a new node at the raster cell location withthe highest deviation from the planar surface definedby the triangle.

You can control the complexity and fidelity of theoutput TIN using the Accuracy and Node Limit pa-rameters. The Accuracy parameter value sets themaximum Z-value deviation between a triangle andthe raster surface it represents. If a triangle’s devia-tion is less than this value, the triangle is notsubdivided further. The Node Limit parameter setsa rough upper limit on the number of nodes in thefinal TIN object.

The AdaptiveDensification method isautomatically selectedwhen you choose araster object as input forthe Triangulationoperation.

The number of nodes in the final TIN object maybe less than the Node Limit if all triangles satisfythe current Accuracy parameter setting beforethe Node Limit is reached. By contrast, if thenode limit is reached partway through aprocessing iteration, subdivision continues untilall current triangles have been processed. Inthis case the final number of nodes exceedsthe Node Limit value by a small amount, andsome triangles may not satisfy the Accuracyparameter setting. For example, the TINproduced using the settings in this exercisecontains 1417 nodes.

Page 22: Tutorial: Surface Modeling

Surface Modeling

page 22

Triangulation with BreaklinesSTEPS

press [Input Object] andselect the ELEV_PTS

object from the SURFACE

Project Fileon the Output panel turnon the Apply Breaklinestoggle button

select object STREAMS

from the SURFACE ProjectFilepress [Run] and directthe output TIN object tothe SURFOUT Project File

The Triangulation operation includes several pro-cessing options that are available for any input objecttype, including the use of breaklines. Breaklinesare 3D vector lines or polygons that modify or refinethe structure of the resulting TIN object.

The Apply Breaklines option uses vector lines toguide the creation of the TIN structure. TIN nodes

are inserted along thebreaklines so that eachbreakline is reproduced inthe TIN as a series of in-terconnected triangleedges, and no TIN edgecrosses a breakline. Thebreaklines used in this ex-

ercise represent a drainage network. In addition toproviding supplemental elevation control, they alsomark the change in slope direction at the bottom ofvalleys and as such are significant topographic fea-tures. Using breaklines representing stream linesand ridge crests creates a TIN that better representsthe landscape shape.

TIN nodes are inserted alongbreaklines so that no edgescross these lines.

Page 23: Tutorial: Surface Modeling

Surface Modeling

page 23

Triangulation Using Breaklines to ClipThe Apply Clipping option allows you to use one ormore polygons in a vector object to limit the extentof the TIN produced by the Triangulation operation.

The Clip Inside option is appropriate when the poly-gon represents the outer boundary of the area ofinterest. The TIN structure inside the breakline poly-gon is retained, while edges and nodes outside thepolygon are eliminated. In the example in this exer-cise, the input elevation point database representsthe island of Maui and a smaller outlying island, whilethe breakline polygonoutlines the shoreline ofthe main island. Only themain island is covered bythe resulting TIN object.

The Clip Outside optioncreates “holes” within theTIN: the TIN structureoutside the polygon is preserved, and edges andnodes inside the polygon are eliminated. In a topo-graphic example, this option might be used when thepolygon represents the complex shoreline of a large,irregularly shaped lake. Without clipping, the lakesurface would be represented by a large number ofhorizontal triangles.

STEPSpress [Input Object],navigate to the MAUISURF

Project File, and doubleclick on the MAUI_PTS_DB

objectselect the MAUIPTS tableand press [OK]in the Pins section of theInput panel choose ByQuery from the Z Valuemenu and press[Specify...]

in the Script Editorwindow press theInsert Field icon buttonin the Insert Fieldwindow, MAUIPTS shouldbe automaticallyselected in the TableList; choose ELEV in theField list and press[Insert]press [OK] in the ScriptEditor windowon the Output tabbedpanel, turn off the ApplyBreaklines toggle buttonturn on the ApplyClipping toggle buttonand choose objectSHORELINE in the MAUISURF

Project Filechoose Clip Inside fromthe clipping menupress [Run] and directthe output TIN object tothe SURFOUT Project File

Page 24: Tutorial: Surface Modeling

Surface Modeling

page 24

Triangulation with OptimizationSTEPS

turn off the ApplyClipping toggle button onthe Output tabbed panelturn on the Optimizetoggle button in theOptimization box on theOutput tabbed panel

set the Z Tolerancevalue to 10.0set the Min. Edge Lengthvalue to 200set the Max. EdgeLength value to 5000press [Run] and directthe output TIN object tothe SURFOUT Project Filein the Layer Manager,turn off the Show/Hidecheckbox for theSHORELINE vector used inthe previous exercise

TIN Optimization provides several functions to fil-ter out redundant TIN nodes and control thegeometry of the resulting TIN object. If a TIN nodeis too close to another node with a similar elevation,it is identified as redundant and eliminated. The ZTolerance parameter defines the minimum elevation

difference that is allowedfor nearby nodes in the fi-nal TIN object. TheMinimum Edge Length pa-rameter value quantifies“nearby”: it sets the mini-mum triangle edge lengthallowed in the output TIN.

The Maximum Edge Length parameter value sets anupper limit on the length of triangle edges in theTIN. This parameter can be useful when the set ofinput points has an irregular margin or includes twodistinct clusters of points, and you don’t have asuitable breakline polygon available for clipping. Forthe point database used in this exercise, triangula-tion without optimization would create a number oflong edges that would span indentations in the coast-lines and connect the two islands. The selectedvalue of the Maximum Edge Length parameter elimi-

nated most of these long edges. The fewremaining extraneous edges along the

coastlines can be easily removedin the TNTmips Editor.

Page 25: Tutorial: Surface Modeling

Surface Modeling

page 25

The Profiling operation creates a series of parallel(“stacked”) vertical profiles of a surface raster.Stacked profiles provide a quick alternative meansof visualizing a three-dimensional surface fromdifferent directions and with differing vertical scales.The profiles are stored as a CAD object.

You can use the settings on the Parameters tabbedpanel to control the spacing between profile lines,vertical scaling, the profile line direction, and op-tional profile line smoothing.

Profiling a Surface RasterSTEPS

select Profiling from theOperation option menupress [Input Object] andselect the ELEV_RAST

object from the SURFACE

Project Fileon the Parameterspanel, set the DistanceBetween Profilesparameter value to 20and the MaximumAmplitude to 150

Set the maximum vertical dimension ofa profile (in raster cells) with theMaximum Amplitude parameter value.You should adjust the profile spacingand amplitude in tandem to ensure thatthe profiles show sufficient detailwithout confusing overlap.

The Distance Between Profilesparameter controls the profile spacing.

Turn on the Show Area Above Baselinestoggle button to create profiles with theupper portions marked by hatch fills.

press [Run] and directthe output CAD object tothe SURFOUT Project File

Page 26: Tutorial: Surface Modeling

Surface Modeling

page 26

You can easily set up DataTips to show Z-values in the output objects youcreate in the Surface Modeling process. Press the Layer Controls icon buttonin the Layer Manager for the relevant layer to open its Layer Controls window.Open the Object tabbed panel (for a raster) or the panel for the desired elementtype in a vector or TIN object. Choose a predefined DataTip source from theShow menu or choose Select Attribute to open the Select Table/Field windowand choose the appropriate database table and field (for example, NODE.Zfor TIN nodes). For further information, see the tutorial booklets DisplayingGeospatial Data and TNT Product Concepts.

The default profiling direction is horizontal. To cre-ate profiles in other orientations, specify a rotationangle (positive degrees counterclockwise from hori-zontal or negative degrees clockwise fromhorizontal).

If profiles appear “noisy” (too detailed),you can either increase the value of theSampling Along Profile parameter orsmooth the profile. The profile issmoothed by splining, with a choice ofeither Cubic (third order) B Spline, orQuadratic (second order) B Spline meth-ods.

STEPSpress [Input Object] andselect the DEM_135object from the MAUISURF

Project File

Creating Rotated Profiles

on the Parameterspanel, set the DistanceBetween Profilesparameter value to 15and the MaximumAmplitude to 80set the Rotation Angle to-30.00choose Cubic BSplinefrom the Spline Typeoption menupress [Run] and directthe output CAD object tothe SURFOUT Project File

Page 27: Tutorial: Surface Modeling

Surface Modeling

page 27

This diagram and chart summarize therelationships between the variousSurface Modeling operations, outputobjects, and valid input objects.

Surface Modeling SummaryTriangulation

Surface Fitting

Contouring

Profiling

Point Data:Vector,Shape,

Database(Input Only)

TIN

Raster

3D VectorContours

Profiles

Operation Method

Input ObjectsOutputObjectRaster TIN

VectorLines

VectorPoints

ShapeData-base

SurfaceFitting

MinimumCurvature

Yes Contours Yes Yes Yes

Raster

UnivariateCurve

Contours

InverseDistance

Yes Contours Yes Yes Yes

Profiles Yes Contours

Polynomial Yes Yes Yes Yes

TriangleInterpolation

(Linear,Quintic, Nonic)

Yes Yes Yes

Kriging Yes Yes Yes Yes

Bidirectional Transects

Contouring

Linear Yes YesVector

ContoursIterativeThresholding

Yes

Triangulation

Delaunay Contours Yes Yes Yes

TINAdaptiveDensification

Yes

ProfilingStack

ProfilesYes CAD

Page 28: Tutorial: Surface Modeling

Surface Modeling

page 28

Advanced Software for Geospatial AnalysisSURFACES

www.microimages.com

MicroImages, Inc. MicroImages, Inc. publishes a complete line of professional software for advanced geospatialdata visualization, analysis, and publishing. Contact us or visit our web site for detailed productinformation.TNTmips Pro TNTmips Pro is a professional system for fully integrated GIS, image

TNTmips Basic TNTmips Basic is a low-cost version of TNTmips for small projects.

TNTmips Free TNTmips Free is a free version of TNTmips for students and learningprofessionals with small projects.

TNTedit TNTedit provides interactive tools to create, georeference, and edit vector, image,CAD, TIN, and relational database project materials in a wide variety of formats.

TNTview TNTview has the same powerful display features as TNTmips and is perfect forthose who do not need the technical processing and preparation features of TNTmips.

TNTatlas TNTatlas lets you publish and distribute your spatial project materials on CD orDVD at low cost. TNTatlas CDs/DVDs can be used on any popular computing platform.

Indexbreaklines (in Triangulation)..............22,23clipping (in Triangulation)...................23Contouring...............................3,16-19,27

Iterative Thresholding method.......19Linear method.............................17,18with resampling........................18

Input panel...............................................5order, polynomial................................7,13output panel.............................................5Profile View (in GeoToolbox).................9Profiling.......................................3,25-26relief shading..........................................9search distance parameter

in Inverse Distance surface fitting.......6in Profiles surface fitting...................15

smoothingcontours.....................................17profile lines....................................26

Surface fitting................................3-15,27Bidirectional method........................14Inverse Distance method....................8Kriging method................................15Minimum Curvature method........10,11Polynomial method............................7Profiles method...............................8Triangle Interpolation method........12Univariate Curve method...............8

tension, in minimum curvature.............11Triangulation............................3,20-24,27

clipping.........................................23Delauney method.............................16Adaptive Densification method.......21using breaklines...........................22,23TIN optimization............................24