Академический Документы
Профессиональный Документы
Культура Документы
03.10.2005
Page 2
Trademarks
MicroStation, MDL and MicroStation stylized "M" are registered trademarks of Bentley
Systems, Incorporated. MicroStation PowerDraft and MicroStation GeoOutlook are trademarks
of Bentley Systems, Incorporated.
TerraBore, TerraGas, TerraLink, TerraMatch, TerraModeler, TerraPark, TerraPhoto, TerraPipe,
TerraScan, TerraStreet and TerraSurvey are trademarks of Terrasolid Limited.
Windows is a trademark of Microsoft Corporation.
Acrobat Reader is a trademark of Adobe Systems Incorporated.
OSTN02 is a trademark of Ordnance Survey, the national mapping agency of Great Britain.
Intergraph Raster File Formats - Copyright - 1994 Intergraph Corporation. Used with permission.
Copyright
1998-2005 Arttu Soininen, Terrasolid. All rights reserved.
Page 3
Table of Contents
Getting Started
1 Documentation................................................................................................ 8
About the documentation...................................................................... 8
Accessing documentation on-line......................................................... 8
Document conventions ......................................................................... 8
MicroStation documentation ................................................................ 8
3 Installation .................................................................................................... 11
Hardware and software requirements ........................................................... 11
Installation media.......................................................................................... 11
Installation from zip file................................................................................ 12
Installation from CD ..................................................................................... 13
4 Starting TerraScan....................................................................................... 14
Starting TerraScan ........................................................................................ 14
Unloading TerraScan .................................................................................... 15
Tutorial
5 Tutorial.......................................................................................................... 17
Tool Reference
6 Coordinate transformations........................................................................ 19
Projection system transformations ................................................................ 19
Builtin projection systems .................................................................. 19
User projection systems...................................................................... 20
US State Planes................................................................................... 21
User defined transformations ........................................................................ 22
8 Drawing Tools............................................................................................... 53
Draw tool box ............................................................................................... 53
Mouse Point Adjustment .................................................................... 54
Fit Linear Element .............................................................................. 55
Drape Linear Element......................................................................... 57
Find Breakline Along Element ........................................................... 58
Set Polygon Elevation ........................................................................ 59
Construct Building.............................................................................. 60
Place Collection Shape ....................................................................... 61
12 Powerline processing.................................................................................. 96
Powerline tool box ........................................................................................ 97
Place Tower String ............................................................................. 98
View Tower Spans............................................................................ 100
Place Catenary String ....................................................................... 102
Check Catenary Attachments ........................................................... 103
Label Catenary Height...................................................................... 108
Find Danger Objects ......................................................................... 109
Detect Wires ..................................................................................... 111
Classification Reference
16 Classification routines.............................................................................. 123
By class............................................................................................. 123
Low points ........................................................................................ 123
Isolated points................................................................................... 124
Air points .......................................................................................... 125
Below surface ................................................................................... 126
Ground .............................................................................................. 127
By height from ground ..................................................................... 129
By minimum elevation ..................................................................... 130
By absolute elevation........................................................................ 131
By echo ............................................................................................. 131
By intensity....................................................................................... 131
By color ............................................................................................ 132
By centerline..................................................................................... 133
By tunnel section .............................................................................. 134
Non-ground....................................................................................... 136
Railroad ............................................................................................ 137
Buildings........................................................................................... 138
Model keypoints ............................................................................... 139
Programming Interface
Page 6
Additional Information
22 Installation Directories ............................................................................ 165
1 Documentation
Document conventions
The following conventions and symbols appear in this guide:
Keyboard keys are enclosed with angle brackets - for example, <Return>.
Alternate procedures are separated by "OR".
Alternate steps in a procedure are separated by "or".
"Key in" means to type a character string and then press <Return> (or <Tab> in dialogs).
The following icons are used to specify special information:
MicroStation documentation
This document has been written assuming that the reader knows how to use basic MicroStation
features. You should refer to MicroStation printed documentation or on-line help whenever you
need information on using the CAD environment.
Page 9
2 Introduction to TerraScan
2 Introduction to TerraScan
Introduction
TerraScan is a dedicated software solution for processing laser scanning points. It can easily
handle millions of points as all routines are tweaked for optimum performance.
Its versatile tools prove useful whether you are surveying transmission lines, flood plains,
proposed highways, stock piles, forest areas or for city models.
The application reads points from XYZ text files or binary files. It lets you:
view the points three dimensionally
define your own point classes such as ground, vegetation, buildings or wires
classify the points
classify points using automatic routines
classify 3D objects such as towers interactively
delete unnecessary or erroneous points in a fenced area
remove unnecessary points by thinning
digitize features by snapping onto laser points
detect powerline wires or building roofs
export elevation color raster images
project points into profiles
output classified points into text files
TerraScan is fully integrated with MicroStation. This CAD environment provides a huge number
of useful tools and capabilities in the areas of view manipulation, visualization, vector placement,
labeling and plotting. A basic understanding of MicroStation usage is required in order to be
productive with TerraScan. The more familiar you are with MicroStation, the more benefit you
can get from its huge feature set.
Page 10
2 Introduction to TerraScan
3 Installation
Installation media
TerraScan software may be delivered on a CD or as a zip file.
The zip package is big enough only to contain the actual software it does not include the
example data set or the on-line Acrobat manual.
Terra Installation CD includes the software, example data and the on-line documentation. When
you install from the CD, the software and the documentation will be copied to you hard disk. If
you want to use the example data, you should access it directly from the CD or copy it to the hard
disk yourself. See Tutorial on page 17 for more information about the example data.
Terra Installation CD may include versions for multiple environments. You should locate the
directory which corresponds to your operating system:
4. The installation program prompts you to enter the directory where to install TerraScan. The
default path is C:\TERRA. You can set this to another location if you prefer. The specified
directory will be automatically created, if it does not exist.
5. At this stage you should check the directory where MicroStation was found. Replace the
path if the correct location was not found.
6. Press <Return> to continue.
When the installation is finished, a message is displayed and you are prompted to press any
key to continue.
See chapters Installation Directories on page 165 and Configuration Variables on page 166 for
more information.
Page 13
3 Installation
Installation from CD
To install TerraScan from CD:
1. Insert Terra Installation CD into your CD-ROM drive.
2. Locate the correct directory which corresponds to your computer configuration.
3. Start SETUP.EXE from that directory.
The installation program will try to determine where MicroStation has been installed and will
then open the Terra Setup dialog box:
4. The installation program prompts you to enter the directory where to install the
applications. The default path is C:\TERRA. You can set this to another location if you
prefer. The specified directory will be automatically created, if it does not exist.
5. Check the directory where MicroStation was found. Replace the path if the correct location
was not found.
Alternatively, you can use the Scan button to automatically search the hard disk for
MicroStation installation or you can use the Browse button to locate the MicroStation
executable yourself.
6. Check the MicroStation version information in the Version field. Select the correct version
if it was not detected correctly.
The installation program will want to know what applications you want to install. The Terra
Setup dialog opens:
7. Check TerraScan for MicroStation item or TerraScan Viewer item in the dialog. You
may select other applications as well for which you have a valid license.
8. Click OK.
A message is display when the installation is finished.
See chapters Installation Directories on page 165 and Configuration Variables on page
166 for more information.
Page 14
4 Starting TerraScan
4 Starting TerraScan
Starting TerraScan
TerraScan is an MDL application that runs within MicroStation.
To start TerraScan:
1. From the Utilities menu, choose MDL Applications.
The MDL settings box opens:
Available Applications list box shows all the MDL applications that MicroStation is able to
locate. MicroStation searches for MDL applications in the directories listed in MS_MDLAPPS
configuration variable. If MicroStation can not find TSCAN.MA, you should check the value
assigned to this configuration variable. Make sure the directory path of TSCAN.MA file is
included in this variable. To view configuration variables, choose Configuration command from
the Workspace menu. See Installation Directories on page 165 and Configuration Variables
on page 166 for more information.
Page 15
4 Starting TerraScan
Unloading TerraScan
TerraScan will unload automatically when you exit MicroStation. Sometimes you may want to
unload TerraScan while continuing to work with MicroStation. This will free up memory reserved
by TerraScan.
To unload TerraScan:
1. From the Utilities menu, choose MDL Applications.
The MDL settings box opens:
5 Tutorial
TO BE DEFINED
Tool Reference
Page 19
6 Coordinate transformations
6 Coordinate transformations
TerraScan can apply coordinate transformations at different steps of the processing chain. You can
perform coordinate transformations when reading in points, working with the points in RAM or
writing points to output files.
TerraScan sees coordinate transformations as falling into three categories:
Projection system transformations - mainly used to transform coordinates from WGS84 to
projection system eastings and northings. This is normally done when importing data into
TerraScan.
User defined transformations - coordinate transformations which can be defined by a handful
or parameters and equations.
Geoid correction - transforms elevation values from one height model to another. Typically
used to transform from WGS84 ellipsoidal to orthometric elevation values. See chapter
Adjusting elevation values on page 117 for more information.
Setting: Effect:
Finnish KKJ If on, conversion to KKJ can be applied when loading points.
Deutsche Bahn GK If on, conversion to Deutsche Bahn GK can be applied.
Japan If on, conversion to Japanese zones 1 - 19 can be applied.
South Africa If on, conversion to South African LO system can be applied.
Swedish RT90 If on, conversion to RT90 can be applied.
UK National Grid If on, conversion to UK National Grid can be applied.
UTM WGS North If on, conversion for northern hemisphere zones can be applied.
UTM WGS South If on, conversion for southern hemisphere zones can be applied.
Page 20
6 Coordinate transformations
Setting: Effect:
Name Descriptive name for the projection system.
Semi-major axis Semi-major axis of target ellipsoid.
Inverse flattening Inverse flattening of target ellipsoid.
Shift X Datum x shift from WGS84 to target (m).
Shift Y Datum y shift from WGS84 to target (m).
Shift Z Datum z shift from WGS84 to target (m).
Rotation X Datum rotation around x axis (arc seconds).
Rotation Y Datum rotation around y axis (arc seconds).
Rotation Z Datum rotation around z axis (arc seconds).
Scale correction Datum scale correction as parts per million. Actual scale factor is
computed as 1.0 + (0.000001 * ScaleFactor).
Projection type Type of projection system.
Origin longitude Longitude of true origin (decimal degrees).
Origin latitude Latitude of true origin (decimal degrees).
False easting Map coordinate easting of true origin.
Page 21
6 Coordinate transformations
Setting: Effect:
False northing Map coordinate northing of true origin.
Scale factor Scale factor on central meridian.
Unit Distance unit: Meter, International foot, US Survey Foot or
International yard.
US State Planes
Settings tool includes a list of US State Plane projection systems using NAD83 datum. You should
check the toggle box of those state plane systems you want to enable.
You can copy a builtin US State Plane definition into User Projection Systems in case you need
to change the unit or the datum used.
Page 22
6 Coordinate transformations
Linear transformation
Linear transformation scales and/or translates coordinate values.
Setting: Effect:
Multiply by - X Coefficient for multiplying easting.
Multiply by - Y Coefficient for multiplying northing.
Multiply by - Z Coefficient for multiplying elevation.
Add constant - X Value to add to easting.
Add constant - Y Value to add to northing.
Add constant - Z Value to add to elevation.
Page 23
6 Coordinate transformations
Equation transformation
Equation transformation lets you define a transformation by entering mathematical equations for
computing the new easting, northing and elevation values from the source easting, northing and
elevation. You can also enter equations for upto six intermediate variables which are computed in
order V1, V2, V3, V4, V5 and V6 before evaluating new coordinates X, Y and Z.
Setting: Effect:
V1 Optional equation for calculating intermediate variable V1.
V2 Optional equation for calculating intermediate variable V2.
V3 Optional equation for calculating intermediate variable V3.
V4 Optional equation for calculating intermediate variable V4.
V5 Optional equation for calculating intermediate variable V5.
V6 Optional equation for calculating intermediate variable V6.
X Equation for calculating easting coordinate. The mathematical
equation may contain:
Sx - survey file X coordinate.
Sy - survey file Y coordinate.
Sz - survey file Z coordinate.
Intermediate variables V1, V2, V3, V4, V5 and V6.
Mathematical functions such as sin(a), cos(a), tan(a), exp(a),
log(a), log10(a), pow(a,b), sqrt(a), ceil(a), fabs(a) and floor(a)
where a and b are floating point values.
Y Equation for calculating northing coordinate.
Z Equation for calculating Z coordinate.
Setting: Effect:
Survey X, Y, Z First known point in the survey coordinate system.
X, Y, Z Second known point in the survey coordinate system.
Design X, Y, Z First known point in the design file coordinate system.
X, Y, Z Second known point in the design file coordinate system.
Xy multiply
Xy multiply applies a transformation using equations:
NewX = dx + a * X + b * Y
NewY = dy + c * X + d * Y
NewZ = dz + e * Z
where dx, dy, dz, a, b, c, d and e are constant parameters of the transformation.
Page 24
6 Coordinate transformations
Setting: Effect:
Dx Value to add to x coordinates.
Dy Value to add to y coordinates.
Dz Value to add to z coordinates.
Ox X coordinate of rotation center point.
Oy Y coordinate of rotation center point.
Oz Z coordinate of rotation center point.
Rx Rotation angle in radians around x axis.
Ry Rotation angle in radians around y axis.
Rz Rotation angle in radians around z axis.
3D Affine
3D Affine applies a transformation using equations:
NewX = dx + (1.0 + mx) * X + rz * Y - ry * Z
NewY = dy + (1.0 + my) * Y - rz * X + rx * Z
NewZ = dz + (1.0 + mz) * Z + ry * X - rx * Y
where dx, dy, dz, mx, my, mz, rz, ry and rz are constant parameters of the transformation.
Page 25
6 Coordinate transformations
Projection change
Projection change transforms coordinates from one projection system to another. The software
will transform the xyz coordinates from the source projection system back into WGS84 geocentric
xyz and then computes the transformation into the destination projection system.
If you have applied a geoid correction, you should run a reverse geoid correction to the data set
before using Projection change transformation. This is essential in cases where the source and
the destination systems use different ellipsoids or datums.
Projection change transformation will apply a geoid correction or a reverse geoid correction
automatically only when using UK National Grid system.
Setting: Effect:
From Source projection system.
To Destination projection system.
Modify Coordinate values to modify:
Xyz - modifies all coordinate axes.
Xy only - makes no change to elevation values.
Page 26
7 General tools
7 General tools
To: Use:
Settings
Settings tool lets you change a number of settings controling the way TerraScan works. Selecting
this tool opens the TerraScan settings window.
Settings are grouped into logical categories. Selecting a category in the list causes the appropriate
controls to be displayed to the right of the category list.
Page 28
7 General tools
Setting: Effect:
Default format Default format: EarthData EEBN, EarthData EBN, LAS
binary, Scan binary 16 bit lines or Scan binary 8 bit lines.
Setting: Effect:
East North Z Default extension for plain xyz text files.
Code East North Z Default extension for text files containing point class and
coordinates.
TerraScan binary Default extension for binary files in TerraScan format.
ArcInfo shapefile Default extension for ArcInfo shapefiles.
EarthData binary Default extension for binary files in EarthData format.
Page 29
7 General tools
Setting: Effect:
Ignore first echoes If on, TerraScan will filter first echoes from Optech
xyzxyzii type files based on the elevation difference of the
first and last echo.
Less than First echoes less than this elevation difference above the
corresponding last echo will be ignored.
Each report column will display some information computed at an increasing station position
along alignment. Some data contents allow the definition of an offset from the alignment.
Negative offset is left from alignment, zero offset is at alignment and positive offset is right from
alignment.
Collection shapes
Collection shapes category lets you define collection shape types which can be used to group
laser points together. Typical collection shape types are: Building, Road or Tree.
The actual grouping is carried out by placing a polygon around an object which one wants to treat
as one collection or as one group. You can use the Place Collection Shape tool to place a collection
shape. The collection shape type used determines what kind of an object the polygon encloses. The
collection shape type also determines the level and the symbology used for the polygon.
Collection shapes can be used later on to output laser points in a manner where each collection or
each object is written to its own output file. You can use this to output all laser hits on buildings
and generating one output file for each building. See for more information.
Setting: Effect:
Bad Flightline number range with Bad quality tag.
Poor Flightline number range with Poor quality tag.
Normal Flightline number range with Normal quality tag.
Good Flightline number range with Good quality tag.
Excellent Flightline number range with Excellent quality tag.
Setting: Effect:
Size limit Maximum size for generated design file when drawing laser
points to the design file. TerraScan will stop writing when the
size has been reached and will allow you to change to an empty
design file before continuing. MicroStation design files can not
exceed 32MB in size.
Setting: Effect:
Accuracy Number of decimals to display in elevation values.
Display plus If on, positive elevation values will display a plus sign.
Display minus If on, negative elevation values will display a plus sign.
Page 32
7 General tools
Setting: Effect:
Hilite Color and weight for rectangle drawn around active point.
Operation category
Operation category defines what happens at application startup and how it is unloaded.
Setting: Effect:
Create Applications menu If on, TerraScan will create an Applications menu in
MicroStation's command window at startup. This menu will
contain items for opening TerraScan toolboxes.
Open Main tool box If on, the application will open its Main tool box at startup.
Main tool box is closed If on, the application will be unloaded when Main tool box
is closed.
Setting: Effect:
Draw When to draw laser points:
Before elements - laser points may be hidden by attached
raster images or design file elements.
After elements - laser points will partially overlay and
hide other types of information.
MicroStation V8
MicroStation V8 uses 64 bit values for storing vector elements. TerraScan uses a coordinate setup
which is separate from the design file coordinate system. The application uses a default coordinate
setup of 100 integer steps for each master unit. You can use Define Coordinate Setup tool to
change the coordinate setup which the application stores in the design file but it does not affect
MicroStation itself or the vector elements.
Page 34
7 General tools
Define Classes
Define Classes tool opens a window for managing point classes and their drawing rules.
Each laser point can be assigned a point class which defines what the laser has hit - ground,
vegetation, building, wire or some other object.
Each point class is normally assigned one or more drawing rules. This will give each point or each
type of target object a unique symbology. You might assign ground to be brown, vegetation green
and buildings red. It is recommendable that you will assign a unique color for each point class.
You should create at least one point class list of your own. In the long run, you will probably want
to create several class lists for different purposes. Class lists are stored as text files. Only one class
list can be active at a time.
The list box contains a list of all point classes in the active class list.
Setting: Effect:
Code Code number for the class. Each class should have unique number.
Description Descriptive name for the class.
Color Color in which to draw this class.
Weight Line weight for drawing.
Draw Type of element to create when writing points permanently to the
design file.
Level Level on which to create elements when writing points to design.
" Draw and Level settings have an effect only when writing points permanently to the design file.
When TerraScan is displaying loaded points, they are always drawn as points and only Color and
Weight settings are used.
Define Project
Define Project tool opens a window for defining active project information and for processing
project blocks.
Project defines how the complete data set is divided into smaller parts. These geographical regions
are called blocks in TerraScans terminology.
The main benefits from defining a project are:
Project definition divides the data set into smaller, more manageable parts. Each part has a
small enough point count that you can load all of those points into RAM and perform
classification steps.
You can import points and let the application automatically divide points into geographical
regions. This is required as input data is often in flight line order but we need all the points
from a geographical region when performing classification.
You can run macros that automatically process every geographical region. This helps
automate classification, coordinate transformation, thinning and data output tasks.
The window title bar displays the name of the active project if one is loaded and the list box
displays the blocks defined for that project. Each block has a geographical boundary and one
binary file into which points inside that block are stored.
The pulldown menu in the Project window includes the following commands:
To: Use:
Create a new project definition File / New project
Read project definition from a file File / Open project
Save a modified project definition File / Save project
Save project definition to a new file File / Save project As
Edit project information File / Edit project information
Read points and divide those into blocks File / Import points into project
Add new blocks using boundary elements Block / Add by boundaries
Modify file name of a selected block Block / Edit definition
Delete a block from project defintion Block / Delete definition
Release a locked block for modification Block / Release lock
Draw boundaries of blocks into the design file Block / Draw boundaries
Create block shapes for a corridor project Block / Create along centerline
Transform coordinates of block boundaries Block / Transform boundaries
View a smaller dialog View / Short list
View a larger dialog View / Long list
Page 37
7 General tools
To: Use:
Execute a macro on all or selected blocks Tools / Run macro
Adjust elevations of all or selected blocks Tools / Adjust to geoid
Modify coordinates using a xyz adjustment model Tools / Adjust xyz
Compare how well laser data matches control Tools / Output control report
View statistics about project blocks Tools / Show statistics
Extract color values for laser points Tools / Extract color from images
Create regular grid models for selected rectangles Tools / Export lattice models
Create raster images for selected rectangles Tools / Export raster images
Outputting points inside collection shapes Tools / Output collection shapes
Manage Trajectories
Manage Trajectories tool opens a window for managing trajectories of the laser scanner or other
sensors. This window has menu commands for importing trajectory information from text files,
for transforming trajectory coordinates and for splitting trajectories to smaller parts.
Trajectory information is required by the following tools:
Tools / Cut overlap menu command for deleting overlapping points from overlapping
flightlines
Flightline / Adjust laser angles menu command for applying known heading, roll and pitch
corrections to laser data
TerraMatch for fixing mismatches in laser data
TerraPhoto for computing camera positions
TerraPhoto for displaying videos linked to position
The window title bar displays the name of the active trajectory directory if one is defined.
The list box displays the binary trajectory found in the active directory.
The pulldown menu in the Manage Trajectories window includes the following commands:
To: Use:
Set active directory for trajectories File / Set directory
Import trajectory information File / Importing files
Import files under one folder and its subfolders File / Import directory
Import separate txyz and thrp files File / Merge from GPS and INS
Modify trajectory information Trajectory / Edit information
Assign number by identifying a laser point Trajectory / Assign number
Delete selected trajectories Trajectory / Delete
View positions of a selected trajectory Trajectory / View positions
Split a trajectory into smaller parts Tools / Split
Split a trajectory automatically into flight passes Tools / Cut turnarounds
Split a trajectory keeping only polygon contents Tools / Delete outside polygons
Assign increasing numbers to selected trajectories Tools / Renumber trajectories
Transform trajectory coordinates Tools / Transform
Adjust trajectory elevations Tools / Adjust to geoid
Convert trajectory angle values Tools / Convert angles
Draw trajectories into the design file Tools / Draw into design
Page 39
7 General tools
Importing trajectories
Trajectory information needs to be imported and translated into TerraScan binary trajectory files
(*.TRJ) before it can be used. The input files should contain time stamped position and attitude
information. The input files can be:
text files with one of the built-in file formats
binary sbet.out files from Applanix software
text files for which you have defined the file format using Settings tool
To import trajectories:
1. Select Import trajectories command from File pulldown menu.
This opens a dialog which allows you to select one or several files to process.
2. Add the desired file(s) to the list of files to process and click Done.
The Import trajectories dialog opens:
Page 40
7 General tools
Setting: Effect:
File format File format definition for interpreting the input files.
Flightline number to assign for the first file coming in.
First number
Consecutive files will get increasing numbers.
Quality Quality tag to assign for incoming trajectories.
WGS84 Projection system transformation to apply.
Transform Coordinate transformation to apply.
Input angles Type of input angles: Degrees, Radians or TopEye radians.
If on, this will apply meridian convergence correction to heading
Adjust heading values. Correction is based on projection system selected in
WGS84 field and coordinate transformation Transform field.
Thin positions If on, intermediate positions will be skipped.
Xyz tolerance Maximum allowed xyz difference caused by thinning.
Angle tolerance Maximum allowed angular difference caused by thinning.
" TerraScan and TerraMatch do not need highly accurate trajectory information. It is beneficial to
remove unnecessary positions with Thin positions setting when importing. This will reduce the
amount of memory consumed by trajectory information and speed up processes.
Page 41
7 General tools
Setting: Effect:
Trajectory number which should match the flightline number of
Number
laser points measured from the trajectory.
Quality Overall quality or usability of laser points for this trajectory.
Description Free text describing the trajectory.
Video 1 Primary video file linked to this trajectory.
Start time GPS week second time stamp for start of the video.
End time GPS week second time stamp for end of the video.
Video 2 Secondary video file linked to this trajectory.
Start time GPS week second time stamp for start of the video.
End time GPS week second time stamp for end of the video.
To split a trajectory:
1. Select Split command from Tools pulldown menu.
As you move the mouse, TerraScan hilites the closest trajectory.
2. Identify the trajectory to split.
3. Enter a position at which to split the trajectory.
This cuts the trajectory at the given position. The application deletes the old trajectory file
and creates two new files into the active trajectory directory.
Page 42
7 General tools
2. Enter number of first new trajectory chain in the First number field.
3. Click OK.
This splits trajectories whenever there is close to a 180 degree turn.
3. Enter number of first new trajectory chain in the First number field.
4. Click OK.
This deletes all trajectory chain parts which are not inside any of the selected polygons. This
will normally increase the number of trajectory chains.
Setting: Effect:
Transform Coordinate transformation for converting input file
coordinates into design file coordinates.
Default Default point class assigned to all points when incoming file
does not contain class information.
Inside fence only If on, load only those points which are inside a fence or a
selected shape element.
About TerraScan
About TerraScan tool opens a window which shows information on TerraScan and on user
license.
Help on TerraScan
Help on TerraScan tool launches Acrobat Reader for accessing on-line help.
The on-line help is identical in structure to the printed documentation. The on-line version has
hypertext links built in, so you can jump between topics by clicking on the underlined topic names.
" Floppy based installation does not include on-line documentation. You can access on-line help
only if you have installed from CD. Accessing on-line help also requires that you have Acrobat
Reader installed on your computer.
Page 46
7 General tools
To: Use:
Draw Section
Draw Section tool creates a 3D section view from a position defined by two points.
Section view is simply a rotated MicroStation view which will display all visible design file
elements and laser points inside the given slice of space. This makes it ideal for viewing laser
points and for placing vector elements. If you use a section view to place elements, they will be
drawn to a true 3D position.
Setting: Effect:
Depth Display depth on both sides of section line.
Page 48
7 General tools
Move Section
Move Section tool lets you traverse cross section by stepping a sectional view forward or
backward.
The step size can be set to full or half of the view section depth.
Setting: Effect:
Move by Step size:
Half of view depth - Half of the content rectangle will be
visible in the next section when moved.
Full view depth - Content rectangles thouch each other
but do now overlap.
Cut Section
Cut Section tool creates a 3D section view which is perpendicular to another section view.
Cutting a perpencular section is needed when you see something interesting in a section view and
would like to get a better understanding how it looks like from different viewing angles.
Setting: Effect:
Depth Display depth on both sides of section line.
Page 49
7 General tools
Travel Path
Travel path tool lets you view a flythru along an alignment. You can define what kind of views
you want to see while traveling along the alignment. Supported view types include top, cross
section, longitudinal section and isometric views.
This tool provides an excellent way for traversing along the survey path and checking the data
visually.
The alignment element can be any linear MicroStation design file element. In most cases you
would create that element manually. Alternatively, you can use TerraScans Draw path menu
command which will draw an approximate flight path as deduced from the order of imported laser
points.
5. Set on each view type which you want see while traveling along the alignment and select
the view windows in which you want those drawn.
6. Click OK.
The application constructs internal tables for the flythru and then opens the Travel Player
dialog.
Setting: Effect:
Step Step along alignment between consecutive cross sections.
Same as depth of cross sections.
Width Width of cross sections. The cross section will display a
rectangular area which extends half width to the left and half
width to the right from alignment.
Page 50
7 General tools
Travel Player supports the following tools for traveling along the alignment:
Synchronize Views
Synchronize Views tool sets up views which will be automatically synchronized to display the
same location. This is useful when you want to view the same location using two different types
of content. For example, you may want to see an orthopho and the laser points side by side in two
different views.
Synchronize Views can make one view depend on another view using the following rules:
No synch - View works normally and does not depend on other views.
Match - Dependent view shows the same area using the same rotation as the master view.
X section - Dependent view is a cross section along the screen X axis of the master view.
Y section - Dependent view is a cross section along the screen Y axis of the master view.
Front 3D - Dependent view is a 45 oblique view looking forward and down to the area
displayed by the master view.
Side 3D - Dependent view is a 45 oblique view looking right and down to the area displayed
by the master view.
8 Drawing Tools
To: Use:
Setting: Effect:
Adjust elevation If on, elevation of mouse clicks will be adjusted.
Dz Constant to add to laser point elevation.
Adjust xy If on, xy location of mouse clicks will be adjusted.
Class Class of points to adjust to.
Point Point to adjust to:
Closest point closest to mouse click.
Highest highest point within search circle.
Average average xyz of all points within search circle.
Lowest lowest point within search circle.
Within Radius of search area circle around mouse location.
" Be sure to always close the Mouse Point Adjustment window after using it. As it will alter all
mouse clicks, it may interfere with your normal work if you forget it is active.
You can not use MicroStations tentative to snap on to laser points if the points have not been
drawn to the design file as permanent elements.
Page 55
8 Drawing Tools
Setting: Effect:
Mode Operation mode:
Sharp vertices this mode does not add any new
vertices to the linear element. Suitable for fitting a
feature which straight line segments between sharp
turns (overhead wires).
Smooth curvature this mode may add new vertices to
the linear element. Suitable for fitting a feature which
has smooth curvature only (paint line on a road).
To class Point class to fit to.
Within dxy Maximum horizontal offset for laser points to be used in
the fitting process.
Within dz Maximum elevation difference from the original element
for laser points to be used in the fitting process. Enter a
large value such as 999.000 if you want to use all laser
points regardless of elevation.
Create copy If on, the original element is kept and a copy is created on
active level using active symbology.
If off, the shape of the original element is modified.
Ignore points close to Selectable only when Mode is Sharp vertices.
vertices If on, does not use points close to vertices for fitting.
Page 56
8 Drawing Tools
Setting: Effect:
Add vertices to long Selectable only when Mode is Smooth curvature.
segments If on, adds intermediate vertices along long segments.
Smoothen curvature Selectable only when Mode is Smooth curvature.
If on, will smoothen curvature of the fitted element by
balancing angular direction changes between consecutive
vertices.
Page 57
8 Drawing Tools
Setting: Effect:
Runs along Type of surface the linear element runs along:
Planar surface element runs along a planar surface.
Juncture of surfaces element runs at the intersection of two
surfaces. There is one planar on the left side of the element and
another surface on the right side.
Edge element runs at the edge of a surface. Only points on the left
or on the right side should be used in computation.
Fixed height curb stone element runs along a curb stone. Two
linear elements are generated with a given elevation difference.
Auto height curb stone element runs along a curb stone.
Application will derive an average elevation difference between the
points on the left and the right side. Two linear elements are
generated which have the derived elevation difference.
From class Source point class to drape to.
Offset Offset range inside which to use laser points.
Smoothen Z If on, the resulting elements vertex elevations are adjusted if that
produces a smooth linear element.
Thin If on, unnecessary vertices in the resulting element are removed.
Create copy If on, a new element is created and the original is kept unchanged.
Set symbology If on, you can assign symbology for the draped element.
Strip attributes If on, the resulting element will not have any attribute linkages.
Page 58
8 Drawing Tools
Setting: Effect:
Fit to class Point class from which to find the change normally ground.
Type of breakline feature:
Slope change terrain slope changes at the breakline.
Breakline type
Elevation jump terrain elevation changes abruplty at the
breakline.
Geometry type of the resulting feature:
Line feature may have sharp turns.
Geometry
Curve feature has smooth turns only.
From element derive geometry type from starting element.
How close the starting 2D element is to the true xy position of the
Result within
breakline feature.
Plane width Width of planar like surface on both sides of the feature.
Thin result If on, unnecessary vertices in the resulting element are removed.
9 You can use a shaded surface display to visualize where breaklines run when you create the
starting 2D elements. You may also find it useful to turn the sun angle so that the sun shines
perpendicularly compared to the breakline feature.
Page 59
8 Drawing Tools
Set Polygon Elevation tool sets the elevation of a closed element based on laser points inside it.
This tool is typically used to drape a digitized shape onto the elevation of points that have hit a
building roof or a bridge. All of the element vertices are set to the same elevation value derived
from laser points.
Valid element types include shapes, complex shapes and ellipses.
Setting: Effect:
Class Class from which to derive the elevation. Only points inside the
closed element are used.
Elevation Elevation to set the element to:
Highest highest elevation among points.
Median median elevation among points.
Average average of elevations.
Lowest lowest elevation among points.
Turn clockwise If on, the resulting element is turned to always run clockwise.
Adjust to orthogonal If on, the shape will be adjusted to have exactly 90 degree turns if
all the vertices in the original element have a turn angle within
Tolerance from 90 degrees.
Create copy If on, a new element is created and the original is kept unchanged.
If off, the original element is modified and set to the new elevation.
Page 60
8 Drawing Tools
Construct Building
Not Viewer
Construct Building tool is used to vectorize a building based on laser hits on planar surfaces of the
roof.
TO BE DEFINED
Page 61
8 Drawing Tools
" The created shape element has no attribute information stored in it. The application only uses
element level, color, weight and line style to recognize the shape as being a collection shape of a
specific type. You can use vector creation or manipulation methods to create valid collection
shapes.
Page 62
9 Modeling and validating ground
To: Use:
" Create Editable Model and Rebuild Model tools require TerraModeler to run.
Page 63
9 Modeling and validating ground
Create Editable Model tool creates a surface model which can be visualized in TerraModeler and
which is actively linked to loaded laser points. You can visualize the surface model to identify
classification problems and assign correct classes to those points. The surface model together with
display methods will be updated immeadiately to reflect the change.
This tool is particularly useful when you want to validate ground classification and remove
possible remaining low points. The best display method for that purpose is Display Shaded
Surface tool in TerraModelers Display Surface tool box.
2. Select all classes which you want to include in the surface model.
This opens the Surface settings dialog in TerraModeler.
3. Enter a descriptive name for the new surface.
TerraModeler triangulates the points for a while.
4. Select the Display Shaded Surface tool in TerraModelers Display Surface tool box.
5. Select settings values and click OK.
This displays the shaded surface where color changes according to elevation and the
darkness changes according to triangle slope angle.
9 You probably want to set the visibility of laser points and the shaded surface so that they are not
drawn in the same view. You may want to have two views displaying the shaded surface but no
laser points and the other views displaying laser points but no shaded surface.
Page 64
9 Modeling and validating ground
Classify Fence
Classify Fence tool changes the classes of points inside a fence. If there is no fence defined, it will
wait for you to enter the fence first. This tool is the proper choice when there is a group of points
which you need to classify.
Rebuild Model
Rebuild Model tool runs a complete update of the editable model. It triangulates all the points in
the model classes and updates all display methods from the surface.
You need to use this tool if you have made modifications to laser points using tools other than
Assign Point Class, Classify Using Brush or Classify Fence.
Page 67
10 Working with loaded points
Memory usage
The amount of RAM memory in your computer will probably set the limit on how large jobs you
can process at one time. Each loaded laser point will take up 20 bytes of memory. You should
normally plan your work so that you will have enough physical memory to accommodate the laser
points you process. Virtual memory (hard disk) usage will drastically slow TerraScan down.
Basic total memory usage consists roughly of:
40-70 MB for Windows operating system
20 MB for MicroStation and design file
20 MB for every million laser points loaded
You should also note that some classification routines will allocate substantial amounts of
memory temporarily. The most demanding routine is probably ground classification which will
take up an additional 4 bytes for every point and 80 bytes for each point that ends up in the ground
class.
When performing ground or height from ground classifications, you can process up to:
2-5 million points with 256 MB RAM
4-10 million points with 512 MB RAM
8-20 million points with 1024 MB RAM
The low values apply when almost all points are ground hits. The high values apply when majority
of the points are hits on vegetation.
For performing other tasks, the maximum point count to process is:
8 million points with 256 MB RAM
20 million points with 512 MB RAM
40 million points with 1024 MB RAM
" MDL applications share the same 2 GB address space with MicroStation. The maximum amount
of memory that an MDL application can utilize under MicroStation SE is about 1200 MB, under
MicroStation J about 700 MB and under MicroStation V8 about 1000 MB.
Page 68
10 Working with loaded points
Setting: Effect:
Width of overlap region around the active block boundaries for
Overlap
which the application will load points from neighbouring blocks.
Open for Mode in which to open the block: Viewing only or Modification.
Fit view View(s) to fit to show all incoming points.
" Open block menu command lets you make a choice whether you are opening a block for viewing
or for modification. This setting has an effect if you use project file locking. See Project file
locking on page 92 for more information.
Setting: Effect:
Format Alignment report format to use. Defines the data content.
Transform Coordinate transformation to convert from design file
coordinates to output coordinates.
Output vertices If on, the routine will generate a row for each alignment
vertex.
Restart stationing at each If on, station values will restart from Start station at each
vertex vertex.
Start station Station value at start of the alignment.
Output string String to output when a column has no valid value.
Page 72
10 Working with loaded points
Setting: Effect:
Color by Coloring principle.
Class Point class to use.
Value Value determination within each pixel:
Lowest Smallest value of the points.
Average Average value of the points.
Highest Highest value of the points.
Colors Color depth of raster image:
24 Bit Color true color image.
256 Colors 256 colors.
Grey scale 8 bit grey scale.
Pixel size Size of each pixel.
Fill gaps If on, fill small gaps in places where there are no laser hits
inside a pixel.
Attach as reference If on, attach the image as raster reference to the design file.
Draw placement rectangle If on, draw the image position as a shape. Helps in attaching
the image to the correct location later on.
Page 74
10 Working with loaded points
Setting: Effect:
Scheme Type of coloring scheme:
Cold to hot varies from blue in low elevation to red in
high elevation.
Hot to cold varies from red in high elevation to blue in
low elevation.
Selected colors you can define the coloring scheme.
Degree Determines how the color changes in Cold to hot and Hot
to cold schemes are computed.
Page 75
10 Working with loaded points
2. Select coloring mode which you want to use in the Color by field.
3. Select the desired classes by checking the boxes in the list.
4. Click OK.
This writes the selected points to the design file.
Page 76
10 Working with loaded points
Point / Delete
Delete submenu contains commands for deleting points:
Selected points Deletes the point(s) selected in the list.
By point class Deletes all points in a class you choose.
Inside fence All points inside the fence and on visible levels.
Outside fence All points outside the fence and on visible levels.
Using centerline All points which are too far away from the selected centerline element. You
can choose the offset distance limit.
Setting: Effect:
View View for which you want change the display mode.
Color by Coloring criterion: class, echo, elevation, flightline,
intensity, distance or point color.
Weight Thickness of the points to draw.
Lines Visibility of flightlines: Draw all or Selected.
Sparse display If on, zoomed out views will be drawn faster.
Use depth If on, 3D views will color pixels using the point which is
closest to the viewer of the points falling on that pixel.
Sparse display
The term Sparse display refers to a display logic which sppeds up the display of zoomed out
views. If sparse display is on, TerraScan will display all of the points only when you have zoomed
in close to the points. When you are looking at the points from further away, TerraScan will draw
only every 5th, 10th, 20th or 50th point depending on the zoom factor.
In most cases you want to keep Sparse display on. You may need to switch it off when you need
to view a particular point class which consists of single points spread out in the data set. Low
points below the ground or other problem points are typical examples.
Page 78
10 Working with loaded points
Distance coloring
One of the coloring modes is Distance coloring which means that the application will compute
the distance of each point against a reference surface and color the point based on the distance.
TerraScan can compare laser points against the following surfaces:
Flightline average points are compared against the average surface from overlapping
flightlines. You can use this to compare how well different flightlines match each other.
Comparing against the flightline average effectively requires that you have classified ground
separately for each flightline.
Elements points are compared against vector elements in the design file. You can use this to
compare how vectorization of features such as buildings matches the point cloud.
TerraModeler surface points are compared against a TIN model. You can use this to
compare laser data against a surface model derived from another source.
Groups of points
To thin points:
1. Select Thin points command from Tools menu.
This opens the Thin points dialog:
Setting: Effect:
From class Class from which to delete unnecessary points.
Keep Which point to keep in a group of close points:
Highest point Point with highest elevation.
Lowest point Point with lowest elevation.
Central point Point in the middle of the group.
Create average Substitute group by creating an average.
Distance Horizontal distance limit between two points.
Dz Elevation difference limit between two points.
Page 82
10 Working with loaded points
To smoothen points:
1. Select Smoothen points command from Tools menu.
This opens the Smoothen points dialog:
Setting: Effect:
Modify class Point class(es) to smoothen and to compare against.
Max fix up Maximum elevation change upwards to apply to a point.
Max fix down Maximum elevation change downwards to apply to a point.
Point class(es) to compare against but points in these classes
Fixed class
will not be modified.
" Smoothing uses a large amount of memory. Approximately 92 bytes is allocated for every point
to be smoothed. This means that you can run smoothing on about 4 million points on a computer
with 512 MB of RAM.
Page 83
10 Working with loaded points
To transform points:
1. Select Transform points command from Tools menu.
This opens the Transform points dialog:
Setting: Effect:
Maximum gap Starts a new path element whenever the distance between
two consecutive laser points exceeds this value.
Page 86
10 Working with loaded points
Setting: Effect:
Flightline to which to apply the correction. Choose Any to apply
Flightline
the correction to all loaded points.
Coordinates to modify:
Xyz applies a true angular correction.
Modify Xy applies a horizontal shift relative to trajectory and flight
direction.
Z applies a change to elevation only.
Unit of angle values:
Degrees angles given in decimal degrees.
Input as Radians angles given in radians.
Ratio angles given as a ratio over a value corresponding to a
full circle.
Heading Heading correction, increases clockwise.
Roll Roll correction, increases left wing up.
Pitch Pitch correction, increases nose up.
Page 87
10 Working with loaded points
Cut overlap menu command removes laser points from locations where laser data from multiple
flightlines overlap. You can select if overlapping points will be classified to a specific class or if
they will be deleted from the data set.
This command can perform cutting using two distinct principles: Cut by quality and Cut by
offset.
Cut by quality
Cut by quality option removes lower quality laser points from locations where there is laser data
from a better flightline. This action makes sense only if there is a clear reason why one flightline
is better than another one. You might use this if:
You have laser data from two different flying altitudes. Lower flight pass is normally more
accurate than a higher one.
Hardware was not working at the best level for some flightlines.
GPS trajectory is weak for some flightlines.
You can define the quality of different flightlines as an attribute of the imported trajectories using
Manage Trajectories tool. If you do not have trajectory information, you can assign quality values
to differnt flightline number sequences in the Default flightline qualities category of user
settings.
Cut by quality option does not use time stamps.
Cut by offset
Cut by offset option removes laser points from the edges of the corridor if that location has been
covered more vertically from another flightline. This action serves two purposes:
Removing edges of the corridors produces a more uniform data density and point pattern.
Magnitude of error sources grows as scan angle increases. Removing edges of the corridors
gets rid of less accurate data and keeps the more accurate central part.
Cut by offset option requires trajectory information. If laser point time stamps are not available,
it will assume a perpendicular projection to the trajectory.
Page 88
10 Working with loaded points
To cut overlap:
1. Select Cut overlap command from Flightline menu.
This opens the Cut overlap points dialog:
Setting: Effect:
List of point classes to consider when determining if a flightline
Coverage classes
covers an area. Normally 0-255 to use all classes.
Action to perform on points to cut:
Add constant to class add given value to class code.
Action
Classify to single class classify to one target class.
Delete remove points from the data set.
To class Target class when Action is Classify to single class.
Add Value to add to classes when Action is Add constant to class.
Cut by quality If on, cut points from lower quality flightlines.
Hole size Approximate diameter of maximum acceptable hole.
Cut by offset If on, cut points by scan angle.
Minimum central part of the corridor to keep as degrees. Setting
Keep minimum
this to 20 would +10 .. -10 degree corridor.
9 You can run cut overlap on the project blocks as a macro step. When you do this, you should use
some overlap from neighbouring blocks to avoid ill effects at block boundaries.
Page 89
11 Working with projects
Setting: Effect:
Scanner Scanner type: Airborne or Ground based.
Description Descriptive text describing the project.
Block binary file format: Scan binary 8 bit, Scan binary 16 bit,
Storage
EarthData EEBN, EarthData EBN or LAS binary.
Store time stamps If on, a time stamp will be stored for each laser point.
Store color values If on, an RGB color value will be stored for each laser point.
If on, a project block file will be marked as locked when a user opens
Require file locking
it for modification with the Open block menu command..
How the directory for binary files is determined:
Project file directory same directory where project file is placed.
This setting is independent of the absolute path of the data and is
Data in
therefore good in a network environment or when moving the data
set from computer to another.
Separate directory complete path is given in the Directory field.
Directory Directory for binary files.
Size of rectangular blocks if points are encountered which are outside
Default
all of the user block boundaries.
Preferred minimum and maximum point count for a block. Only used
Preferred
to hilite exceeding point counts in red in the Project window.
Setting: Effect:
Prefix for the block binary file. Complete file name includes the
File prefix prefix, block number as six digits and extension bin (pt000001.bin,
pt000002.bin, ..).
Order in which numbering is assigned to blocks:
Selection order number increases in the same order as boundary
shapes are selected.
From selected texts selection set includes a text element inside
Numbering each shape and each text is a unique numerical value.
North to south numbering increases north to south and second-
arily west to east.
South to north numbering increases south to north and secondari-
ly west to east.
First number Number of the first block to add.
Example case
When file locking is active, your project storage directory might contain the following files:
Block binary file Temporary lock file
h:\otaniemi\ota000317.bin h:\otaniemi\ota000317.lck
h:\otaniemi\ota000318.bin
h:\otaniemi\ota000319.bin h:\otaniemi\ota000319.lck
h:\otaniemi\ota000320.bin
The above files would indicate that blocks 000317 and 000319 are undergoing modifcation and
are locked.
Setting: Effect:
Process What blocks to process: All blocks or Selected blocks.
Macro Macro file to execute.
Width of overlap region around the active block
boundaries for which the application will load points
from neighbouring blocks to support classification
Overlap
decisions. This should be used when performing ground
classification. It is a good idea to set this to be the same
as the maximum building size in ground classification.
If on, all the points that came from the active block will
be saved back to the binary file at the end of the macro.
Set this on when you want to save all of the active block
Save points at the end
points when the macro is complete.
Set this off if you macro includes an output step which
writes desired results to an output file.
Fit view Views to fit after loading each block.
Update all views after loading If on, updates all views after loading a block.
Page 94
11 Working with projects
3. Click on Browse and locate the text file which contains control points.
4. Enter other settings values and click OK.
This perform the comparison and opens a report window which shows the elevation
differences between known points and laser data.
Setting: Effect:
Process What blocks to process: All blocks or Selected blocks.
Text file containing rows with four space delimited fields.
Known points
identifier, easting, northing and elevation.
Class Point class to compare against.
Max triangle Search radius around each known point.
Maximum terrain slope for which an elevation difference will be
Max slope
computed.
Normal elevation variation of laser points. This value is used only
Z tolerance when computing the terrain slope so that small triangles will not
exceed Max slope.
Page 95
11 Working with projects
Setting: Effect:
Type Collection shape type to output.
Class Point class(es) to output.
Format Output file format.
Source of collection numbers:
Numbering Automatic applications assigns running numbers.
From texts uses texts elements inside collection shapes.
Create How to generate files: Single file or One for each shape.
Directory Directory for output files.
Prefix File name prefix before number.
Extension File name extension.
Page 96
12 Powerline processing
12 Powerline processing
TerraScan has a number of tools which are dedicated to powerline processing. These include both
classification, vectorization and reporting tools.
The general strategy for processing powerline data can be outlined as:
1. Classify ground points using Ground routine.
2. Classify high points which may be hits on wires or towers using By minimum elevation or
By height from ground routines.
3. Classify rest of the points (possibly all as vegetation).
4. Manually place a tower string to run from tower to tower using Place Tower String tool.
5. Detect wires automatically using Detect wires menu command.
6. Manually place wires using Place Catenary String tool in places where automatic detection
does not work.
7. Validate and adjust catenary curves using Check Catenary Attachments tool.
8. Create required drawings with the help of labeling tools.
9. Output required reports.
Page 97
12 Powerline processing
To: Use:
Place Tower String tool is used to manually place an approximate centerline from tower to tower.
This tower string will be used in later processing steps when detecting wires, validating catenary
attachment points or producing reports along the powerline.
Tower string is a line string or a complex chain which runs along the powerline with a vertex at
each tower.
Place Tower String tool integrates line string placement and view panning in one tool.
Setting: Effect:
Top view View in which the dynamic rectangle will be drawn and
which can be panned by clicking outside the rectangle.
Profile view An optional view which will display a profile along the
direction of tower string you are creating. You will need this
if you can not see the locations of towers from a top like
view. The profile view will show the curvature of catenary
wires to help locate towers.
Page 99
12 Powerline processing
" As an end result of tower string placement, you should get a single line string or complex chain
type element. It may happen that you can not place the entire tower string as one operation. In this
case you should continue by placing another tower string which runs in the same direction and
starts at the exact end point of the previous one. When you have placed a number of shorter tower
strings, you can join those using MicroStations Create Complex Chain tool.
Page 100
12 Powerline processing
3. Enter a level list to define what levels should be searched for wire elements.
4. Click OK.
This opens the Tower Span Display dialog:
5. Select a view to be used as Span top view and another view as Span profile.
6. (Optional) Set Tower top, Tower section and Tower profile to None if you do not want to
see views from tower locations.
7. Click OK.
Page 101
12 Powerline processing
8. Make sure the views you selected as Span top and Span profile are open.
The Tower Spans dialog is now visible:
The list box in the dialog contains one row for each tower span. The tower number is for the
start tower of the span.
9. Select one row at a time in the list.
This updates the selected views.
5. (Optional) Set Span top and Span profile to None if you do not want to see views from
tower spans.
6. Select views to be used as Tower top, as Tower section and as Tower profile views.
7. Click OK.
8. Make sure the views you selected in step 7 are open.
The Tower Spans dialog is now visible. The list box in the dialog contains one row for each
tower span. The tower number is for the start tower of the span.
9. Select one row at a time in the list.
This updates the selected views.
Page 102
12 Powerline processing
Place Catenary String tool lets you manually place a single catenary curve between two towers.
You should use this tool in places where automatic detection of wires does not work. This happens
normally when you have a very small number of hits on the wire.
You define the mathematical shape of the catenary curve with three mouse clicks. In most cases
you would use Snap to lock to use the xyz coordinates of closest laser hits.
You can enter optional mouse clicks to define the start location and the end location of the
catenary curve. These affect the length of the catenary only. You would normally use this feature
to extend the catenary curve to cover the whole distance from tower to tower. You can snap the
start location on to an end point of an incoming wire or on to a tower string vertex. Similarly, you
can snap the end location on to a start point of an outgoing wire or on to a tower string vertex.
In order to improve the accuracy of the catenary curve, you can apply least squares fitting. The
manually entered three curvature points define the initial shape of the catenary. The application
will then search all points which are within a tolerance distance from the manually entered curve
and use those points in the fitting phase.
Setting: Effect:
Start location separately If on, first point defines the start location of the catenary.
Snap to If on, adjust the three curvature points to the coordinates of
closest laser points of a given class. This lock is normally on.
Fit using If on, the catenary curve will be fitted to laser points.
Classify to If on, classify points to a given class. Affects points within a
given tolerance from the final curve.
End location separately If on, last point defines the end location of the catenary.
Page 103
12 Powerline processing
Check Catenary Attachments tool validates and adjusts catenary curves. It checks the gaps
between catenary curves at tower locations. Because each catenary curve has been computed
using laser points from one tower to tower span only, the incoming curve and the outgoing curve
do not meet exactly. The magnitude of the gap gives some indication of how accurately the
catenaries have been detected or placed.
Setting: Effect:
List of levels from which to search catenaries. For example:
From levels 50 level 50.
15,21-24 levels 15,21,22,23 and 24.
First Number of the tower at first vertex in the selected tower string.
Xy gap flagging limit. Gaps exceeding this value will be drawn in
Xy
red color in the list.
Z Z gap flagging limit.
Shift Tower shift flagging limit.
Page 104
12 Powerline processing
The Catenary Attachment window displays a list where each row corresponds to an attachment
point or to a catenary end point for which no matching catenary has been found. Each row displays
a horizontal gap, an elevation gap and a tower shift in centimeters at the attachment point.
You should now scan through the list and inspect every location where the gap values are
unacceptabe. If you have given reasonable error flagging tolerances, you will see the large gap
values displayed in red. After viewing the problem location, you may choose to improve the
catenary curves by using one of the adjustment tools from the menu.
When you are done improving the catenaries, you can choose Adjust all tool from All menu to
adjust all attachment points to the average of the catenary end points.
The Catenary Attachments window offers several menu commands for improving catenary
curves.
All / Statistics
Statistics menu command displays statistics about attachment points.
Value: Meaning:
Attachments Number of attachment points (places where two catenary
curves meet approximately).
Loose ends Number of catenary end points for which no matching catenary
has been found. These places are:
at the start or at the end of the processed line
at a tower span where a catenary has not been detected or
manually placed
at a tower where an incoming catenary string is too far from
the outgoing one
Setting: Effect:
From class Class to compare catenary curve with. Normally set to
ground class.
Within Maximum search offset on both sides of catenary line.
Page 109
12 Powerline processing
Setting: Effect:
Catenary levels List of levels from which to search catenaries.
First tower Number of the tower at first vertex in the selected tower string.
Object class Point class from which to search for danger objects.
Within Three dimensional distance limit. All points which are closer than
this to a catenary vector are considered danger points.
Report Reporting frequency:
All each laser point is reported. This is useful when you want
to classify points which should not be in high vegetation class.
One for every span each wire can have only one report row
for one tower span. The reported point is the closest.
By minimum interval the closest point for each wire within a
distance interval is reported.
6. Select views to be used as Span top, Span profile and Section views.
7. Click OK.
Page 110
12 Powerline processing
The list contains a report row for locations where a laser point was close to a wire element.
If you click on a row, the application automatically updates selected views to display that
danger location.
The Danger Objects window offers several menu and pushbutton commands viewing,
classifying, labeling and reporting danger locations.
Detect Wires
Not Viewer
Detect Wires command from Classify menu finds laser points which form a catenary curve. This
command will draw detected wires as line strings in the design file and classify matching points
in a given class.
This command will search for points which form a straight line and also match the elevation curve
of a catenary. This process involves least squares fitting for both the xy line equation and the
elevation curve equation of the catenary.
The most important parameter controling wire detection is Max gap which defines the maximum
gap between consecutive laser hits on a wire. It is not advisable to run the detection on the whole
data set with a long maximum gap as then the chances of finding false catenaries increase. You
should normally run the detection first with a relatively short maximum gap which will not
necessarily detect all wires. You may then want to process locations with very few hits on the
wires one tower segment at a time using a longer maximum gap.
To detect wires:
1. Choose Detect Wires command from Classify menu.
This opens the Detect Wires dialog:
Setting: Effect:
From class Class from which to search points. This should be the class into
which high points have been classified before.
To class Class into which to put matching points.
Process Whether to process all tower to tower spans or only a single
segment.
Max offset Maximum offset from tower string to search for points.
Max gap Maximum allowed gap between consecutive hits on a wire.
Linear tolerance Tolerance for xy line fitting and classification of matching
points.
Elevation tolerance Tolerance for elevation curve fitting and classification of
matching points.
Minimum Minimum catenary constant for solutions to search.
Maximum Maximum catenary constant for solutions to search.
Page 113
13 Railroad processing
13 Railroad processing
TerraScan has a few tools which are dedicated to railroad processing. These include both
classification and vectorization tools.
The general strategy for processing railroad data can be outlined as:
1. Classify points which may be hits on the rails. This step serves the purpose of getting a
visual image of where the railroad runs. If intensity information is available, use By
intensity routine as classifying high intensity returns often provides the best visual image.
If intensity information is not available, use Railroad routine to classify points which
match rail elevation pattern.
2. Manually place railroad centerlines using Place Railroad String tool.
3. Restore rail hits classified in step 1 back to the original class.
4. Classify rail hits using Railroad routine with railroad centerlines as alignments. This will
classify points with correct elevation pattern and within the right offset (half rail width)
from manually placed centerline.
5. Fit centerlines to classified points using Fit Railroad String tool.
6. Classify rest of the points into ground, vegetation and other appropriate classes.
7. Manually digitize relevant objects along the railroad track with the help of images and laser
points.
Page 114
13 Railroad processing
To: Use:
Place Railroad String tool is used to manually place an approximate centerline between two rails.
This manually placed centerline can be used later on to classify rail hits and to fit the centerline to
classified hits.
It is a good idea to create a custom line style definition for the rails. The custom line style should
consist of two lines which are railroad width apart. This gives you the benefit of viewing the
railroad string as a centerline or as a pair of rails simply by swithing line styles on or off in a view.
Place Railroad String tool integrates line string placement and view panning in one tool.
Fit Railroad String tool improves the accuracy of manually placed railroad centerlines by fitting
to classified laser points. This improves the position of the centerlines to follow the laser points
more closely.
For each centerline the application will use rail points which are at a valid offset distance from
manually placed centerline. You define the valid offset range with Rail width and Tolerance
settings. Valid offsets are within (0.5 * Rail width) Tolerance.
This tool leaves the original centerline elements in the design file and creates adjusted copies on
active level.
Setting: Effect:
Rail class Class to which rail hits have been classified.
Rail width Distance from rail center to rail center.
Tolerance Offset tolerance for search. This should be big enough to
allow for locational inaccuracy in manually placed
centerline and in laser points. However, it should be less
than half of Rail width.
Vertex interval Interval between vertices in the final fitted centerline.
Normally between 5.0 and 25.0 meters.
Smoothen curvature If on, will smoothen curvature of the fitted centerline by
balancing angular direction changes between consecutive
vertices. Should normally be on.
Page 117
14 Adjusting elevation values
The six known points in the illustration would not create a model that would complete enclose all
of the laser data. If you do not provide any additional information, TerraScan will automatically
add four corner points to expand the area covered by known points. Each added corner point will
be assigned the same dz value as the closest known point.
You may have better information about how the geoid is shaped. If you know the approximate
slope of the geoid, you should interpolate additional points so that all of the laser data is covered.
15 Keyin commands
Some of the tools in TerraScan can be started by entering a keyin command.
Keyin commands are handy because you can assign those to function keys in MicroStation and
thus have hot key combinations for specific operations.
This chapter gives information about those keyin commands which you may consider assigning
to function keys.
Classify Fence
Classify Fence keyin command classifies points inside fence and then starts the Place Fence tool
so that you can immediately place the next fence.
Syntax is:
Classify Fence [From] To
where From is optional point class number to classify from and To is point class to classify to. If
only one parameter is given, points in any class are classified to the given class.
Page 120
15 Keyin commands
Parameter: Effect:
Source class from which to classify. Use from=999 or from=any for any
from=n
class.
to=n Target class to classify to.
Distance by which to expand shapes. Positive values expand and negative
expand=n
values shrink the shapes.
Classify View
Classify View keyin command classifies points which are visible inside a view. You select the
view with a mouse click after starting the command.
Syntax is:
Classify View [From] To
where From is optional point class number to classify from and To is point class to classify to. If
only one parameter is given, points in any class are classified to the given class.
Parameter: Effect:
Source class from which to classify. Use from=999 or from=any to use any
from=n
visible points.
to=n Target class to classify to.
size=n Brush radius as pixels on screen.
Move Backward
Move Backward keyin command moves a section view backward by full view depth. The keyin
command must include a view number (1-8).
Syntax is:
Move Backward ViewNumber
Move Forward
Move Forward keyin command moves a section view forward by full view depth. The keyin
command must include a view number (1-8).
Syntax is:
Move Forward ViewNumber
Page 121
15 Keyin commands
Scan Display
Scan Display keyin command changes view display mode for laser points. The new display
settings are given as parameters following the keyin command. Parameters are separated from
each other with / character, for example:
Scan Display off=all/on=2/color=class
Possible parameters are:
Parameter: Effect:
View to apply to where n is view number 1-8. If this parameter is given, it
view=n must be the first one and causes an immediate change to the specified view.
If not given, the application will wait for the user to select a view.
on=n Classes to switch on. For example: on=2 or on=1,5-8 or on=all.
off=n Classes to switch off. For example: off=7 or off=3-11 or off=all.
Coloring mode where n is class, echo, elevation, line, intensity, distance or
color=n
color. For example: color=class.
Weight mode where n is weight value 0-7 or -1 for class based weight. For
weight=n
example: weight=1 or weight=-1.
lineon=n Flightlines to switch on. For example: lineon=1-3 or lineon=all.
lineoff=n Flightlines to switch off. For example: lineoff=1-3 or lineoff=all.
sparse=n Sparse display mode. For example: sparse=on or sparse=off.
depth= Depth display mode. For example: depth=on or depth=off.
16 Classification routines
The menu in Main window offers a number of classification tools. This chapter describes the
basic logic used in various classification routines.
By class
By class routine simple changes all points in a given class to another class.
9 You can often use this to undo a classification.
Low points
Not Viewer
Low points routine classifies points which are lower than other points in the vicinity. It is often
used to search for possible error points which are clearly below the ground.
This routine will basically compare the elevation of each point (=center) with every other point
within a given xy distance. If the center point is clearly lower than any other point, it will be
classified.
Sometimes you may have a higher density of error points. If there are several error points close to
each other, those will not be detected if searching for single low points. However, this routine can
also search for groups of low points where the whole group is lower than other points in the
vicinity.
Setting: Effect:
From class Source class from which to classify points.
To class Target class to put points into.
Search Whether to search for groups or single points.
Max count Maximum size of a group of low points.
More than Minimum height difference. This is normally 0.3 - 1.0 m.
Within Xy search range. Each point is compared with every other
point less than Within distance away. Normally 2.0 - 8.0 m.
Page 124
16 Classification routines
Isolated points
Not Viewer
Isolated points routine classifies points which do not have very many other points within a 3D
search radius. This routine is useful for finding isolated points up in the air or below the ground.
When possibly classifying one point, this routine will find how many neighbouring points there
are within a gived 3D search radius. It will classify the point if it does not have enough neighbours.
Setting: Effect:
From class Source class or classes from which to classify points.
To class Target class to put points into.
If fewer than Number of other points that must be found within a search
radius for the point not to be classified. Normally 1 - 5.
Within 3D search radius. Normally 2.0 - 10.0 m.
Page 125
16 Classification routines
Air points
Not Viewer
Air points routine classifies points which are clearly higher than the median elevation of
surrounding points. It can be used to classify noise up in the air.
When possibly classifying one point, this routine will find all the neighbouring source points
within a given search radius. It will compute the median elevation of the points and the standard
deviation of the elevations. The point will be classified only if it is more than Limit times standard
deviation above the median elevation. Comparison using standard deviation results in the routine
being less likely to classify points in places where there is more elevation variation.
Setting: Effect:
From classes Source classes from which to classify points.
To class Target class to put points into.
Search radius Xy search radius around point to search for neighbours and
to compute median elevation and standard deviation from.
Within 3D search radius. Normally 2.0 - 10.0 m.
Page 126
16 Classification routines
Below surface
Not Viewer
Below surface routine classifies points which are lower than other neighbouring points in the
source class. This routine can be run after ground classification to locate points which are below
the true ground surface.
The algorithm for this routine can be outlined as follows:
For each point (=central point) in the source class, find upto 25 closest neighbouring source
points.
Fit a plane equation to the neighbouring points.
If the central point is above the plane or less than Z tolerance below, it will not be classified.
Compute standard deviation of the elevation differences from the neighbouring points to the
fitted plane.
If the central point is more than Limit times standard deviation below the plane, classify it
into the target class.
Setting: Effect:
From class Source class from which to classify points. Normally Ground.
To class Target class to put points into.
Limit how many times standard deviation a point has to be below
Limit
surface to be classified.
Minimum elevation difference point has to be below surface to be
Z tolerance
classified.
Page 127
16 Classification routines
Ground
Not Viewer
Ground routine classifies ground points by iteratively building a triangulated surface model.
The routine starts by selecting some local low points as sure hits on the ground. You control initial
point selection with the Max building size parameter. If maximum building size is 60.0 m, the
application can assume that any 60 by 60 m area will have at least one hit on the ground (provided
there are points around different parts of the area) and that the lowest point is a ground hit.
The routine builds an initial model from selected low points. Triangles in this initial model are
mostly below the ground with only the vertices touching ground. The routine then starts molding
the model upwards by iteratively adding new laser points to it. Each added point makes the model
follow ground surface more closely.
Iteration parameters determine how close a point must be to a triangle plane so that the point can
be accepted to the model. Iteration angle is the maximum angle between point, its projection on
triangle plane and closest triangle vertex. Iteration distance parameter makes sure that the
iteration does not make big jumps upwards when triangles are large. This helps to keep low
buildings out of the model.
The smaller the Iteration angle, the less eager the routine is to follow changes in the point cloud
(small undulations in terrain or hits on low vegetation). Use a small angle (close to 4.0) in flat
terrain and a bigger angle (close to 10.0) in hilly terrain.
Page 128
16 Classification routines
Setting: Effect:
From class Source class from which to classify points.
To class Target class to put points into.
Select Selection of initial ground points. Use Current ground
points when you want to continue iteration in a fenced,
previously classified area.
Max building size Size of largest buildings.
Terrain angle Steepest allowed slope in ground terrain.
Iteration angle Maximum angle between point, its projection on triangle
plane and closest triangle vertex. Normally between 4.0
and 10.0 degrees.
Iteration distance Maximum distance from point to triangle plane during
iteration. Normally between 0.5 and 1.5 m.
Reduce iteration angle when If on, reduce eagerness to add new points to ground inside
a triangle when every edge of triangle is shorter than Edge
length. Helps to avoid adding unnecessary point density
into ground model and reduces memory requirement.
Stop triangulation when If on, quit processing a triangle when every edge in
triangle is shorter than Edge length. Helps to avoid
adding unnecessary point density into ground model and
reduces memory requirement.
Setting: Effect:
Select Which point to choose around mouse click:
Closest Point closest to mouse click.
Highest Highest point within search circle.
Lowest Lowest point within search circle.
Within Search radius around mouse click.
From class Source class from which to take a point.
To class Ground class to add point into.
Reprocess Size of the area to reprocess around the added point.
Page 129
16 Classification routines
By height from ground routine classifies points which are within a given height range when
compared with ground point surface model. This routine requires that you have already classified
ground points successfully.
This routine will build a temporary triangulated surface model from ground points and compare
other points agains the elevation of the triangulated model.
You might use this routine to classify points into:
Low vegetation (height 0.0 - 1.0)
Powerline (height 5.0 - 50.0) This would classify all points which are high from the ground.
The results would include all hits on wires and towers in addition to other high objects such as
trees or buildings.
Setting: Effect:
Ground class Point class into which ground points have been classified
before.
From class Source class from which to classify points.
To class Target class to put points into.
Min height Start of height range.
Max height End of height range.
Page 130
16 Classification routines
By minimum elevation
Not Viewer
By minimum elevation routine classifies points by comparing against the lowest point in the
vicinity. This would normally be used with the assumption that the search range will include at
least one hit on the ground.
This routine is very close to By height from ground algorithm but does not require that ground
points have been classified earlier. The drawback is that the height determination is not very
accurate especially in sloped terrain.
Algorithm supports two search methods:
Aerial Compare the elevation of each point (=center) with the lowest elevation within a
given xy distance. The center point is classified if the elevation difference is within a given
range.
Scanline Compares each point with previous and next points only. Requires that points are in
original scan order. This method is very fast but less accurate.
Setting: Effect:
From class Source class from which to classify points.
To class Target class to put points into.
Min height Start of height range.
Max height End of height range.
Method Search method: Scanline or Aerial.
Within Xy search range when using Aerial method. Each point is
compared with every other point less than Within distance away.
Range Search range when using Scanline method. Each point is
compares with Range previous and Range next points.
Page 131
16 Classification routines
By absolute elevation
Not Viewer
By absolute elevation routine classifies points which are within a given elevation range. This can
be used to classify error points high up in the air or clearly below the ground.
By echo
Not Viewer
By echo routine classifies points based on echo information. Each laser point belongs to one of
four echo types:
Only echo only echo from a pulse.
First of many first echo from a pulse which produced at least two echoes.
Intermediate intermediate echo from a pulse which produced at least three echoes.
Last of many last echo from a pulse which produced at least two echoes.
By intensity
Not Viewer
By intensity routine classifies points which have an intensity (strength of return) value within a
given range. The type of surface material hit by the laser beam affects the intensity. Metal, white
paint and green leaves typically give high intensity returns.
This can be used to classify points which are possible hits on railroad rails; the metal surface gives
a high intensity return and the surroundings often give a low intensity return.
Page 132
16 Classification routines
By color
Not Viewer
By color routine classifies points based on the color value stored for each point or a color value
from images. Classification by color can help in solving classification tasks which would be very
difficult relying on xyz positions only.
The routine will classify points in the source class whose color falls into a specified HSV color
range. HSV color model consists of three parameters:
Hue pure color. This can be red, yellow, green, cyan, blue or magenta.
Saturation purity of the color or how much grey is mixed in.
Value brightness of the color.
The classification routine can use color values stored with the laser points or derive color values
from images. The latter alternative can take a considerable amount of time. Furthermore, it often
takes several attempts before you find the best color range to use for the classification task. It is
therefore usually better to derive the color values from images using Tools / Extract color from
images command which stores the color values with the laser points. You can then run
classification by color multiple times and test different parameter settings..
Setting: Effect:
From class Source class from which to classify points.
To class Target class to put points into.
Source from which to derive colors:
Laser points RGB values stored with laser points.
Color source
Ortho images reference images attached with TerraPhoto.
Raw images active raw image list in TerraPhoto.
Footprint Diameter of circular image area from which to sample the color.
Hue Required hue value and tolerance.
Saturation Minimum and maximum value for saturation component.
Value Minimum and maximum value for value component.
" You can effectively classify by grey scale if you set Hue tolerance to +- 180. All hue values will
then fall within the range.
Page 133
16 Classification routines
By centerline
Not Viewer
By centerline routine classifies points based on how close they are to a linear element. You can
use it to classify points which are close or far away from a linear element.
You must select the centerline element(s) before starting the tool. If multiple elements are
selected, each laser point will be classified according to the offset distance to the closest linear
element.
Setting: Effect:
From class Source class from which to classify points.
To class Target class to put points into.
Side Side on which to classify poits: left, either or right side.
Offset Minimum and maximum side offset of points to classify.
By longitudinal distance If on, classifies only points which are within a given
from vertex longitudinal distance range from the closest element
vertex.
Page 134
16 Classification routines
By tunnel section
Not Viewer
By tunnel section routine classifies points based on whether they are inside, outside or close to
the shape of tunnel defined by a three dimensional alignment and a tunnel section template.
This classification routine is primarily used with laser data from terrestrial scanners.
3. Click the Add push button in the Tunnel sections category category of TerraScan user
settings.
4. Identify the section shape element.
5. Enter the origin point where the alignment element goes through the cross section. If you
have placed a line in step 2, you can snap onto the line end point.
This opens the Tunnel section dialog:
Setting: Effect:
From class Source class from which to classify points.
To class Target class to put points into.
Section Tunnel section type defined in user settings.
Classify Type of points to classify:
Inside section points inside the section.
Outside section points outside the section.
On section points close to the section shape.
Tolerance Used only when classifying points using On section
option. Defines how close to the section shape a point has
to be in order to be classified.
Page 136
16 Classification routines
Non-ground
Not Viewer
Non-ground routine classifies points which have another point close by and the other point is at
a steep angle downwards. It basically classifies points which can not be ground points because the
slope to another point is too steep.
This routine will basically compare the each point (=center) with every other point within a given
xy distance. If the vertical angle from the other point to the center point exceeds the given limit,
the center point will be classified.
Setting: Effect:
From class Source class from which to classify points.
To class Target class to put points into.
Within distance Xy search range. Each point is compared with every other
point less than Within distance away.
Vertical angle Angle limit or maximum terrain angle.
" Non-ground classification is not normally used in the processing workflow. It is not included in
the pulldown menus and you can only start it using a keyin command: classify nonground.
Page 137
16 Classification routines
Railroad
Not Viewer
Railroad routine classifies points which match the elevation pattern of a railroad rail.
For a point to match elevation pattern, it:
Must have some points in the vicinity which are 0.05 - 0.35 m lower.
Can not have any points in the vicinity which would be 0.15 - 2.50 m higher.
Can not have any points in the vicinity which would be more than 0.35 m lower.
Railroad classification can use an alignment element in three different ways:
None No alignment element. Find all points which match the elevation pattern and have another
matching point at Rail width Tolerance distance in any direction.
Track centerline Alignment element follows the centerline between two rails. Find all points
which match the elevation pattern and are at (0.5 * Rail width) Tolerance offset from
centerline.
General direction Alignment element defines the general direction of the railroad. Find all points
which match the elevation pattern and have another matching point at Rail Tolerance distance. The
line between the two points must be close to perpendicular with alignment direction.
The centerline element(s) must be selected before starting the classification tool.
Setting: Effect:
From class Source class from which to classify points.
To class Target class to put points into.
Alignment Centerline usage.
Rail width Distance from rail center to rail center.
Page 138
16 Classification routines
Buildings
Not Viewer
Buildings routine classifies building points which form some kind of a planar surface. This
routine requires that you have classified ground points before. It is also advisable to classify low
vegetation so that only points more than two meters above the ground will be considered as
possible building points.
Setting: Effect:
Ground class Class into which ground points have been classified
before.
From class Source class from which to search building points.
To class Target class to put points into.
Minimum size Smallest building plane size as square meters.
Maximum angle Steepest roof angle.
Elevation tolerance Elevation accuracy of laser points.
Maximum gap Maximum empty gap between points belonging to same
roof. Should be smaller than smallest gap between
adjacent buildings.
Page 139
16 Classification routines
Model keypoints
Model keypoints routine classifies laser points which are needed to create a triangulated surface
model of a given accuracy. This routine is normally used to create a thinned data set from points
classified as ground hits.
You control the accuracy with elevation tolerance settings Above model and Below model. These
settings determine the maximum allowed elevation differences from a ground laser point to a
triangulated model. Above model determines how much laser points can be above the model.
Below model determines how much laser points can be below the model.
The application will try to find a relatively small set of points (= keypoints) which would create a
triangulated model of given accuracy. These keypoints will be classified into another class.
All other ground points are within the given elevation differences from a model that the keypoints
would produce when triangulated. Some of the ground points are above the model, some ground
points are below.
This classification is an iterative process similar to ground classification. The process starts by
searching for initial points inside rectangular regions of a given size. The lowest and the highest
source point inside each rectangle is classified as keypoint and those are used to create an initial
triangulated model. During each iteration loop the routine searches for source points which are too
far above or below the current model. If such points are found, the furthest points are classified
and added to the model.
The Use points every setting provides a method for ensuring a minimum point density in the final
model even in flat places. For example, if you want to have at least a point every 10 meters, you
should set the Use points every setting to 10.0.
Setting: Effect:
From class Source class from which to search keypoints.
To class Target class to put keypoints into.
Use points every Rectangle size for searching initial points. The highest and
the lowest point inside each rectangle will be classified.
Above model Maximum allowed elevation difference to the triangulated
model from a source point above the model.
Below model Maximum allowed elevation difference to the triangulated
model from a source point below the model.
Page 140
17 Using macros
17 Using macros
Macros provide a method to automate processing steps. The best level of automation is reached
when using macros together with a project definition.
Macros consist of a number of processing steps which are executed one after the other. Processing
steps can classify points, delete points, transform points, output points, update views or call a
function in another MDL application through evaluation of an expression.
Macros are stored as text files with the default extension mac.
To create a macro:
1. Open Main window by choosing Main window command from TerraScan submenu in
Applications pulldown menu.
2. Choose Macro command from Tools pulldown menu in the Main window.
This opens the Macro dialog:
Setting: Effect:
Fit view Views to fit after loading each file.
Update all views after If on, updates all views after loading a file.
loading
Save As Format of the output file into which all of the points will
be written. Select Do not save all points option if you
have included a more selective output action as one step in
the macro.
Directory If on, you can specify the output directory into which each
file will be saved.
File name If on, you can specify the output file name under which
each input file will be saved.
Extension If on, you can specify the output file extension.
Page 142
17 Using macros
Setting: Effect:
Class Point class to output.
Coordinate transformation to apply when computing output
Transform
coordinates for a coordinate.
Inside fence only If on, output points inside fence only.
Name of output file. If it does not include a directory, project data
directory is used. If file name includes string #block, that is replaced
with six digit active block number.
To file
When running a macro on selected files, you may include #name as
part of the file name. This will be replaced by the file name component
of the active file.
Format Format of the output file.
Delimeter Delimiter character when outputting to a text file format.
Set this on, if you want to output all blocks to a single file.
Append if file exists Set this off, if every block should generate an individual file and you
have used #block as part of the file name specification.
Page 143
17 Using macros
Setting: Effect:
Number of flightline to output. Value of -1 output all flightlines and
Flightline
generates one output file for each flightline.
Class Point class to output.
Coordinate transformation to apply when computing output
Transform
coordinates for a coordinate.
Inside fence only If on, output points inside fence only.
Name of output file. If flightline is -1, file name should include string
To file
#line which will be replaced by the number of each flightline.
Format Format of the output file.
Delimeter Delimiter character when outputting to a text file format.
Set this on, if you want to output all blocks to a single file.
Append if file exists
Set this off, if every block should generate an individual file.
Programming Interface
Page 145
18 DLL Interface
18 DLL Interface
TerraScan installation includes an example dynamic link library together with source code
illustrating how tools can be added onto TerraScan.
These addon tools may perform such tasks as classifying points, writing points to output files or
displaying statistical information. The names of the tools will appear in the Addon menu of Tools
pulldown menu in the TerraScans Main window. The tools are responsible for providing modal
or modeless dialogs for the input of required user settings.
The example link library \terra\ma\tscanadd.dll has been built using Visual C++ 6.0 from source
codes included in \terra\addon directory. It provides one tool: the display of an intensity
histogram.
You may modify the source code and build a dynamic link library to replace the one supplied
during installation. The addon library must provide four predefined functions which TerraScan
will call at different stages of application execution. These functions are:
AddonFillCommands() is called at startup so that the DLL will inform TerraScan about
available tools.
AddonLinkVariables() is called after startup to provide the DLL with information about some
of TerraScans internal tables and variables.
AddonRunCommand() is called whenever user starts an addon command.
AddonEnd() function is called before the application is unloaded so that the DLL may release
any resources it has allocated.
See \terra\addon directory for example source code files.
The example source code uses C syntax and accesses WIN32 API to create the user interface
items.
Page 146
19 MDL Public Functions
Calling Method
The functions can be called with mdlCExpression_ getValue(). The code example below
illustrates the method:
void Example( void)
{
int Ret ;
/*-------------------------------------------------------------------
Call a function in TerraScan.
Set *Ret to be the return value.
Return 1 if successful.
Return 0 if could not load TSCAN.
Return -1 if failed.
*/
if (!LoadApp( TSCAN))
return (0) ;
Ok = mdlCExpression_getValue( &Val, &Res, Expr, VISIBILITY_CALCULATOR);
if (Ok != SUCCESS)
return (-1) ;
if (Ret)
*Ret = (int) Val.val.valLong ;
return (1) ;
}
/*-------------------------------------------------------------------
Load MDL application with Name (such as TSCAN).
Return 1 if succssful.
Return 0 if application not found.
*/
return (0) ;
}
Page 148
19 MDL Public Functions
Function Prototypes
/*-------------------------------------------------------------------
Classify points from one class to another.
/*-------------------------------------------------------------------
Classify local minimum points which are more than Dz lower than
any other source point within XyDst distance.
int FnScanClassifyLow( int FromClass, int ToClass, int GrpCnt, double Dz,
double XyDst, int Fence) ;
/*-------------------------------------------------------------------
Classify points up in the air. Compare each point against all
points within a search rectangle with radius (=half of rectangle
edge length) XyDst. If there are at least ReqCnt points and
point in question is higher than:
int FnScanClassifyAir( char *ClsLst, int ToClass, double XyDst, int ReqCnt,
double Lim, int Fence) ;
Page 149
19 MDL Public Functions
/*-------------------------------------------------------------------
Classify isolated points which have fewer than LimCnt other
points within 3D search radius Dst.
int FnScanClassifyIsolated( char *ClsLst, int ToClass, int Lim, double Dst, int Fence);
/*-------------------------------------------------------------------
Classify ground points by iteratively molding a triangulated
ground model upwards.
int FnScanClassifyGround( int FromClass, int ToClass, int InitLow, double BldSz,
double MaxAng, double IterAng, double IterDst, int Reduce,
double RedLen, int Stop, double StopLen, int Fence) ;
Page 150
19 MDL Public Functions
/*-------------------------------------------------------------------
Classify points below surface. Compare each point against
a plane equation fitted to closest neighbours. Classify point
if it is clearly below the plane.
Routine computes the distance from each point to the plane and
computes the standard deviation of these distances. Point is
classified if it is more than Tol below the plane and more than
Lim * StandardDeviation below the plane.
int FnScanClassifyBelow( int FromClass, int ToClass, double Lim, double TolZ, int Fence);
/*-------------------------------------------------------------------
Classify points points by height from ground.
int FnScanClassifyHgtGrd( int GrdClass, double MaxLen, int FromClass, int ToClass,
double MinH, double MaxH, int Fence) ;
/*-------------------------------------------------------------------
Classify points within given elevation range. This classifies
points which satisfy MinZ <= Z < MaxZ.
int FnScanClassifyAbsElev( int FromClass, int ToClass, double MinZ, double MaxZ,
int Fence) ;
Page 151
19 MDL Public Functions
/*-------------------------------------------------------------------
Classify points within given intensity range. This classifies
points which satisfy MinV <= Intensity < MaxV.
int FnScanClassifyIntensity( int FromClass, int ToClass, double MinV, double MaxV,
int Fence) ;
/*-------------------------------------------------------------------
Classify points within given color range which is given using
HSV color model.
int FnScanClassifyColor( int FromClass, int ToClass, int Source, double Foot, int Hue,
int Tol, int SatMin, int SatMax, int ValMin, int ValMax,
int Fence) ;
/*-------------------------------------------------------------------
Classify model keypoints which produce a triangulated surface
model of given accuracy.
/*-------------------------------------------------------------------
Classify points based on selected centerline element. Alignment
element must be selected with selection tool before executing
this function.
int FnScanClassifyCtrline( int FromClass, int ToClass, int Side, double OffMin,
double OffMax, int UseDst, double DstMin, double DstMax) ;
/*-------------------------------------------------------------------
Classify points based on echo information.
int FnScanClassifyEcho( int FromClass, int ToClass, int Echo, int Fence) ;
/*-------------------------------------------------------------------
Classify points based on scan direction or edge flag.
int FnScanClassifyDirection( int FromClass, int ToClass, int Direction, int Fence) ;
Page 153
19 MDL Public Functions
/*-------------------------------------------------------------------
Classify every Mark=1 point from class FromClass to class
ToClass. Redraw the points during the process.
/*-------------------------------------------------------------------
Classify nonground points which have another point within
Dist distance and with more than Ang vertical angle downwards.
int FnScanClassifyNonground( int FromClass, int ToClass, double Dist, double Ang,
int Dual, int Skip)
/*-------------------------------------------------------------------
Delete points in a given class.
/*-------------------------------------------------------------------
Delete points from a given flightline or measurement.
/*-------------------------------------------------------------------
Transform coordinates of points using a transformation defined
in TerraScan settings.
/*-------------------------------------------------------------------
Redraw contents of all views which may be displaying points.
Return 1 always.
*/
/*-------------------------------------------------------------------
Sort points to By order:
0 increasing easting
1 decreasing northing
2 increasing easting
3 decreasing northing
4 increasing time stamp
/*-------------------------------------------------------------------
Output points to a file.
int FnScanOutput( char *File, char *ClsLst, int Fmt, int Delim, char *Trans,
int Append, int Fence) ;
Page 155
19 MDL Public Functions
/*-------------------------------------------------------------------
Output points to a file based on flightline number. This
will generate multiple output files if Line == -1 in which
case one output file will be generated for every flightline.
int FnScanOutputLine( char *File, int Line, int Class, int Fmt, int Delim,
char *Trans, int Append)
/*-------------------------------------------------------------------
Return information about the active project. Set:
/*-------------------------------------------------------------------
Return information about project block index Ind. Set:
/*-------------------------------------------------------------------
Create lattice model from laser points in class Class and
write that to file File.
Return 1 on success.
Return 0 if no source points.
Return -2 if failed to write to file.
*/
int FnScanExportLattice( char *File, int Class, int Elev, double Step, double Len,
int Fmt, int UnitZ, int CrdBlk, char *Out)
/*-------------------------------------------------------------------
Read points from file File into RAM.
int FnScanRead( char *File, int First, int Last, int Line, int Inc,
char *Trans, int Fence, int Every)
Page 157
19 MDL Public Functions
/*-------------------------------------------------------------------
Smoothen surface by adjusting point elevations.
moving points points by adjusting elevations by a maximum of
int FnScanSmoothen( char *ModLst, int UpCm, int DnCm, char *FixLst, int Fence) ;
/*-------------------------------------------------------------------
Thin data set by removing points close to another point.
Point can be removed if it is within Dxy horizontal distance
and Dz elevation difference from another point.
int FnScanThinPoints( int Class, int Keep, double Dxy, double Dz, int Fence) ;
/*-------------------------------------------------------------------
Cut points from overlapping flightlines by either flightline
quality or by offset from trajectory.
int FnScanCutOverlap( char *ClsLst, int Action, int Val, int Quality, double Gap,
int Offset, int Keep) ;
Page 158
19 MDL Public Functions
/*-------------------------------------------------------------------
Adjust laser points using an angular change to the vector
from scanner position to the point.
int FnScanAdjustAngles( int Line, int Fix, int Input, double Head, double Roll,
double Pitch, double Div) ;
/*-------------------------------------------------------------------
Return address to point table and number of points.
Note that this address may change any time when points have
been added or deleted from the table.
/*-------------------------------------------------------------------
Mark every point to have mark value MarkVal.
*/
/*-------------------------------------------------------------------
Mark every point inside fence to have Mark=1 and every point
outside fence to have Mark=0.
Set *Fst and *Lst as the indexes of first and last point inside
fence.
Return 1 on success.
Return 0 if failed.
*/
/*-------------------------------------------------------------------
Fill option button with class names.
Return 0 always.
*/
/*-------------------------------------------------------------------
Fill string list with:
- class numbers and names if Nbr is true
- class names only if Nbr is zero
/*-------------------------------------------------------------------
Ask user to select point classes to use. Set character array
to indicate which classes were selected.
/*-------------------------------------------------------------------
Save laser points to a temporary file Path in binary format.
Return 1 on success.
Return 0 if failed to write.
*/
/*-------------------------------------------------------------------
Reload laser points from a temporary file Path.
Return 1 on success.
Return 0 if failed to read file.
Return -1 if we already have points in memory.
Return -2 if out of memory.
*/
/*-------------------------------------------------------------------
Outside application plans to call FnScanFreeTable().
Ask user if he wants to save modified points.
/*-------------------------------------------------------------------
Free memory allocated for laser points.
Return 1 always.
*/
File organization
TerraScan binary file consists of a file header of 56 bytes and a number of point records. The size
of the point record is 16 bytes for file version 20010712 and 20 bytes for file version 20020715.
Each point record may be followed by an optional four byte unsigned integer time stamp and an
optional four byte RGB color value.
For example, a file containing four laser points and their time stamps using format 20020715
would consist of:
48 byte header (ScanHdr)
20 byte record for first point (ScanPnt)
4 byte time stamp for first point
20 byte record for second point (ScanPnt)
4 byte time stamp for second point
20 byte record for first three (ScanPnt)
4 byte time stamp for three point
Structure definitions
The structure of the file header is:
typedef struct {
int HdrSize ; // sizeof(ScanHdr)
int HdrVersion ; // Version 20020715, 20010712, 20010129 or 970404
int RecogVal ; // Always 970401
char RecogStr[4]; // CXYZ
long PntCnt ; // Number of points stored
int Units ; // Units per meter = subpermast * uorpersub
double OrgX ; // Coordinate system origin
double OrgY ;
double OrgZ ;
int Time ; // 32 bit integer time stamps appended to points
int Color ; // Color values appended to points
} ScanHdr ;
Page 161
20 Binary file formats
Coordinate system
Laser point coordinates are stored as integer values which are relative to an origin point stored in
the header. To compute user coordinate values X, Y and Z (normally meters), use:
X = (Pnt.X - Hdr.OrgX) / (double) Hdr.Units ;
Y = (Pnt.Y - Hdr.OrgY) / (double) Hdr.Units ;
Z = (Pnt.Z - Hdr.OrgZ) / (double) Hdr.Units ;
Time stamps
Time stamps are assumed to be GPS week seconds. The storage format is a 32 bit unsigned integer
where each integer step is 0.0002 seconds.
Echo information
TerraScan uses two bits for storing echo information. The possible values are:
0 Only echo
1 First of many echo
2 Intermediate echo
3 Last of many echo
Page 162
20 Binary file formats
22 Installation Directories
TerraScan shares the same directory structure with all Terra Applications. It is recommended that
you install all Terra Applications in the same directory.
The list below shows a typical directory structure when TerraScan has been installed in path
C:\TERRA.
c:\terra directory where TerraScan was installed
addon example addon source files
config for configuration files
tscan.cfg defines environment variables
docs for documentation
tscan.pdf documentation in Acrobat Reader format
license for user license files
tscan.lic user license
ma for application files
tscan.ma application
tscan.dll library
tscanadd.dll addon library
tscan for point class lists and settings
tscan.ptc example list of point classes
Page 166
23 Configuration Variables
23 Configuration Variables
MicroStation is able to locate TerraScan with the help of configuration variables. When you install
TerraScan, the installation program will create a configuration file TERRA.CFG which defines
the required environment variables. This file is placed in MicroStation's CONFIG\APPL
subdirectory.
For example, C:\USTATION\CONFIG\APPL\TERRA.CFG may contain:
#-------------------------------------------------------
#
# TERRA.CFG - Configuration for Terra Applications
#
#-------------------------------------------------------
TERRADIR=c:/terra/
TERRACFG=$(TERRADIR)config/
TERRADOCS=$(TERRADIR)docs/
This configuration file will include all the configuration files in C:\TERRA\CONFIG directory.
TerraScan's configuration file TSCAN.CFG contains:
#--------------------------------------------------------------
#
# TSCAN.CFG - TerraScan Configuration File
#
#--------------------------------------------------------------
TSCAN_DATA=$(TERRADIR)data/
TSCAN_LICENSE=$(TERRADIR)license/
TSCAN_MACRODIR=$(TERRADIR)macro/
TSCAN_PREF=$(TERRADIR)tscan/
TSCAN_SET=$(TERRADIR)tscan/
TSCAN_ALIGNREP = $(TSCAN_SET)alrepfmt.inf
TSCAN_OUTFMT = $(TSCAN_SET)outfmt.inf
TSCAN_TRANSFORM = $(TSCAN_SET)trans.inf
TSCAN_TARGETS = $(TSCAN_SET)targets.inf
TSCAN_CODES = $(TSCAN_SET)codes.inf
Page 167
23 Configuration Variables
24 Network licenses
Terra applications support license pooling across a network. The benefit of license pooling is that
the customer does not need to purchase a license for each workstation but only for the number of
systems on which the application may be used concurrently.
License pooling always requires a separate agreement between Terrasolid and the customer.
Normal, single workstation licenses do not work in a license pool setup.
Licenses are placed on a network server. Whenever an application is launched, the system
automatically searches the license pool for a free license. If one is found, the application will run
and that license will be locked until the application is unloaded. The application will refuse to run
if:
The license pool is not found.
All licenses are already in use.
The system detects that file locking is not working.
To Set
Elect license pooling for TerraScan TSCAN_POOL=1
Define license pool directory TERRALICDIR=<license_directory>
Elect license logging TERRALOGDIR=<log_directory>
Identify workstations or users in log file TERRAMACHINEID=<user_name>
Locking
The license pooling system uses the server's file locking feature to indicate that a license is in use.
Whenever a license is activated, that application instance locks that file for read access. The
operating system clears the lock when the application is unloaded.
Logging
When logging is elected, the system will generate log files in a dedicated directory to indicate
which licenses are being used. Whenever an application license is activated, the system will create
a corresponding log file containing only the name of the application user as defined by
TERRAMACHINEID environment variable. The name of the log file is constructed from the
license file name by changing letter L in the extension to A. For example, license TSCAN.L01
Page 169
24 Network licenses
would generate log file TSCAN.A01. When the license is released, the system will delete the log
file.
Directory listing from TERRALOGDIR provides a quick way to see what licenses are being used
at that moment. The date and time stamp of each log file indicates when that license was activated.
When logging is elected, the system will also generate a journal file called FAIL.LOG in the log
directory. This file will contain an entry for each time a license has been denied (all licenses in
use).
Example case
An organization has four TerraScan licenses which are shared by a workgroup. Two directories
are created on the server to handle the license pool:
h:\terrapool\license
h:\terrapool\log
The first directory will hold the license files. The second directory will be used to keep track of
license usage.
The license files are placed on a server directory as:
h:\terrapool\license\tscan.l01
h:\terrapool\license\tscan.l02
h:\terrapool\license\tscan.l03
h:\terrapool\license\tscan.l04
A configuration file is created which takes care of defining appropriate environment variables.
This POOL.CFG file is copied to each user's c:\terra\config directory so that it the environment
variables will always be set.
#------------------------------------------------------------
#
# POOL.CFG - Pool licensing for Terra Applications
#
#------------------------------------------------------------
TSCAN_POOL=1
TERRALICDIR=h:/terrapool/license/
TERRALOGDIR=h:/terrapool/log/