MDL Public Functions
TerraScan has a number of public functions which can be called by other MDL applications or used in macros. When creating a macro, you can normally define the parameters by selecting values in a dialog and you do not need to refer to the parameter specifications in this Chapter.
Public functions make it possible for another MDL application to interact with TerraScan. These same routines are used internally for interaction between Terra applications.
Laser point memory structure
When laser points are loaded into RAM, TerraScan keeps the different attributes of laser points in separate tables. For example, all the point line numbers of laser points will be kept in one table which is stored in one continuous memory area.
The possible attributes which may be present are:
ATTRIBUTE |
ALWAYS |
C DATA TYPE |
SIZE |
---|---|---|---|
Point coordinates |
Yes |
Point3d |
12 bytes |
Time stamps |
- |
double |
8 bytes |
Group identifiers |
- |
unsigned int |
4 bytes |
Normal vectors |
- |
unsigned int |
4 bytes |
Distances |
- |
int |
4 bytes |
RGB colors |
- |
RgbClr |
3 bytes |
Intensity values |
- |
unsigned short |
2 bytes |
Line numbers |
- |
unsigned short |
2 bytes |
Echo lengths |
- |
short |
2 bytes |
Parameter values |
- |
unsigned short |
2 bytes |
Point classes |
Yes |
unsigned char |
1 byte |
Mark values -- run time only |
Yes |
unsigned char |
1 byte |
Flag values -- run time only |
Yes |
unsigned char |
1 byte |
Scanner angles |
- |
char |
1 byte |
Echo bits |
- |
unsigned char |
1 byte |
Scanner numbers |
- |
unsigned char |
1 byte |
Echo normality values |
- |
unsigned char |
1 byte |
Calling application must not assume that all of the attributes are present in the memory. Only attributes marked Always are always allocated when reading points into memory.
All attribute tables hold the same number of items.
Another application can retrieve pointer to laser point attributes by calling FnScanGetPnt(), FnScanGetCls() or other FnScanGetXxxx() routines. You should call these every time user starts a new operation in your application as the pointer may become invalid if user has modified laser points using TerraScan tools (deleted points, loaded new points in or closed TerraScan window).