SML FUNCTION LIST

SML module date: Jun 27 2006

  • Math
  • Date
  • Set
  • String
  • Database
  • Raster
  • Vector
  • Object
  • Matrix
  • Georeference
  • Color_palette
  • Style
  • System
  • Color_conversion
  • Popup_dialog
  • Cad
  • Tin
  • File
  • Ini_file
  • Resource_file
  • Movie
  • Geodata_display_view
  • Geodata_display_layout
  • Geodata_display_group
  • Geodata_display
  • Frame
  • Gps
  • Vector_network
  • Database_editor
  • Import_export
  • Object_conversion
  • Raster_morphological
  • Raster_focal
  • Raster_global
  • Vector_toolkit
  • Region
  • Raster_classification
  • Console
  • Drawing
  • Widget
  • Status
  • Raster_watershed
  • Surface_fitting
  • Cartoscript

    Math functions (66)

    abs
    Absolute value

    abs(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric a,b;
    a = -6;
    b = abs(2 * a); # b = 12
    print(b);
    


    acos
    Trigonometric arccosine

    acos(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric b;
    b = acos(0.5);
    print(b);
    # b = 1.0471975511965979
    


    acosd
    Trigonometric arccosine (degree version)

    acosd(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    acosh
    Hyperbolic arccosine

    acosh(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric b;
    b = acosh(0.5);
    print(b);
    # b = NULL
    


    acoth
    Hyperbolic arccotangent

    acoth(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric b;
    b = acoth(0);
    print(b);
    # b = NULL
    


    acsch
    Hyperbolic arccosecant

    acsch(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric b;
    b = acsch(0);
    print(b);
    # b = Infinity
    


    asech
    Hyperbolic arcsecant

    asech(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric b;
    b = asech(1);
    print(b); # b = 0
    


    asin
    Trigonometric arcsine

    asin(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric a, b;
    a = sqrt(3) / 2;
    b = deg * asin(a);
    print(b);
    # b = 59.99999999999999
    


    asind
    Trigonometric arcsine (degree version)

    asind(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    asinh
    Hyperbolic arcsine

    asinh(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric a, b;
    a = (exp(0) - exp(-0)) / 2;
    b = asinh(a);
    print(b); # b = 0
    


    atan
    Trigonometric arctangent

    atan(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric a, b;
    a = 1;
    b = deg * atan(a);
    print(b); # b = 45
    


    atan2
    Trigonometric arctangent

    atan2(y, x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric a, b, c;
    a = sqrt(3) / 2;
    b = -.5;
    c = deg * atan2(a, b);
    print(c); # c = 120
    


    atand
    Trigonometric arctangent (degree version)

    atand(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    atanh
    Hyperbolic arctangent

    atanh(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric a, b, c;
    a = exp(0) - exp(-0);
    b = exp(0) + exp(-0);
    c = atanh(a/b);
    print(c); # c = 0
    


    Bound
    Force a value into given range.

    Bound(val, min, max)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(Bound(15, 0, 10));
    print(Bound(-5, 0, 10));
    print(Bound(5, 0, 10));
    


    ceil
    Round decimal up to integer

    ceil(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric a, b, c, d;
    a = ceil(7.499); # a = 8
    b = ceil(7.001); # b = 8
    c = ceil(-7.01); # c = -7
    d = ceil(-7.99); # d = -7
    print(a, b, c, d);
    


    ConvertPolartoXY
    Converts polar coordinates to rectangular (radians).

    ConvertPolartoXY(Theta, R, X, Y)

    場所:

    パラメータ:

    戻り値

    作成日時: 16-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertPolartoXYd
    Converts polar coordinates to rectangular (degrees).

    ConvertPolartoXYd(Theta, R, X, Y)

    場所:

    パラメータ:

    戻り値

    作成日時: 16-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertSphericaltoXYZ
    Converts polar coordinates to rectangular (radians).

    ConvertSphericaltoXYZ(Rho, Theta, Phi, X, Y, Z)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertSphericaltoXYZd
    Converts polar coordinates to rectangular (degrees).

    ConvertSphericaltoXYZd(Rho, Theta, Phi, X, Y, Z)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertXYtoPolar
    Converts rectangular coordinates to polar (radians).

    ConvertXYtoPolar(X, Y, Theta, R)

    場所:

    パラメータ:

    戻り値

    作成日時: 16-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertXYtoPolard
    Converts rectangular coordinates to polar (degrees).

    ConvertXYtoPolard(X, Y, Theta, R)

    場所:

    パラメータ:

    戻り値

    作成日時: 16-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertXYZtoSpherical
    Converts rectangular coordinates to spherical (radians).

    ConvertXYZtoSpherical(X, Y, Z, Rho, Theta, Phi)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertXYZtoSphericald
    Converts rectangular coordinates to spherical (degrees).

    ConvertXYZtoSphericald(X, Y, Z, Rho, Theta, Phi)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    CopyArrayElements
    Copies a given range of elements form one array into another.

    CopyArrayElements(dest, source, dest_start, dest_end, source_start, source_end)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 22-Jul-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    array numeric a1[10];
    array numeric a2[10];
    numeric x;
    for x=1 to 10{
           a1[x]=20+x;
           a2[x]=x;
           }
    CopyArrayElements(a2,a1,3,6,5,8);
    for x=1 to 10{
           print(a2[x]);
           }
    


    cos
    Trigonometric cosine

    cos(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(cos(60 / deg)); # prints .500000000000001
    


    cosd
    Trigonometric cosine (degree version)

    cosd(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/CAD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    cosh
    Hyperbolic cosine

    cosh(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(cosh(0)); # prints 1
    


    csc
    Trigonometric cosecant

    csc(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(csc(30 / deg)); # prints 2
    


    cscd
    Trigonometric cosecant (degree version)

    cscd(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ctn
    Trigonometric cotangent

    ctn(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(ctn(0 / deg)); # prints Infinity
    


    ctnd
    Trigonometric cotangent (degree version)

    ctnd(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    Displacement3D
    Calculate the distance, azimuth, and elevation from the first point to the second (radians).

    Displacement3D(X1, Y1, Z1, X2, Y2, Z2, Distance, Azimuth, Elevation)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class POINT3D pt1, pt2;
    pt1.x = 500;
    pt1.y = 500;
    pt1.z = 0;
    pt2.x = 1000;
    pt2.y = 1000;
    pt2.z = sqrt(500000); # sqrt(500^2 + 500^2)
    numeric distance, azimuth, elevation;
    # in radians
    Displacement3D(pt1.x, pt1.y, pt1.z, pt2.x, pt2.y, pt2.z, distance, azimuth, elevation);
    print(distance, azimuth, elevation);
    # in degrees
    Displacement3Dd(pt1.x, pt1.y, pt1.z, pt2.x, pt2.y, pt2.z, distance, azimuth, elevation);
    print(distance, azimuth, elevation);
    


    Displacement3Dd
    Calculate the distance, azimuth, and elevation from the first point to the second (degrees).

    Displacement3Dd(X1, Y1, Z1, X2, Y2, Z2, Distance, Azimuth, Elevation)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class POINT3D pt1, pt2;
    pt1.x = 500;
    pt1.y = 500;
    pt1.z = 0;
    pt2.x = 1000;
    pt2.y = 1000;
    pt2.z = sqrt(500000); # sqrt(500^2 + 500^2)
    numeric distance, azimuth, elevation;
    # in radians
    Displacement3D(pt1.x, pt1.y, pt1.z, pt2.x, pt2.y, pt2.z, distance, azimuth, elevation);
    print(distance, azimuth, elevation);
    # in degrees
    Displacement3Dd(pt1.x, pt1.y, pt1.z, pt2.x, pt2.y, pt2.z, distance, azimuth, elevation);
    print(distance, azimuth, elevation);
    


    exp
    Exponential (e to the power of x)

    exp(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(exp(-1/0)); # prints 0
    


    exp10
    Exponential (10 to the power of x)

    exp10(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(exp10(3)); # prints 1000
    


    floor
    Round decimal down to integer

    floor(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(floor(7.5)); # prints 7
    print(floor(-7.5)); # prints -8
    


    GetUnitConvAngle
    Get scale factor for angle unit conversions.

    GetUnitConvAngle(from$, to$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetUnitConvArea
    Get scale factor for area unit conversions.

    GetUnitConvArea(from$, to$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Dialog/areacalc.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GetUnitConvDist
    Get scale factor for distance unit conversions.

    GetUnitConvDist(from$, to$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/MacroScript/ZOOMTO.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GetUnitConvVolume
    Get scale factor for volume unit.

    GetUnitConvVolume(from$, to$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    hypot
    Find hypotenuse of right triangle

    hypot(dx, dy)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric dx, dy;
    dx = 3;
    dy = 4;
    print(hypot(dx, dy)); # 5
    


    int
    Integer portion of argument (truncate)

    int(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric a;
    a = int(7.7); # a = 7
    a = int(-7.7); # a = -8
    


    IsNull
    Does the argument have the value NULL?

    IsNull(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(IsNull(null));
    


    LinearRegression
    Calculate the linear regression coeficients for a group of points.

    LinearRegression(x, y, num, slope, intercept, omit)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    log
    Natural logarithm of argument

    log(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print("Enter a number.");
    numeric x=PopupNum("Enter a number");
    numeric a=log(x);
    print("log(x)=", a);
    


    log10
    Base 10 logarithm of argument

    log10(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print("Enter a number.");
    numeric x=PopupNum("Enter a number");
    numeric a=log10(x);
    print("log10(x)=", a);
    


    PolynomialCurveFit
    Computes an equation of given power that best fits the given points.

    PolynomialCurveFit(x, y, num, power, carray, R)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 22-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    array numeric xpoints[4];
    array numeric ypoints[4];
    array numeric carray[3];
    numeric r;
    xpoints[1]=-1;
    xpoints[2]=0;
    xpoints[3]=1;
    xpoints[4]=2;
    ypoints[1]=4;
    ypoints[2]=10;
    ypoints[3]=20;
    ypoints[4]=34;
    string string$=PolynomialCurveFit(xpoints,ypoints,4,2,carray,r);
    printf("%s\n",string$);
    printf("%f %f %f\n",carray[1],carray[2],carray[3]);
    printf("r = %f\n",r);
    


    pow
    Return x to the power of y

    pow(x, y)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(pow(2, 3)); # 8
    


    rand
    Returns random value between zero (0) and x

    rand(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(rand(1));
    


    RandomGaussian
    Computes a pair of random numbers based on a normal distibution.

    RandomGaussian(mu, sigma, x1, x2)

    場所:

    パラメータ:

    戻り値

    作成日時: 21-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ResizeArrayClear
    Resize a one dimensional array ( a[col] ), or two dimensional array ( a[row, col] )

    ResizeArrayClear(array, index1Size, index2Size)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 08-Oct-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric a[3];
    array numeric a2[3, 4];
    ResizeArrayClear(a, 5); # increase size of one dimensional array
    ResizeArrayClear(a, 2); # decrease size of one dimensional array
    ResizeArrayClear(a2, 5, 6); # increase size of two dimensional array
    ResizeArrayClear(a2, 2, 3); # decrease size of two dimensional array
    


    ResizeArrayPreserve
    Resize a one dimensional array ( a[col] ), or two dimensional array ( a[row, col] )

    ResizeArrayPreserve(array, index1Size, index2Size)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 08-Oct-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric a[3];
    array numeric a2[3, 4];
    ResizeArrayPreserve(a, 5); # increase size of one dimensional array
    ResizeArrayPreserve(a, 2); # decrease size of one dimensional array
    ResizeArrayPreserve(a2, 5, 6); # increase size of two dimensional array
    ResizeArrayPreserve(a2, 2, 3); # decrease size of two dimensional array
    


    round
    Round x to nearest integer

    round(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(round(10.5)); # 11
    print(round(-10.5)); #-10
    


    sec
    Trigonometric secant

    sec(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(sec(60/deg));
    


    secd
    Trigonometric secant (degree version)

    secd(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    Sign
    Return -, 0 or 1 depending on sign of argument

    Sign(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 20-Jun-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(Sign(-10));      # -1
    print(Sign(0));       # 0
    print(Sign(10));       # 1
    


    sin
    Trigonometric sine

    sin(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(sin(30/deg)); #.5
    


    sind
    Trigonometric sine (degree version)

    sind(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/CAD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    sinh
    Hyperbolic sine

    sinh(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(sinh(0)); # 0
    


    Solve
    Gaussian elimination solution of system of linear equations

    Solve(CoefArray, ConstArray, Result)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    array numeric a[2, 2];
    array numeric b[2];
    array numeric x[2];
    a[1,1]=1; a[1,2]=0; a[2,1]=1; a[2,2]=1;
    b[1]=1; b[2]=1;
    Solve(a, b, x);
    print(x[1], x[2]);
    


    sqr
    Return the square of the argument

    sqr(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(sqr(-3)); # 9
    


    sqrt
    Returns the (positive) square root of the argument

    sqrt(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(sqrt(9)); # 3
    print(sqrt(-9)); # 0
    


    tan
    Trigonometric tangent

    tan(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(tan(90/deg)); # -2147483648 (roundoff error)
    


    tand
    Trigonometric tangent (degree version)

    tand(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    tanh
    Hyperbolic tangent

    tanh(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(tanh(0)); # 0
    


    Date functions (6)

    Date
    Returns the current date in YYYYMMDD format

    Date()

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric d;
    d=Date();
    print(d);
    


    DateDiff
    Returns number of days between two dates

    DateDiff(yyyymmdd1, yyyymmdd2)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric d=DateDiff(19960101, 19970101);
    print(d); # 365
    


    DateToJulian
    Converts YYYYMMDD format to Julian date

    DateToJulian(yyyymmdd)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric d=DateToJulian(19960101);
    print(d);
    print(JulianToDate(d));
    


    DateToString
    Convert a number date to a string.

    DateToString(yyyymmdd, format$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(DateToString(20031208)); # 12/08/03
    


    JulianDate
    Returns the current Julian date

    JulianDate()

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric d=JulianDate();
    print(d);
    


    JulianToDate
    Converts Julian date to YYYYMMDD format

    JulianToDate(julian)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric d=DateToJulian(19960101);
    print(d);
    print(JulianToDate(d));
    


    Set functions (11)

    SetMajority
    Most frequently occurring value among arguments

    SetMajority(x1, x2, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetMajority(1, 3, 3, 4, 4, 5)); # prints 4
    


    SetMax
    Returns the largest of argument values

    SetMax(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetMax(1, 3, 3, 4, 4, 5)); # prints 5
    


    SetMean
    Returns average of argument values

    SetMean(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetMean(1, 2, 2, 5, 5)); # prints 3 (15/5)
    


    SetMedian
    Returns the median of argument values

    SetMedian(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetMedian(1, 3, 7)); # prints 3
    


    SetMin
    Returns minimum value among arguments

    SetMin(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetMin(1, 3, 5)); # prints 1
    


    SetMinority
    Least frequently occurring value among arguments

    SetMinority(x1, x2, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetMinority(1, 3, 3, 4, 4, 5)); # prints 1
    


    SetNum
    Returns the total number of elements

    SetNum(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetNum(2, 1, 3, 4, 99)); # returns 5
    


    SetSD
    Returns standard deviation of argument values

    SetSD(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetSD(2, 1, 3, 4, 99));
    


    SetSum
    Returns sum of arguments

    SetSum(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetSum(2, 1, 3, 4, 99)); # prints 109
    


    SetVariance
    Returns statistical variance of argument values

    SetVariance(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetVariance(2, 1, 3, 4, 99));
    


    SetVariety
    Returns number of different values among arguments

    SetVariety(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetVariety(2, 1, 3, 4, 99));
    


    String functions (16)

    DegToStr
    Convert degrees to a string, in degrees, minutes, seconds format

    DegToStr(num)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(DegToStr(94.345));
    


    FileNameGetExt
    Returns file extension portion of path qualified filename

    FileNameGetExt(filename$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string f$ = GetInputFileName("", "Select a file","");
    print(FileNameGetExt(f$));
    


    FileNameGetName
    Returns filename portion of path qualified filename

    FileNameGetName(filename$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string f$ = GetInputFileName("", "Select a file","");
    print(FileNameGetName(f$));
    


    FileNameGetPath
    Returns path portion of path qualified filename

    FileNameGetPath(filename$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string f$ = GetInputFileName("", "Select a file","");
    print(FileNameGetPath(f$));
    


    GetToken
    Get the nth token from a string

    GetToken(string$, delimiters$, tokenNumber, compress)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 25-Sep-1998
    修正日時: 05-Jun-2001
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string token$;
    string str$ = "a  b c,d";
    string delimit$ = " ,";
    numeric n = NumberTokens(str$, delimit$);
    numeric i;
    for i = 1 to n {
           token$ = GetToken(str$, delimit$, i);
           print(i, token$);
           }
    


    left$
    Return leftmost n characters of string

    left$(str$, length)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print("Enter a sentence.");
           string a$=PopupString("Enter a sentence.");
    print("Enter # of chars to get.");
           numeric n=PopupNum("Enter # of chars to get.");
    print(left$(a$, n));
    


    mid$
    Return n characters of string$ starting at m

    mid$(str$, start, length)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # mid$
    clear();
    print("Enter a sentence.");
           string a$=PopupString("Enter a sentence.");
    print("Enter start position.");
           numeric m=PopupNum("Enter start position.");
    print("Enter # of chars to get.");
           numeric n=PopupNum("Enter # of chars to get.");
    print(mid$ (a$, m, n));
    


    NumberTokens
    Returns number of tokens in a string - used to loop through them

    NumberTokens(string$, delimiters$)

    場所:

    パラメータ:

    戻り値

    作成日時: 25-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string token$;
    string str$ = "a  b c,d";
    string delimit$ = " ,";
    numeric n = NumberTokens(str$, delimit$);
    numeric i;
    for i = 1 to n {
           token$ = GetToken(str$, delimit$, i);
           print(i, token$);
           }
    


    NumToStr
    Convert a number to a string

    NumToStr(num)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print("Enter a number.");
    numeric n=PopupNum("Enter a number");
    string nstr$ = NumToStr(n);
    # one can now do any string operations desired on nstr$
    print(nstr$);
    


    right$
    Return right-most n characters of string$

    right$(str$, length)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print("Enter a sentence.");
           string a$=PopupString("Enter a sentence.");
    print("Enter # of chars to get from the end of the string.");
           numeric n=PopupNum("Enter # of chars to get from the end of the string.");
    print(right$(a$, n));
    


    sprintf
    Assign formatted text to a string variable

    sprintf(format$, value, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string format$="%s%d%s\n%s";
    string str1$="This is line ";
    string str2$=" you see.";
    string str3$="This is line 2";
    string s4$=sprintf(format$, str1$, 1, str2$, str3$);
    print(s4$);
    


    strlen
    Returns number of characters in string variable

    strlen(str$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string a$;
    print("Enter a string. ");
           a$=PopupString("Enter a string. ");
    print(strlen(a$));
    


    StrToDeg
    Convert string in degrees, minutes, seconds format to decimal degrees

    StrToDeg(str$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 16-Nov-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(StrToDeg("S 24 30 00"));
    


    StrToNum
    Return numerical value of string with number in it

    StrToNum(str$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string a$;
    print("Enter a number. "); # would be better to just input as numeric
           a$=PopupString("Enter a number. ");
    numeric b=StrToNum(a$);
    print(b/10);
    


    tolower$
    Convert string to lower case

    tolower$(string$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(tolower$("MiXeD CaSe")); # mixed case;
    


    toupper$
    Convert string to upper case

    toupper$(string$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(toupper$("MiXeD CaSe")); # MIXED CASE;
    


    Database functions (45)

    CloseDatabase
    Close an open database instance

    CloseDatabase(db)

    場所:

    パラメータ:

    戻り値

    作成日時: 21-Sep-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DatabaseCreate
    Create a 'standalone' database object

    DatabaseCreate(filename$, name$, description$, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 02-Jun-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string file$ = "C:/test.rvc";
    numeric err = DatabaseCreate(file$, "name", "desc");
    if (err < 0) print("error occurred creating database");
    else
    {
           # open database and add table to database
    }
    


    DatabaseGetTableInfo
    Get database table information

    DatabaseGetTableInfo(database, name)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 29-May-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/cumul.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FieldGetInfoByName
    Returns a field class given the field name.

    FieldGetInfoByName(table, name$)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/create.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FieldGetInfoByNumber
    Returns a field class given the field number.

    FieldGetInfoByNumber(table, number)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class DATABASE db;
    class DBTABLEINFO table, table2;
    class DBFIELDINFO field, fieldcopy;
    vector V;
    numeric tablenum=1;
    GetInputVector(V);     # used cb_soils
    db = OpenVectorPolyDatabase(V);
    if(TableExists(db, tablenum))
    {
           table = DatabaseGetTableInfo(db, tablenum);
           field = FieldGetInfoByNumber(table, 1);       # get the first field
           fieldcopy = field;
           table2 = TableCreate(db, "NewTable", "Desc");
           TableAddField(table2, field);                # copy it to a second table
           print(field.Name,"added.");
    }
    else print("No table found");
    


    NumRecords
    Returns number of records in database table

    NumRecords(table)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    GetInputVector(V);
    # assume you know the table name, here we used the
    # Crow Butte Soils Vector object.  Note that 'YIELD'
    # is the correct field name,not 'yield'.
    numeric n=NumRecords(V.poly.YIELD);
    print("Record count:", n);
    


    OpenCADDatabase
    Open the database subobject of a CAD object

    OpenCADDatabase(CADVar, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 20-Jun-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    cad C;
    GetOutputCAD(C);
    class DATABASE db;
    class DBTABLEINFO table;
    # write a point
    numeric xin = 100, yin = 200;
    CADWritePoint(C, 1, xin, yin);
    CADWritePoint(C, 1, xin+yin, yin);
    CADWritePoint(C, 1, xin-yin, yin);
    CADWritePoint(C, 1, xin, yin+xin);
    # now create a table
    db = OpenCADDatabase(C);
    table = TableCreate(db, "MyTable", "Newly Created Table");
    TableAddFieldInteger(table, "NewField");
    # write some important info to the db table
    TableWriteRecord(table, 0, 55);
    TableWriteRecord(table, 0, 45);
    # attach the records to elements
    CADAttachDBRecord(C, 1, 1, table, 1);
    CADUnattachDBRecord(C, 1, 1, table, 1);
    CADAttachDBRecord(C, 1, 1, table, 2);
    CADAttachDBRecord(C, 1, 2, table, 1);
    CADAttachDBRecord(C, 1, 3, table, 2);
    CADAttachDBRecord(C, 1, 4, table, 1);
    


    OpenDatabase
    Open a main level database

    OpenDatabase(filename$, objectname$, openmode$, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 11-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    OpenRasterDatabase
    Returns a database class for functions that need one.

    OpenRasterDatabase(Rast, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/classifyRaster.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    OpenTINDatabase
    Open the database subobject of a TIN object

    OpenTINDatabase(TINVar, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 20-Jun-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    tin T;
    class DATABASE db;
    class DBTABLEINFO table;
    GetInputTIN(T);
    db = OpenTINDatabase(T);
    table = TableCreate(db, "MyTINTable", "Newly create tin db table");
    TableAddFieldInteger(table, "IntField");
    # write some important info to the db table
    TableWriteRecord(table, 0, 55);
    TableWriteRecord(table, 0, 45);
    # one could then set up attachment or relation as desired
    


    OpenVectorLineDatabase
    Returns a database class for functions that need one.

    OpenVectorLineDatabase(Vect, Credentials)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    OpenVectorNodeDatabase
    Opens the Node database of the specified vector

    OpenVectorNodeDatabase(Vect, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/NETWORK1.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    OpenVectorPointDatabase
    Open a Vector point database

    OpenVectorPointDatabase(Vect, Credentials)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/attach.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    OpenVectorPolyDatabase
    Returns a database class for functions that need one.

    OpenVectorPolyDatabase(Vect, Credentials)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    RecordDelete
    Delete one or more records.

    RecordDelete(table, recordnum1, recordnum2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableAddField
    Append a field to a table

    TableAddField(table, field)

    場所:

    パラメータ:

    戻り値

    作成日時: 08-Jun-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class DATABASE db;
    class DBTABLEINFO table, table2;
    class DBFIELDINFO field, fieldcopy;
    vector V;
    numeric tablenum=1;
    GetInputVector(V);     # used cb_soils
    db = OpenVectorPolyDatabase(V);
    if(TableExists(db, tablenum))
    {
           table = DatabaseGetTableInfo(db, tablenum);
           field = FieldGetInfoByNumber(table, 1);       # get the first field
           fieldcopy = field;
           table2 = TableCreate(db, "NewTable", "Desc");
           TableAddField(table2, field);                # copy it to a second table
           print(field.Name,"added.");
    }
    else print("No table found");
    


    TableAddFieldFloat
    Add a new field of type float.

    TableAddFieldFloat(table, name$, dispwidth, places)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/CreateTable.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableAddFieldInteger
    Add a new field of type Integer.

    TableAddFieldInteger(table, name$, dispwidth)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/DB2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableAddFieldString
    Add a new field of type string.

    TableAddFieldString(table, name$, maxlength, dispwidth)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/DB2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableCopy
    Copy a database table from one object's database to another

    TableCopy(databaseSrc, table, databaseDest)

    場所:

    パラメータ:

    戻り値

    作成日時: 08-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V1, V2;
    GetInputVector(V1);
    GetInputVector(V2);
    class DATABASE db1, db2;
    class DBTABLEINFO t1;
    db1 = OpenVectorPolyDatabase(V1);
    db2 = OpenVectorPolyDatabase(V2);
    string table$;
    PopupSelectTable(db1, table$);
    t1 = DatabaseGetTableInfo(db1, table$);
    numeric num = TableCopy(db1, t1, db2);
    print(num);
    


    TableCopyToDBASE
    Copy a database table to a DBASE file

    TableCopyToDBASE(table, filename$)

    場所:

    パラメータ:

    戻り値

    作成日時: 11-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$, dbffile$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           # open the db and table
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           print("You selected:", tablename$);
           # save the table to dbase
           dbffile$ = GetOutputFileName(tablename$, "Where would you like to save the table?", "dbf");
           table = DatabaseGetTableInfo(db, tablename$);
           TableCopyToDBASE(table, dbffile$);
           # for demonstration purposes, let's create a link to that dbase file
           TableLinkDBASE(db, dbffile$, tablename$+"Link", "Table linked from dbase");
    }
    else print("Cannot open polygon database");
    


    TableCreate
    Creates an empty table. Use TableAddField???() functions to add fields to it.

    TableCreate(database, name$, description$)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/DB2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableDelete
    Drops a table from its database

    TableDelete(table)

    場所:

    パラメータ:

    戻り値

    作成日時: 24-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
                  numeric err = 0;
                  db = OpenVectorPolyDatabase(V);
                  PopupSelectTable(db, tablename$);
                  print("You selected:", tablename$);
                  table = DatabaseGetTableInfo(db, tablename$);
                  err = TableDelete(table);
                  if (err<0) print("An error occurred");
                  else print("Table deleted successfully.");
    }
    


    TableExists
    Returns 1 if table exists, 0 if table doesn't exist

    TableExists(database, name)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 27-Nov-2000
    修正日時: 16-Jul-2003
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/attach.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableGetInfo
    Returns a table class.

    TableGetInfo(table)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector Vect;
    class DBTABLEINFO table;
    table = TableGetInfo(Vect.poly.YIELD);
    # Another example:
    string tablename$ = "YIELD";
    table = TableGetInfo(Vect.poly.(tablename$));
    


    TableGetRecordElementList
    Get list of elements with a given record attached or related

    TableGetRecordElementList(table, recordNum, elements, element_type$)

    場所:

    パラメータ:

    戻り値

    作成日時: 24-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    TableGetRecordListElementList
    Get list of elements to which a given list of records are attached or related

    TableGetRecordListElementList(table, records, num_records, elements, element_type$)

    場所:

    パラメータ:

    戻り値

    作成日時: 24-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    TableInsertFieldFloat
    Add a new field of type float but inserts it before field "before".

    TableInsertFieldFloat(table, name$, before, dispwidth, places)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DATABASE db;
    class DBTABLEINFO table;
    class DBFIELDINFO field;
    vector V;
    string table$, field$;
    # let the user select the desired Vect.Table.Field
    # the script will insert fields prior to the one selected
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    PopupSelectTableField(db, table$, field$);
    table = DatabaseGetTableInfo(db, table$);
    field = FieldGetInfoByName(table, field$);
    numeric dispwidth=10, places=2;
    TableInsertFieldFloat(table, "FloatField", field, dispwidth, places);
    TableInsertFieldInteger(table, "IntegerField", field, dispwidth);
    TableInsertFieldString(table, "StringField", field, dispwidth*2);
    print(table$ + "." + field$);
    


    TableInsertFieldInteger
    Add a new field of type integer but inserts it before field "before".

    TableInsertFieldInteger(table, name$, before, dispwidth)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DATABASE db;
    class DBTABLEINFO table;
    class DBFIELDINFO field;
    vector V;
    string table$, field$;
    # let the user select the desired Vect.Table.Field
    # the script will insert fields prior to the one selected
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    PopupSelectTableField(db, table$, field$);
    table = DatabaseGetTableInfo(db, table$);
    field = FieldGetInfoByName(table, field$);
    numeric dispwidth=10, places=2;
    TableInsertFieldFloat(table, "FloatField", field, dispwidth, places);
    TableInsertFieldInteger(table, "IntegerField", field, dispwidth);
    TableInsertFieldString(table, "StringField", field, dispwidth*2);
    print(table$ + "." + field$);
    


    TableInsertFieldString
    Add a new field of type string but inserts it before field "before".

    TableInsertFieldString(table, name$, before, maxlength, dispwidth)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DATABASE db;
    class DBTABLEINFO table;
    class DBFIELDINFO field;
    vector V;
    string table$, field$;
    # let the user select the desired Vect.Table.Field
    # the script will insert fields prior to the one selected
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    PopupSelectTableField(db, table$, field$);
    table = DatabaseGetTableInfo(db, table$);
    field = FieldGetInfoByName(table, field$);
    numeric dispwidth=10, places=2;
    TableInsertFieldFloat(table, "FloatField", field, dispwidth, places);
    TableInsertFieldInteger(table, "IntegerField", field, dispwidth);
    TableInsertFieldString(table, "StringField", field, dispwidth*2);
    print(table$ + "." + field$);
    


    TableKeyFieldLookup
    Find the first record in a table that matches a given value

    TableKeyFieldLookup(table, fieldName$, fieldValue1, comparison_type$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 13-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DATABASE db;
    class DBTABLEINFO table;
    vector V;
    string table$, field$;
    numeric value = 5;     # the value to search for
    numeric found=0;
    # have user select vector, table, and field
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    PopupSelectTableField(db, table$, field$);
    print(table$+"."+field$);
    # get the table
    table = DatabaseGetTableInfo(db, table$);
    found = TableKeyFieldLookup(table, field$, value);
    print(found);
    if (found>0)
    {
           print(table$ + "." + field$ + " record number", found, "is the first match.");
    }
    else print("No match found.");
    


    TableKeyFieldLookupList
    Find the set of record in a table that matches a given value

    TableKeyFieldLookupList(table, fieldName$, fieldValue1, record_list, comparison_type$)

    場所:

    パラメータ:

    戻り値

    作成日時: 24-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    TableLinkDBASE
    Makes a link to a dBase file.

    TableLinkDBASE(database, filename$, name$, description$)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$, dbffile$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           # open the db and table
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           print("You selected:", tablename$);
           # save the table to dbase
           dbffile$ = GetOutputFileName(tablename$, "Where would you like to save the table?", "dbf");
           table = DatabaseGetTableInfo(db, tablename$);
           TableCopyToDBASE(table, dbffile$);
           # for demonstration purposes, let's create a link to that dbase file
           TableLinkDBASE(db, dbffile$, tablename$+"Link", "Table linked from dbase");
    }
    else print("Cannot open polygon database");
    


    TableNewRecord
    Add new record to a database

    TableNewRecord(table, fieldValue1, fieldValue2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 29-May-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableOpen
    Open a database table

    TableOpen(database, tablename$)

    場所:

    パラメータ:

    戻り値

    作成日時: 26-May-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableReadAttachment
    Returns records that are attached to or related to a given element in a object

    TableReadAttachment(table, element_number, records, element_type$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 14-Nov-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/attach.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableReadFieldNum
    Read a number from a table (using DBTABLEINFO)

    TableReadFieldNum(table, fieldName$, recordNum)

    場所:

    パラメータ:

    戻り値

    作成日時: 12-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/attach.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableReadFieldStr
    Read a string from a table (using DBTABLEINFO)

    TableReadFieldStr(table, fieldName$, recordNum)

    場所:

    パラメータ:

    戻り値

    作成日時: 12-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableRemoveAttachment
    Detaches records from an element in a object

    TableRemoveAttachment(table, element_number, records, num_records, element_type$)

    場所:

    パラメータ:

    戻り値

    作成日時: 14-Nov-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # CAUTION: This script will attempt to remove some attachments
    # between elements and their db records.  For example purposes only!
    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           
           print("You have sealed the fate of table:",tablename$);
           table = DatabaseGetTableInfo(db, tablename$);
           
           # mark all records for their ensuing detachment
           array numeric records[table.NumRecords];
           numeric numrecords=0;
           numeric i;
           for i=1 to NumVectorPolys(V) step 2    # deattach every other element
           {
                  numrecords = TableReadAttachment(table, i, records);
                  TableRemoveAttachment(table, i, records, numrecords);
           }
    }
    


    TableRemoveDuplicateRecords
    Deletes duplicate records from the table

    TableRemoveDuplicateRecords(table)

    場所:

    パラメータ:

    戻り値

    作成日時: 23-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           numeric err = 0;
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           print("You selected:", tablename$);
           table = DatabaseGetTableInfo(db, tablename$);
           err = TableRemoveDuplicateRecords(table);
           if (err<0) print("An error occurred");
           else print(err,  "duplicate records removed");
    }
    


    TableRemoveUnattachedRecords
    Deletes unattached records from the table

    TableRemoveUnattachedRecords(table)

    場所:

    パラメータ:

    戻り値

    作成日時: 23-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           numeric err = 0;
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           print("You selected:", tablename$);
           table = DatabaseGetTableInfo(db, tablename$);
           err = TableRemoveUnattachedRecords(table);
           if (err<0) print("An error occurred.");
           else print("All unattached records have been removed.");
    }
    


    TableTriggerRecordChangedCallback
    Mark an externally altered record/table as changed

    TableTriggerRecordChangedCallback(table, recordNum)

    場所:

    パラメータ:

    戻り値

    作成日時: 12-May-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/VisualBasic/ParcelToolModeless.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableWriteAttachment
    Attaches records in a table to an element in a object

    TableWriteAttachment(table, element_number, records, num_records, element_type$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 14-Nov-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example:
    # Have the user select a vector object.
    # attach records 5 and 7 to polygon number 12.
    VECTOR Vect;
    class DBTABLEINFO table;
    array numeric records[2];
    GetInputVector(Vect);
    table = TableGetInfo(Vect.poly.YIELD);
    records[1] = 5;
    records[2] = 7;
    TableWriteAttachment(table, 12, records, 2, "polygon");
    


    TableWriteField
    Write the value of an given field to an existing database record

    TableWriteField(table, recordNum, fieldName$, fieldValue)

    場所:

    パラメータ:

    戻り値

    作成日時: 08-Nov-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class DATABASE database;
    vector V;
    string tablename$, field$;
    GetInputVector(V);
    database = OpenVectorPolyDatabase(V);
    PopupSelectTableField(database, tablename$, field$);
    print(tablename$ + "." + field$);
    class DBTABLEINFO table;
    table = DatabaseGetTableInfo(database, tablename$);
    # Write the value 999 to the selected field in record 3
    numeric err = TableWriteField(table, 3, field$, 999);
    PopupError(err);
    


    TableWriteRecord
    Write values to an existing database record

    TableWriteRecord(table, recordNum, fieldValue1, fieldValue2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 15-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);# cbsoils_lite used
    class DBTABLEINFO table;
    table = TableGetInfo(V.poly.CLASS);
    numeric recordNum = TableWriteRecord(table, 0, "AAAAA");
    print(recordNum);
    


    Raster functions (60)

    AreaCorrelatePoint
    Adjust point position of Raster to match known position in refererence Raster

    AreaCorrelatePoint(RasterSource, xSource, ySource, RasterDestination, xDestination, yDestination, sourceSize, targetSize)

    場所:

    パラメータ:

    戻り値

    作成日時: 20-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rs, Rd;
    numeric xS, yS, xD, yD;
    GetInputRaster(Rs);
    GetInputRaster(Rd);
    xS = 55;
    yS = 60;
    xD = 50;
    yD = 63;
    numeric sourceSize = 21;
    numeric targetSize = 50;
    numeric cor = AreaCorrelatePoint(Rs, xS, yS, Rd, xD, yD, sourceSize, targetSize);
    print(xS, yS, xD, yD, cor);
    


    Binarization
    Calculates a raster binarization on an 8 or 4 bit raster

    Binarization(Raster, filename$, objname$, Array, BinaryValue, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 15-Jul-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DISP handle;
    raster Rvar, Rout;
    array numeric myarray[15];
    numeric x;
    for x=1 to 15{
           myarray[x]=80+x;
           }
    OpenRaster(Rvar, "c:/tnt/testdata.rvc", "GREEN");
    Binarization(Rvar, "c:/tnt/testdata.rvc", "binaryout", myarray, 1);
    OpenRaster(Rout, "c:/tnt/testdata.rvc", "binaryout");
    handle=DispOpen(750,550);
    DispQuickAddRasterVar(handle, Rout);
    DispRedraw(handle);
    CloseRaster(Rvar);
    CloseRaster(Rout);
    


    CloseRaster
    Close an open raster

    CloseRaster(Raster)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rvar;
    clear();
    GetInputRaster(Rvar);
    Rvar[1, 1] = 42;
    print(Rvar[1, 1]);
    CloseRaster(Rvar);
    


    ColScale
    Get horizontal computed size of raster cell

    ColScale(Raster)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    GetInputRaster(R);
    print(ColScale(R));
    


    ComputeMeanRaster
    The output raster contains the mean value (at each cell) of all of the inputs.

    ComputeMeanRaster(OutputRaster, Raster1, Raster2, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 25-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R1, R2, R3, Rout;
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    IgnoreNull(R1);
    IgnoreNull(R2);
    IgnoreNull(R3);
    GetOutputRaster(Rout, NumLins(R1), NumCols(R1), RastType(R1));
    ComputeMeanRaster(Rout, R1, R2, R3);
    CloseRaster(Rout);
    CloseRaster(R1);
    CloseRaster(R2);
    CloseRaster(R3);
    


    ComputeRasterProperties
    Compute Raster attribute tables from a Vector object

    ComputeRasterProperties(Raster, Vector, tableName$, tableDescription$, flag1$, flag2$, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 11-Aug-1998
    修正日時: 08-Jul-1999
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    vector V;
    GetInputRaster(R);
    GetInputVector(V);
    ComputeRasterProperties(R, V, "TableName", "Description", "IncludeAll", "ComputeHistogram");
    


    ComputeReliefShading
    Compute relief shading of the input raster

    ComputeReliefShading(InputRast, OutputRast, sunElevationAngle, sunDirection, elevationScale)

    場所:

    パラメータ:

    戻り値

    作成日時: 09-Apr-2002
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    raster Rshade;
    GetInputRaster(R);
    GetOutputRaster(Rshade, NumLins(R), NumCols(R), RastType(R));
    numeric sunAngle=45, sunDir=180, elevScale=3;
    ComputeReliefShading(R, Rshade, sunAngle, sunDir, elevScale);
    


    ComputeSlopeAspectShading
    Compute slope/aspect/shading from elevation Raster

    ComputeSlopeAspectShading(inputRVCFile$, InputRaster$, outputRVCFile$, rescaleSlope, numberSlopeCells$, slopeTypeDegrees$, rescaleAspect, horizontalScale, verticalScale, elevationScale, sunElevationAngle, sunDirection, slopeObjectName$, slopeDescription$, slopeDataType$, aspectObjectName$, aspectDescription$, aspectDataType$, shadingObjectName$, shadingDescription$, shadingDataType$)

    場所:

    パラメータ:

    戻り値

    作成日時: 22-Dec-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string inputFile$ = "c:/cb_tm.rvc";
    string inputRaster$ = "ELEVATION";
    string outputFile$ = "c:/SAS.rvc";
    numeric rescaleSlope = 1;
    string numberSlopeCells$ = "4 neighbor";
    string slopeTypeDegrees$ = "Degrees";
    numeric rescaleAspect = 1;
    numeric horizontalScale = 30.0;
    numeric verticalScale = 30.0;
    numeric elevationScale = 1.0;
    numeric sunElevationAngle = 50.0;
    numeric sunDirection = 45.0;
    ComputeSlopeAspectShading(inputFile$, inputRaster$, outputFile$,
    rescaleSlope, numberSlopeCells$, slopeTypeDegrees$,
    rescaleAspect, horizontalScale, verticalScale,
    elevationScale, sunElevationAngle, sunDirection);
    


    ComputeStdDevRaster
    The standard deviation (at each cell) of all of the inputs is assigned to the output raster.

    ComputeStdDevRaster(OutputRaster, Raster1, Raster2, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 25-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R1, R2, R3, Rout;
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    IgnoreNull(R1);
    IgnoreNull(R2);
    IgnoreNull(R3);
    GetOutputRaster(Rout, NumLins(R1), NumCols(R1), RastType(R1));
    ComputeStdDevRaster(Rout, R1, R2, R3);
    CloseRaster(Rout);
    CloseRaster(R1);
    CloseRaster(R2);
    CloseRaster(R3);
    


    ConvertCompToComp
    Converts the color depth of a raster to another color depth.

    ConvertCompToComp(InputRaster, FileName$, ObjName$, ColorDepth)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Aug-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DISP handle;
    raster Rvar, Ovar;
    OpenRaster(Rvar, "c:/tnt/samp.rvc", "COMP24");
    ConvertCompToComp(Rvar, "c:/tnt/samp.rvc", "conv8", 8);
    OpenRaster(Ovar, "c:/tnt/samp.rvc", "conv8");
    handle=DispOpen(750,550);
    DispQuickAddRasterVar(handle, Ovar);
    DispRedraw(handle);
    CloseRaster(Rvar);
    CloseRaster(Ovar);
    


    ConvertRGBToComposite
    Converts and RGB raster to an 8 or 4 bit composite

    ConvertRGBToComposite(RedRaster, GreenRaster, BlueRaster, FileName$, ObjName$, NumColors, BitDepth, SamplingRate, NullValue)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 28-Jul-1999
    修正日時: 19-Mar-2004
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DISP handle;
    raster Rvar, Gvar, Bvar, Ovar;
    OpenRaster(Rvar, "c:/tnt/samp.rvc", "RED");
    OpenRaster(Gvar, "c:/tnt/samp.rvc", "GREEN");
    OpenRaster(Bvar, "c:/tnt/samp.rvc", "BLUE");
    ConvertRGBToComposite(Rvar, Gvar, Bvar, "c:/tnt/samp.rvc", "composite", 16, 8, 2);
    OpenRaster(Ovar, "c:/tnt/samp.rvc", "composite");
    handle=DispOpen(750,550);
    DispQuickAddRasterVar(handle, Ovar);
    DispRedraw(handle);
    CloseRaster(Rvar);
    CloseRaster(Gvar);
    CloseRaster(Bvar);
    CloseRaster(Ovar);
    


    CreateHistogram
    Create a histogram for a Raster

    CreateHistogram(Raster, sampled)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    GetInputRaster(R);
    CreateHistogram(R);
    CloseRaster(R);
    


    CreatePyramid
    Create a pyramid for the given raster object

    CreatePyramid(Raster, average)

    場所:

    パラメータ:

    戻り値

    作成日時: 10-Jun-1998
    修正日時: 10-Jun-1998
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    GetInputRaster(R);
    CreatePyramid(R);
    CloseRaster(R);
    


    CreateRaster
    Create a new raster

    CreateRaster(Raster, filename$, objname$, desc$, lins, cols, datatype$, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    string file$="c:/temp.rvc";
    string obj$="TempRast";
    string description$="temporary raster for test";
    numeric lin = 1024, col = 512;
    string type$="8-bit unsigned";
    CreateRaster(Rvar, file$, obj$, description$, lin, col, type$);
    print(NumLins(Rvar), NumCols(Rvar));
    # do some things to Rvar
    CloseRaster(Rvar);
    


    CreateRasterBinaryMask
    Crete a binary mask raster

    CreateRasterBinaryMask(Raster, filename$, objname$, MaskValue)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 23-Jul-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/MacroScript/printsep.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateRasterFromObject
    Create a Raster to match a given Object.

    CreateRasterFromObject(Object, Raster, filename$, objname$, description$, horizontalScale, verticalScale, datatype$, georef, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 29-Apr-1998
    修正日時: 20-Dec-2005
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    vector V;
    class Georef georef;
    GetInputVector(V);
    georef = GetLastUsedGeorefObject(V);
    CreateRasterFromObject(V, R, "c:/tnt/win32/projects/vtor/RasOut.rvc",
    "VtoR", "Raster from Vector", 30, 30, "8-bit unsigned", georef);
    R = 0; # zero out the Raster
    CloseRaster(R);
    CloseVector(V);
    print("done");
    


    CreateRasterMask
    Crete a mask raster (for use as a transparancy mask)

    CreateRasterMask(Raster, filename$, objname$, MaskValue, Credentials)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 23-Jul-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Raster R;
    GetInputRaster(R);
    numeric percent = 50;
    CreateRasterMask(R, R.$Info.Filename, R.$Info.Name+"Mask",percent*255/100);
    


    CreateTempRaster
    Create a raster in RAM

    CreateTempRaster(Raster, lins, cols, datatype$, noDeleteOnClose)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    numeric lin = 1024, col = 512;
    string type$="8-bit unsigned";
    CreateTempRaster(Rvar, lin, col, type$);
    print(NumLins(Rvar), NumCols(Rvar));
    # do some things to Rvar
    CloseRaster(Rvar);
    


    DeleteContrast
    Delete contrast subobjects of the given raster object

    DeleteContrast(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rvar;
    GetInputRaster(Rvar);
    DeleteContrast(Rvar);
    


    DeleteHistogram
    Delete histogram subobject of the given raster object

    DeleteHistogram(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rvar;
    GetInputRaster(Rvar);
    DeleteHistogram(Rvar);
    


    DeletePyramid
    Delete pyramid subobject of the given raster object

    DeletePyramid(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rvar;
    GetInputRaster(Rvar);
    DeletePyramid(Rvar);
    


    DeleteTempRaster
    Delete a raster that has been created with CreateTempRaster()

    DeleteTempRaster(Raster)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster rTemp;
    numeric lin = 1024, col = 512;
    string type$="8-bit unsigned";
    CreateTempRaster(rTemp, lin, col, type$);
    # do something with rTemp
    DeleteTempRaster(rTemp);
    


    GetInputRaster
    Use a File/Object selection dialog to select an input Raster

    GetInputRaster(Raster, lins, cols, datatype$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    numeric lines=488, columns=361; # Crow Butte TM raster dimensions
    string type$="8-bit unsigned";
    # allow only specific raster size and type
    GetInputRaster(R, lines, columns, type$);
    CloseRaster(R);
    # allow any size, but only a specific type
    GetInputRaster(R, 0, 0, type$);
    CloseRaster(R);
    


    GetInputRasters
    Get more than one raster.

    GetInputRasters(Raster, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Red, Green, Blue;
    GetInputRasters(Red, Green, Blue);
    


    GetMaxPossibleValue
    Get the maximum possible data value in the raster

    GetMaxPossibleValue(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetMinPossibleValue
    Get the minimum possible data value in the raster

    GetMinPossibleValue(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetOutputRaster
    Use a File/Object selection dialog to select an output Raster

    GetOutputRaster(Raster, lins, cols, datatype$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R, R2;
    GetInputRaster(R);
    numeric lin = 1024, col = 512;
    string type$="8-bit unsigned";
    # allow selection or creation of a raster identical
    # in size and type to R.
    GetOutputRaster(R2, lin, col, type$);
    CloseRaster(R);
    CloseRaster(R2);
    


    HasNull
    Does a raster object have an assigned NULL value or NULL Mask?

    HasNull(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    if (HasNull(R)) then
           print("R has a NULL value.");
    else
           print("R does not have a NULL value.");
    # The last line is always executed - it's not part of the 'else' statement.
    CloseRaster(R);
    


    HasNullMask
    Does a raster object have a NULL mask?

    HasNullMask(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 07-Jun-2005
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    HasNullValue
    Does a raster object have an assigned NULL value?

    HasNullValue(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 07-Jun-2005
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    HistogramGetSampleInterval
    Returns the sample interval used when the histogram is created.

    HistogramGetSampleInterval(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-May-2005
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    IgnoreNull
    Do not report NULLs in raster object

    IgnoreNull(Raster, temporary)

    場所:

    パラメータ:

    詳細と仮定

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: 22-Mar-2005
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    if (HasNull(R)) then begin
           print("R has a NULL value.");
           print("\nIt is now ignored.");
           IgnoreNull(R);
           end
    else begin
           print("R has no NULL value.");
           print("That's all, folks.");
           end
    # The last line is always executed - it's not in the loop.
    CloseRaster(R);
    


    LinScale
    Vertical computed size of raster cell

    LinScale(Raster)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric a=LinScale(R);
    print("Line scale is:", a);
    CloseRaster(R);
    


    MultiRegression
    Computes coefficients of multilinear regression equations on a set of rasters

    MultiRegression(resultMat, Raster1, Raster2, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    raster Rr, Rg, Rb;
    h1 = CreateMatrix(3, 4); # holds the results
    # get three input rasters to do multiregression on
    GetInputRaster(Rr); # get red input raster
    GetInputRaster(Rg); # get green input raster
    GetInputRaster(Rb); # get blue input raster
    # do the multi-regression - result in h1
    MultiRegression(h1, Rr, Rg, Rb);
    numeric r, c, a;
    print("Multi-Regression Output");
    for r = 0 to 2 {
                  for c = 0 to 3 {
                  a = GetMatrixItem(h1, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    CloseRaster(Rr); # do clean up
    CloseRaster(Rg);
    CloseRaster(Rb);
    DestroyMatrix(h1);
    


    NullValue
    Value (if any) assigned as NULL for a raster object

    NullValue(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric n=NullValue(R);
    print("Null value is",n);
    CloseRaster(R);
    


    NumCols
    Number of columns in a raster object

    NumCols(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric columns=NumCols(R);
    print("Number of columns:", columns);
    CloseRaster(R);
    


    NumLins
    Number of lines (rows) in a raster object

    NumLins(Raster)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric lines=NumLins(R);
    print("Number of lines:", lines);
    CloseRaster(R);
    


    OpenRaster
    Open an existing raster file, putting it in Raster

    OpenRaster(Raster, filename$, objname$, Credentials)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    OpenRaster(R, "c:/data/cb_tm.rvc", "blue");
    #  or OpenRaster(R, "c:\\data\\cb_tm.rvc", "blue");
    print("Line count: ", NumLins(R));
    


    OpenRasterObject
    Open a raster given object from SelectInputObject()

    OpenRasterObject(Raster, object)

    場所:

    パラメータ:

    戻り値

    作成日時: 18-Nov-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # See also OpenRaster(), GetInputRaster()
    # as they are more straightforward for raster selection.
    raster R;
    class OBJECT obj;
    obj = SelectInputObject("RASTER", "Select your favorite raster");
    OpenRasterObject(R, obj);
    print(R.$Info.Filename);
    print(R.$Info.Number);
    print(R.$Info.Name);
    print(R.$Info.Type);
    


    PackRGB
    Pack an color into a single number

    PackRGB(color, bits, order$)

    場所:

    パラメータ:

    戻り値

    作成日時: 09-Apr-2002
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    PrincipleComponents
    Computes principal component transformation matrix for a set of rasters

    PrincipleComponents(forwardMat, inverseMat, Raster1, Raster2, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear(); # clear the console
    # declare raster variables
    raster Rr, Rg, Rb;
    raster R1, R2, R3;
    # declare matrices
    class MATRIX forwardMat, inverseMat, inMat, outMat;
    # create the transformation matrices
    # to send to principal companent function
    forwardMat = CreateMatrix(3, 3);
    inverseMat = CreateMatrix(3, 3);
    # outMat = (forward * inMat)
    inMat = CreateMatrix(3, 1);
    # use to calculate the transformation
    outMat = CreateMatrix(3, 1);
    # get three input rasters to do principal components on
    # get red input raster
    GetInputRaster(Rr);
    GetInputRaster(Rg); # get green input raster
    GetInputRaster(Rb); # get blue input raster
    # create the rasters to hold principal components
    # output values will contain negative numbers so
    # allways use signed type
    GetOutputRaster(R1, NumLins(Rr), NumCols(Rr), "64-bit float");
    GetOutputRaster(R2, NumLins(Rr), NumCols(Rr), "64-bit float");
    GetOutputRaster(R3, NumLins(Rr), NumCols(Rr), "64-bit float");
    # get the tranformation matrices
    PrincipleComponents(forwardMat, inverseMat, Rr, Rg, Rb);
    # print the forward matrix
    print("Forward matrix");
    numeric r, c;
    for r = 0 to 2 {
                  for c = 0 to 2 {
                  numeric a = GetMatrixItem(forwardMat, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    # print the inverse matrix
    print("Inverse matrix");
    for r = 0 to 2 {
                  for c = 0 to 2 {
                  a = GetMatrixItem(inverseMat, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    # now compute the principal component values
    # for each point in raster
    numeric numColumns = NumCols(Rr);
    numeric numLines = NumLins(Rr);
    for r = 1 to NumLins(Rr) {
                  for c = 1 to NumCols(Rr) {
                  SetMatrixItem(inMat, 0, 0, Rr[r,c]);
                  SetMatrixItem(inMat, 1, 0, Rg[r,c]);
                  SetMatrixItem(inMat, 2, 0, Rb[r,c]);
                  MultiplyMatrix(outMat, forwardMat, inMat);
                  R1[r,c] = GetMatrixItem(outMat, 0, 0);
                  R2[r,c] = GetMatrixItem(outMat, 1, 0);
                  R3[r,c] = GetMatrixItem(outMat, 2, 0);
                  }
           }
    # copy the georef
    CopySubobjects(Rr, R1, "GEOREF");
    CopySubobjects(Rr, R2, "GEOREF");
    CopySubobjects(Rr, R3, "GEOREF");
    # do clean up
    CloseRaster(Rr);
    CloseRaster(Rg);
    CloseRaster(Rb);
    CloseRaster(R1);
    CloseRaster(R2);
    CloseRaster(R3);
    DestroyMatrix(forwardMat);
    DestroyMatrix(inverseMat);
    DestroyMatrix(inMat);
    DestroyMatrix(outMat);
    


    PrincipleComponentsExt
    Compute principle components and statistics

    PrincipleComponentsExt(forward, inverse, stats, Raster1, Raster2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 21-Dec-2000
    修正日時: 26-Mar-2004
    TNTsml for Windows で使用可能: はい

    例:

    clear(); # clear the console
    # declare raster variables
    raster Rr, Rg, Rb;
    raster R1, R2, R3;
    # declare principal component stats object
    class PRINCOMPSTATS stats;
    # declare matrices
    class MATRIX forwardMat, inverseMat, inMat, outMat;
    array numeric forward[3,3], inverse[3,3];
    # create the transformation matrices
    # to send to principal companent function
    forwardMat = CreateMatrix(3, 3);
    inverseMat = CreateMatrix(3, 3);
    # outMat = (forward * inMat)
    inMat = CreateMatrix(3, 1);
    # use to calculate the transformation
    outMat = CreateMatrix(3, 1);
    # get three input rasters to do principal components on
    # get red input raster
    GetInputRaster(Rr);
    GetInputRaster(Rg); # get green input raster
    GetInputRaster(Rb); # get blue input raster
    # create the rasters to hold principal components
    # output values will contain negative numbers so
    # allways use signed type
    GetOutputRaster(R1, NumLins(Rr), NumCols(Rr), "64-bit float");
    GetOutputRaster(R2, NumLins(Rr), NumCols(Rr), "64-bit float");
    GetOutputRaster(R3, NumLins(Rr), NumCols(Rr), "64-bit float");
    # get the tranformation matrices
    PrincipleComponentsExt(forward, inverse, stats, Rr, Rg, Rb);
    # print the forward array and dump values into a matrix
    print("Forward matrix");
    numeric r, c;
    for r = 1 to 3 {
                  for c = 1 to 3 {
                  numeric a = forward[r,c];
                  SetMatrixItem(forwardMat, r-1, c-1, a);# matrix is 0-indexed
                  printf("%8.4f ", a);
                  }
           print();
           }
    # print the inverse array and dump values into a matrix
    print("Inverse matrix");
    for r = 1 to 3 {
                  for c = 1 to 3 {
                  a = inverse[r,c];
                  SetMatrixItem(inverseMat, r-1, c-1, a);# matrix is 0-indexed
                  printf("%8.4f ", a);
                  }
           print();
           }
    # now compute the principal component values
    # for each point in raster
    numeric numColumns = NumCols(Rr);
    numeric numLines = NumLins(Rr);
    for r = 1 to NumLins(Rr) {
                  for c = 1 to NumCols(Rr) {
                  SetMatrixItem(inMat, 0, 0, Rr[r,c]);
                  SetMatrixItem(inMat, 1, 0, Rg[r,c]);
                  SetMatrixItem(inMat, 2, 0, Rb[r,c]);
                  MultiplyMatrix(outMat, forwardMat, inMat);
                  R1[r,c] = GetMatrixItem(outMat, 0, 0);
                  R2[r,c] = GetMatrixItem(outMat, 1, 0);
                  R3[r,c] = GetMatrixItem(outMat, 2, 0);
                  }
           }
    # print some of the computed stats as a demo report
    print();
    print("The determinant result is: ", stats.Determinant);
    print("The total variance is: ", stats.TotalVariance);
    print("The correlation of bands 1,2: ", stats.GetCorrelation(1,2));
    print("The correlation of bands 1,3: ", stats.GetCorrelation(1,3));
    print("The correlation of bands 2,3: ", stats.GetCorrelation(2,3));
    # copy the georef
    CopySubobjects(Rr, R1, "GEOREF");
    CopySubobjects(Rr, R2, "GEOREF");
    CopySubobjects(Rr, R3, "GEOREF");
    # do clean up
    CloseRaster(Rr);
    CloseRaster(Rg);
    CloseRaster(Rb);
    CloseRaster(R1);
    CloseRaster(R2);
    CloseRaster(R3);
    DestroyMatrix(forwardMat);
    DestroyMatrix(inverseMat);
    DestroyMatrix(inMat);
    DestroyMatrix(outMat);
    


    RasterApplyContrast
    Applies a contrast table to a raster. This function is obsolete. Use RasterApplyContrast2() instead.

    RasterApplyContrast(InputRaster, FileName$, ObjName$, Flag$)

    場所:

    パラメータ:

    戻り値

    作成日時: 11-Aug-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class DISP handle;
    raster Rvar, Ovar;
    OpenRaster(Rvar, "c:/tnt/samp.rvc", "RED");
    RasterApplyContrast(Rvar, "c:/tnt/samp.rvc", "contsamp", "equalize");
    OpenRaster(Ovar, "c:/tnt/samp.rvc", "contsamp");
    handle=DispOpen(750,550);
    DispQuickAddRasterVar(handle, Ovar);
    DispRedraw(handle);
    CloseRaster(Rvar);
    CloseRaster(Ovar);
    


    RasterApplyContrast2
    Applies a contrast table to a raster.

    RasterApplyContrast2(InputRaster, OutputRaster, type$, SubobjectName$)

    場所:

    パラメータ:

    戻り値

    作成日時: 11-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rvar, OutRast;
    GetInputRaster(Rvar);
    GetOutputRaster(OutRast, NumLins(Rvar), NumCols(Rvar), "8-bit unsigned");
    RasterApplyContrast2(Rvar, OutRast, "Subobject");
    


    RasterCompress
    Copy compressed source raster to the destination raster

    RasterCompress(SrcRaster, DestRaster, filename$, objname$, desc$, comptype$, compquality, copySubobjects, Credentials)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 09-Apr-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Raster Rin, Rout;
    numeric err = 0;
    GetInputRaster(Rin);
    string file$ = Rin.$INFO.Filename;
    string name$ = Rin.$INFO.Name + "_SML";
    string desc$ = "Compressed raster";
    # Function creates a new raster with 10:1 compression ratio
    err=RasterCompress(Rin, Rout, file$, name$, desc$, "JP2", 10);
    if (err >=0)
    {
           print(Rout.$INFO.Name);
    }
    else print ("An error occurred during compression");
    


    RasterCopy
    Copy all or part of a raster (with optional parameters)

    RasterCopy(InputRaster, OutputRaster, srclin, srccol, height, width, destlin, destcol)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 21-Nov-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # extract an interior portion of the input raster and copy to output
    raster Rin, Rout;
    GetInputRaster(Rin);
    numeric lines = NumLins(Rin);
    numeric cols = NumCols(Rin);
    numeric startLine = int(lines/4);
    numeric startColumn = int(cols/4);
    numeric numlines = int(lines/2);
    numeric numcols = int(cols/2);
    print(startLine);
    print(startColumn);
    print(numlines);
    print(numcols);
    GetOutputRaster(Rout, numlines, numcols, RastType(Rin));
    RasterCopy(Rin, Rout, startLine, startColumn, numlines, numcols);
    CloseRaster(Rin);
    CloseRaster(Rout);
    


    RasterExists
    Determine if a Raster exists. Made obsolete by ObjectExists()

    RasterExists(filename$, objectname$, Credentials)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    RasterFloodFill
    Does a flood fill at a cell location. This changes all equal adjacent cell values to the one specified.

    RasterFloodFill(Raster, lin, col, value)

    場所:

    パラメータ:

    戻り値

    作成日時: 21-Nov-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    #
    # reclassify.sml
    #
    # This script is written to reclassify cell values in the user-entered input raster.
    # Reclassification is based on meeting certain criteria for class (value) and area.
    # For modification purposes, the variables used for this purpose are "threshold",
    # "oldValue", "and newValue".
    # Currently it is set to reclassify all areas of <5 acres in class '128' to class '0'.
    #
    class RASTER Rin;
    class RASTER Result;
    class STATUSDIALOG statusdialog;
    class STATUSCONTEXT statuscontext;
    # create the 5 acre threshold
    numeric thresholdAcres = 5;
    numeric oldValue = 128, newValue = 0;
    # Get the input and output rasters.
    GetInputRaster(Rin);
    IgnoreNull(Rin);
    GetOutputRaster(Result, NumLins(Rin), NumCols(Rin), RastType(Rin));
    IgnoreNull(Result);
    # Copy all cell values
    printf("Copying source raster\n");
    Result = Rin;
    # Get the georeference info
    CopySubobjects(Rin, Result);   # get colormap, contrast, georef, etc.
    # Convert the threshold from Acres to cells
    numeric threshold = thresholdAcres * 4046.85642 / (LinScale(Rin) * ColScale(Rin));
    printf("Eliminating solid features less than or equal to %g acres (%d cells)\n", thresholdAcres, threshold);
    numeric lin, col, r, up, left, count;
    foreach Result[lin, col] {
           r = Result[lin,col];
           if (r == oldValue) {
                  up = -1;
                  left = -1;
                  if (col > 1) left = Result[lin, col-1];
                  if (lin > 1) up = Result[lin-1, col];
                  #printf("R[%d,%d] = %d,  Cell to the left = %d, Cell above = %d\n", lin, col, r, left, up);
                  if (left != oldValue && up != oldValue) {
                         #printf("Checking at %d,%d\n", lin, col);
                         count = RasterGetSolidAreaSize(Result, lin, col, threshold+1);
                         if (count <= threshold) {
                                #printf("Filling at %d,%d - count = %d\n", lin, col, count);
                                RasterFloodFill(Result, lin, col, newValue);
                                }
                         }
                  }
           }
    CreateHistogram(Result);
    CreatePyramid(Result);
    


    RasterGetSolidAreaSize
    Finds the total number of contiguous cells sharing the seed point's cell value.

    RasterGetSolidAreaSize(Raster, lin, col, maxsize)

    場所:

    パラメータ:

    戻り値

    作成日時: 21-Nov-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    #
    # reclassify.sml
    #
    # This script is written to reclassify cell values in the user-entered input raster.
    # Reclassification is based on meeting certain criteria for class (value) and area.
    # For modification purposes, the variables used for this purpose are "threshold",
    # "oldValue", "and newValue".
    # Currently it is set to reclassify all areas of <5 acres in class '128' to class '0'.
    #
    class RASTER Rin;
    class RASTER Result;
    class STATUSDIALOG statusdialog;
    class STATUSCONTEXT statuscontext;
    # create the 5 acre threshold
    numeric thresholdAcres = 5;
    numeric oldValue = 128, newValue = 0;
    # Get the input and output rasters.
    GetInputRaster(Rin);
    IgnoreNull(Rin);
    GetOutputRaster(Result, NumLins(Rin), NumCols(Rin), RastType(Rin));
    IgnoreNull(Result);
    # Copy all cell values
    printf("Copying source raster\n");
    Result = Rin;
    # Get the georeference info
    CopySubobjects(Rin, Result);   # get colormap, contrast, georef, etc.
    # Convert the threshold from Acres to cells
    numeric threshold = thresholdAcres * 4046.85642 / (LinScale(Rin) * ColScale(Rin));
    printf("Eliminating solid features less than or equal to %g acres (%d cells)\n", thresholdAcres, threshold);
    numeric lin, col, r, up, left, count;
    foreach Result[lin, col] {
           r = Result[lin,col];
           if (r == oldValue) {
                  up = -1;
                  left = -1;
                  if (col > 1) left = Result[lin, col-1];
                  if (lin > 1) up = Result[lin-1, col];
                  #printf("R[%d,%d] = %d,  Cell to the left = %d, Cell above = %d\n", lin, col, r, left, up);
                  if (left != oldValue && up != oldValue) {
                         #printf("Checking at %d,%d\n", lin, col);
                         count = RasterGetSolidAreaSize(Result, lin, col, threshold+1);
                         if (count <= threshold) {
                                #printf("Filling at %d,%d - count = %d\n", lin, col, count);
                                RasterFloodFill(Result, lin, col, newValue);
                                }
                         }
                  }
           }
    CreateHistogram(Result);
    CreatePyramid(Result);
    


    RasterLinearCombination
    Creates Rasters that are linear combinations of input Rasters

    RasterLinearCombination(transformMat, outRVCFilename$, rasterNamePrefix$, rasterDescPrefix$, flags, inRas1, inRas2, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # creating and filling in the transform matrix
    #
    # the matrix size is determined by the number
    # of input and output rasters:
    # number of columns = number of input rasters + 1
    # number of rows = number of output rasters
    # column 1 hold offset coefficients
    # columns 2 to (N + 1) hold the coeffients for the N
    # output rasters
    # in general if:
    # N = number of output rasters, M = number of input rasters
    #
    # OutRasterN[r,c] =  transformMatrix[N-1,0]
    #                    + transformMatrix[N-1,1] *
    #                    InRaster1[r,c]
    #                    + transformMatrix[N-1,2] *
    #                    InRaster2[r,c]
    #                    + ...
    #                    + transformMatrix[N-1,M] *
    #                    InRasterM[r,c]
    #
    # our matrix will be:
    # | 0.0  .213  .715  .072 |  - coeff. for the first raster
    # | 0.0  .333  .333  .333 |  - coeff. for the second raster
    #
    # our output rasters are created using these formulas:
    #
    # Lcombo1[r,c] = 0.0 + (.213 * Rred[r,c])
    #                + (.715 * Rgreen[r,c])
    #                + (.072 + Rblue[r,c])
    #
    # Lcombo2[r,c] = 0.0 + (.333 * Rred[r,c])
    #                + (.333 * Rgreen[r,c])
    #                + (.333 + Rblue[r,c])
    #
    # Compute brightness Raster from rgb rasters
    # the coefficents are only approximate, correct for NTSC(1953)
    # declare variables
    class MATRIX transform;
    raster Rred, Rgreen, Rblue;
    # set up variables to hold values for flags
    numeric flagNoAutoscale = 0;
    numeric flagAutoscale = 1;
    string outRVCFile$ = "c:/tnt/win32/Tntdata/cb_data/cb_tm.rvc";
    # get the input rasters
    OpenRaster(Rred, outRVCFile$, "RED");
    OpenRaster(Rgreen, outRVCFile$, "GREEN");
    OpenRaster(Rblue, outRVCFile$, "BLUE");
    numeric numInputRasters = 3;
    numeric numOutputRasters = 2;
    transform = CreateMatrix(numOutputRasters, numInputRasters+1);
    # output Raster one
    # set matrix items (coefficients) equal to correct
    # red, green, and blue contributions to brightness
    SetMatrixItem(transform, 0, 0, 0.0); # sets offset to zero
    SetMatrixItem(transform, 0, 1, .212); # red
    SetMatrixItem(transform, 0, 2, .715); # green
    SetMatrixItem(transform, 0, 3, .072); # blue
    # output Raster two
    # other method to compute brightness - not as good
    # set coefficients for average of red, green, and blue
    # sets offset to zero
    SetMatrixItem(transform, 1, 0, 0.0);
    SetMatrixItem(transform, 1, 1, .333); # red
    SetMatrixItem(transform, 1, 2, .333); # green
    SetMatrixItem(transform, 1, 3, .333); # blue
    numeric flags = 0; # no auto scale
    RasterLinearCombination(transform, outRVCFile$,"Lcombo",
    "Linear Combinations Test :", flags, Rred, Rgreen, Rblue);
    DestroyMatrix(transform);
    CloseRaster(Rred);
    CloseRaster(Rgreen);
    CloseRaster(Rblue);
    


    RasterToBinaryViewshed
    Computes viewshed from elevation Raster object

    RasterToBinaryViewshed(inRaster, OutRaster, nPoints, xMatrix, yMatrix, percent, height, zScale, maxdistance, horizstart, horizend, vertstart, vertend, earth_curv, invert_transp)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # VIEWSHED.sml
    # Computes binary viewshed raster from elevation raster input
    # and vector object containing lines.
    # Computes viewshed for all vertices on all lines
    # of a corresponding Vector object
    # Could use to get viewshed for all points
    # on one or more roads.
    ### Declarations
    array numeric xArray[10];       # use to hold line vertices
    array numeric yArray[10];
    raster Rin, Rout;
    vector V;
    class GEOREF georefR, georefV;
    class TRANSPARM vecGeoToRastGeo; 
    numeric numLines, numPoints;
    numeric thisLine, numPointsInThisLine;
    class MATRIX matX, matY;
    numeric currentPoint, i;
    numeric xVector, yVector, rCol, rLine;
    class POINT2D vecMapCoord, rastMapCoord;
    numeric percent, height, zScale;
    ####
    clear();       # clear the console
    # get the input and output raster and Vector object
    GetInputRaster( Rin );
    GetInputVector( V );
    GetOutputRaster( Rout, NumLins( Rin ), NumCols( Rin ), "binary" );
    # get georef object id's for raster and vector
    georefR = GetLastUsedGeorefObject( Rin );
    georefV = GetLastUsedGeorefObject( V );
    vecGeoToRastGeo.InputProjection = georefV.Projection;
    vecGeoToRastGeo.OutputProjection = georefR.Projection;
    # first count total number of vertices in all lines
    numLines = NumVectorLines( V );
    numPoints = 0;
    for thisLine = 1 to numLines {
           numPointsInThisLine = GetVectorLinePointList( V, xArray, yArray, thisLine );
           numPoints += numPointsInThisLine;
           } 
    # now create matrices large enough to hold points
    matX = CreateMatrix(1, numPoints );
    matY = CreateMatrix(1, numPoints );
    # now loop through lines and fill in matrices with points
    currentPoint = 0;      # this will be our matrix index
    for thisLine = 1 to numLines {
           numPointsInThisLine = GetVectorLinePointList( V, xArray, yArray, thisLine );
           for i = 1 to numPointsInThisLine {
                  # convert vector object coordinates to map coordinates from its georef
                  ObjectToMap( V, xArray[i], yArray[i], georefV, xVector, yVector );
                  # convert vector map coordinates to map coordinates in raster's georef
                  vecMapCoord.x = xVector;              # first assign map coordinates to a Point class
                  vecMapCoord.y = yVector;              # required by TRANSPARM
                  # do conversion using method on class TRANSPARM
                  rastMapCoord = vecGeoToRastGeo.ConvertPoint2DFwd(vecMapCoord);
                  # convert vector coordinates to raster coordinates
                  # note the order of rCol and rLine
                  # col = x coord, row = y coord
                  MapToObject( georefR, rastMapCoord.x, rastMapCoord.y, Rin, rCol, rLine );
                  # force to upper left corner
                  rLine = floor( rLine ); 
                  rCol = floor( rCol );
                  # want matrix to index from zero to numPoints
                  SetMatrixItem( matX, 0, currentPoint, rCol );
                  SetMatrixItem( matY, 0, currentPoint, rLine );
                  currentPoint += 1;
                  } # end of for i
           } # end of for each line in V
           # set default values - want any one point to make "visible"
           percent = 100 / numPoints;
           height = 2;
           zScale = 1;
           # now create the viewshed Raster object
           RasterToBinaryViewshed(  Rin, Rout, numPoints, matX, matY, percent, height, zScale );
           # clean up
           GeorefFree( georefR );  # must free up id's
           GeorefFree( georefV );
           DestroyMatrix( matX );
           DestroyMatrix( matY );
           CloseRaster( Rin );
           CloseRaster( Rout );
    


    RastType
    Returns data type code of a raster object

    RastType(Raster)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    print(RastType(R));
    CloseRaster(R);
    


    ReadHistogram
    Read raster's histogram into array

    ReadHistogram(Raster, histo)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    array numeric histo[256];
    GetInputRaster(R, 0, 0, "8-bit unsigned");
    ReadHistogram(R, histo);
    numeric i;
    for i=0 to 255
           print(i, histo[i]);
    CloseRaster(R);
    


    ResampleRasterToCellSize
    Copies, transforms and resamples cells to new raster

    ResampleRasterToCellSize(InRast, OutRast, linscale, colscale, model$, method$, DEM, geoidHeight)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 20-May-2004
    修正日時: 20-May-2004
    TNTsml for Windows で使用可能: はい

    例:

    class RASTER Rin, Rout;
    # decrease resolution
    numeric scalefactor = .5;
    GetInputRaster(Rin);
    numeric outLins = NumLins(Rin) * scalefactor;  # inversely related to scale
    numeric outCols = NumCols(Rin) * scalefactor;
    GetOutputRaster(Rout, outLins, outCols, RastType(Rin));
    numeric outLinScale = LinScale(Rin) / scalefactor;     # double line scale
    numeric outColScale = ColScale(Rin) / scalefactor;
    ResampleRasterToCellSize(Rin, Rout, outLinScale, outColScale, "affine", "nearest");
    CloseRaster(Rin);
    CloseRaster(Rout);
    


    ResampleRasterToMatch
    Create a new raster

    ResampleRasterToMatch(InRast, RefRast, OutRast, model$, method$, DEM, geoidHeight)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 20-May-2004
    修正日時: 20-May-2004
    TNTsml for Windows で使用可能: はい

    例:

    raster Rin, Rref, Rout;
    GetInputRaster(Rin);
    GetInputRaster(Rref);
    numeric lin=NumLins(Rref);
    numeric col=NumCols(Rref);
    string type$=RastType(Rref);
    printf("Enter new null value: ");
    numeric newNull=input(255);
    GetOutputRaster(Rout, lin, col, type$);
    SetNull(Rout, newNull);
    string model$="affine";
    string method$="nearest neighbor";
    ResampleRasterToMatch(Rin, Rref, Rout, model$, method$);
    CloseRaster(Rin);
    CloseRaster(Rref);
    CloseRaster(Rout);
    


    SelectInputObject
    Popup dialog to select an object

    SelectInputObject(type$, prompt$, filename$, objname$)

    場所:

    パラメータ:

    戻り値

    作成日時: 18-Nov-1998
    修正日時: 17-May-2000
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    SetNull
    Assign NULL value of Raster to be x

    SetNull(Raster, nullvalue)

    場所:

    パラメータ:

    詳細と仮定

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R, 0, 0, "8-bit unsigned");
    numeric x=PopupNum("Enter integer.", 0, 0, 255, 0);
    SetNull(R, x);
    CloseRaster(R);
    


    SetScale
    Assign defined vertical and horizontal cell size

    SetScale(Raster, linscale, colscale)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R, 0, 0, "8-bit unsigned");
    numeric h, v;
    h=PopupNum("Enter h scale.", 0, 0, 255, 0);
    v=PopupNum("Enter v scale.", 0, 0, 255, 0);
    SetScale(R, h, v);
    CloseRaster(R);
    


    UnpackRGB
    Converts a composite raster cell value to a COLOR

    UnpackRGB(value, bits, order$)

    場所:

    パラメータ:

    戻り値

    作成日時: 09-Apr-2002
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    UseNull
    Recognize and use assigned NULL value of raster object

    UseNull(Raster, temporary)

    場所:

    パラメータ:

    詳細と仮定

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: 22-Mar-2005
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    if (PopupYesNo("Use the null value?", 1)) then
    UseNull(R);
    CloseRaster(R);
    


    Vector functions (48)

    CloseVector
    Close a Vector object.

    CloseVector(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);
    # do something with V
    CloseVector(V);
    


    CreateTempVector
    Create a temporary Vector object.

    CreateTempVector(Vector, flag1$, flag2$, extents)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 10-Apr-1998
    修正日時: 19-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    vector VTemp;
    CreateTempVector(VTemp);
    # do something with it
    CloseVector(VTemp);
    


    CreateVector
    Create a Vector without using a dialog using same flags as GetOutputVector().

    CreateVector(Vector, filename$, objname$, desc$, flag1$, flag2$, extents, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 07-May-1998
    修正日時: 19-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    vector Vpoly, Vplanar, Vnetwork, Vnotopo;
    CreateVector(Vpoly,    "c:/tnt/testCreateVector.rvc", "Vpoly",    "Polygonal",  "Polygonal");
    CreateVector(Vplanar,  "c:/tnt/testCreateVector.rvc", "Vplanar",  "Planar",     "Planar");
    CreateVector(Vnetwork, "c:/tnt/testCreateVector.rvc", "Vnetwork", "Network",    "Network");
    CreateVector(Vnotopo,  "c:/tnt/testCreateVector.rvc", "Vnotopo",  "NoTopology", "NoTopology");
    # Do something with one of the objects
    # add three points to the network vector
    VectorAddPoint(Vnetwork, 0, 0);
    VectorAddPoint(Vnetwork, 25, 25);
    VectorAddPoint(Vnetwork, 50, 50);
    # close the objects
    CloseVector(Vpoly);
    CloseVector(Vplanar);
    CloseVector(Vnetwork);
    CloseVector(Vnotopo);
    


    FindClosestLabel
    Find closest Vector label.

    FindClosestLabel(Vector, x, y, georef, maxdist, Distance)

    場所:

    パラメータ:

    戻り値

    作成日時: 22-Jun-1981
    修正日時: 24-Jun-1999
    TNTsml for Windows で使用可能: はい

    例:

    # Find the label closest to the 'object center'
    vector Vin;
    class Georef georef;
    GetInputVector(Vin);
    georef = GetGeorefObject(Vin);
    # find the x and y midpoint
    numeric xMin, xMax, yMin, yMax;
    GetObjectExtents(Vin, xMin, yMin, xMax, yMax, georef);
    numeric midX = (xMax + xMin)/2;
    numeric midY = (yMax + yMin)/2;
    numeric dist = xMax-midX;
    numeric numberLabels = NumVectorLabels(Vin);
    numeric labelnum = FindClosestLabel(Vin, midX, midY, georef, dist);
    print("number", numberLabels, "closest", labelnum);
    


    FindClosestLine
    Return line element closest to x,y coordinates

    FindClosestLine(Vector, x, y, georef, maxdist, Distance)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: 24-Jun-1999
    TNTsml for Windows で使用可能: はい

    例:

    vector Vvar;
    class Georef georef;
    clear();
    GetInputVector(Vvar);
    georef = GetGeorefObject(Vvar);
    print("Enter x.");
           numeric x = PopupNum("Enter x.");
    print("Enter y.");
           numeric y = PopupNum("Enter y.");
    print("Enter maxDistance.");
           numeric maxDistance = PopupNum("Enter maxDistance");
    numeric num = FindClosestLine(Vvar, x, y, georef, maxDistance);
    print(num);
    


    FindClosestNode
    Return node element closest to x,y coordinates

    FindClosestNode(Vector, x, y, georef, maxdist, Distance)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: 24-Jun-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    Vector Vvar;
    class Georef georef;
    GetInputVector(Vvar);
    georef = GetGeorefObject(Vvar);
    print("Enter x.");
           numeric x = PopupNum("Enter x.");
    print("Enter y.");
           numeric y = PopupNum("Enter y.");
    print("Enter maxDistance.");
           numeric maxDistance = PopupNum("Enter maxDistance.");
    numeric num=FindClosestNode(Vvar, x, y, georef, maxDistance);
    print(num);
    


    FindClosestPoint
    Return point element closest to x,y coordinates

    FindClosestPoint(Vector, x, y, georef, maxdist, Distance)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: 24-Jun-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    Vector Vvar;
    class Georef georef;
    GetInputVector(Vvar);
    georef = GetGeorefObject(Vvar);
    print("Enter x.");
           numeric x = PopupNum("Enter x.");
    print("Enter y.");
           numeric y = PopupNum("Enter y.");
    print("Enter maxDistance.");
           numeric maxDistance = PopupNum("Enter maxDistance.");
    numeric num = FindClosestPoint(Vvar, x, y, georef, maxDistance);
    print(num);
    


    FindClosestPoly
    Return polygon element closest to x,y coordinates

    FindClosestPoly(Vector, x, y, georef, maxdist, Distance)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: 24-Jun-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    Vector Vvar;
    class Georef georef;
    numeric x, y, maxDistance, num;
    GetInputVector(Vvar);
    georef = GetGeorefObject(Vvar);
    print("Enter x.");
           numeric x = PopupNum("Enter x.");
    print("Enter y.");
           numeric y = PopupNum("Enter y.");
    print("Enter maxDistance.");
           numeric maxDistance = PopupNum("Enter maxDistance.");
    numeric num=FindClosestPoly(Vvar, x, y, georef, maxDistance);
    print(num);
    


    GenerateCrossSection
    Generate a vector cross section

    GenerateCrossSection(polyline, srcObject, surfObject, destObject, baseValue, flags$)

    場所:

    パラメータ:

    戻り値

    作成日時: 23-Apr-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Vector src, dest;
    Raster surf;
    # set the base value
    numeric baseValue = 0;
    # get the input objects
    GetInputVector(src);
    GetInputRaster(surf);
    GetOutputVector(dest);
    # set up the polyline (w/ georeferenced pt coords)
    class POLYLINE polyline;
    numeric xmin, ymin, xmax, ymax;
    class GEOREF g = GetLastUsedGeorefObject(src);
    GetObjectExtents(src, xmin, ymin, xmax, ymax, g);
    # add the points to the polyline
    class POINT2D tmp;
    tmp.x = xmin; tmp.y = ymin;
    polyline.AppendVertex(tmp);
    tmp.x = xmax; tmp.y = ymax;
    polyline.AppendVertex(tmp);
    # do the cross section
    numeric err = GenerateCrossSection(polyline, src, surf, dest, baseValue, "NoGeoreference");
    PopupError(err);
    


    GetInputVector
    Use a File/Object selection dialog to select an input Vector

    GetInputVector(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector Vvar;
    GetInputVector(Vvar);
    # do something with it
    CloseVector(Vvar);
    


    GetInputVectorList
    Get multiple Vector objects.

    GetInputVectorList(VectorList, prompt$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/vector2raster.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GetOutputVector
    Open a vector object for use with vector toolkit funtions

    GetOutputVector(Vector, flag1$, flag2$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    array numeric xPoints[10], yPoints[10];
    # for multiple flags simply comma seperate them as below
    GetOutputVector(V, "VectorToolkit", "NoQtree,NoDBStatTable");
    # draw some boxes  - this will create polygons
    # all closed lines are converted to polygons
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 100;
    yPoints[2] = 0;
    xPoints[3] = 100;
    yPoints[3] = 100;
    xPoints[4] = 0;
    yPoints[4] = 100;
    xPoints[5] = 0;
    yPoints[5] = 0;
    VectorAddLine(V, 5, xPoints, yPoints);
    # now add some points
    numeric i;
    for i = 1 to 4 {
           VectorAddPoint(V, xPoints[i] + 150, yPoints[i] + 150);
           }
    numeric numPolys = NumVectorPolys(V);
    numeric numberPoints = NumVectorPoints(V);
    print("number of polygons, points: ", numPolys, numberPoints);
    


    GetVectorLine
    Returns the polyine given the line element number.

    GetVectorLine(Vectvar, element)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class POLYLINE pline;
    numeric linenum = 10;
    GetInputVector(V);
    pline = GetVectorLine(V, linenum);
    print("Length =",pline.ComputeLength());
    print("NumPts =",pline.GetNumPoints());
    if(pline.IsClosed())   print("The line is closed");
    else print("The line is not closed");
    


    GetVectorLinePointList
    Returns (via arrays 'xarray' and 'yarray', and optional 'zarray') a list of points in a line.

    GetVectorLinePointList(Vector, xarray, yarray, line, zarray)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric xArray[10], yArray[10], zArray[10]; # will be resized automatically
    vector Vvar;
    GetInputVector(Vvar);
    numeric numLines, nPoints;
    numLines = NumVectorLines(Vvar);
    nPoints = GetVectorLinePointList(Vvar, xArray, yArray, 1, zArray);
    numeric i;
    for i = 1 to nPoints {
           print(xArray[i], yArray[i], zArray[i]);
           }
    


    GetVectorNodeLineList
    Returns (via array 'lines') a list of lines attached to node.

    GetVectorNodeLineList(Vector, lines, node)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector Vvar;
    array numeric linelist[10]; # will be resized automatically
    GetVectorNodeLineList(Vvar, linelist, 1);
    


    GetVectorPoly
    Returns a polyine given the polygon element number.

    GetVectorPoly(Vectvar, element)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetVectorPolyAdjacentPolyList
    Returns list of all polygons that share a common line with a given polygon in a vector object

    GetVectorPolyAdjacentPolyList(Vector, polygonList, polygonNumber)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # reads the poly list of all adjacent polygons to a given polygon
    # it only returns polygons that have common lines !!!
    # not a single common node
    vector V;
    array numeric polygonList[10]; # array to hold poly list
    clear();
    GetInputVector(V);
    numeric polygonNumber = 150; # polygonNumber = 150 works for cb_soils/CBSOILS_Lite
    numeric numadjacent = GetVectorPolyAdjacentPolyList(V, polygonList, polygonNumber);
    string temp$ = "number of polygons adjacent to polygon:";
    print(temp$, polygonNumber, " = ", numadjacent);
    numeric i;
    for i = 1 to numadjacent {
           print(i, ":", polygonList[i]);
           }
    print("Done");
    


    GetVectorPolyIslandList
    Returns (via array 'islands') a list of islands of a polygon.

    GetVectorPolyIslandList(Vector, islands, polygon)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector Vvar;
    array numeric islandlist[10]; # will be resized automatically
    GetVectorPolyIslandList(Vvar, islandlist, 1);
    


    GetVectorPolyLineList
    Returns (via array 'lines') a list of lines forming a polygon

    GetVectorPolyLineList(Vector, lines, polygon)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector Vvar;
    array numeric linelist[10]; # will be resized automatically
    GetVectorPolyLineList(Vvar, linelist, 1);
    


    NumVectorLabels
    Returns number of labels in a vector object

    NumVectorLabels(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector Vin;
    GetInputVector(Vin);
    numeric numLabels = NumVectorLabels(Vin);
    print("number of labels: ", numLabels);
    


    NumVectorLines
    Returns number of lines in vector object

    NumVectorLines(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    GetInputVector(V);
    numeric n=NumVectorLines(V);
    print("Line count: ", n);
    


    NumVectorNodes
    Returns number of nodes in vector object

    NumVectorNodes(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    GetInputVector(V);
    numeric n=NumVectorNodes(V);
    print("Node count: ", n);
    


    NumVectorPoints
    Returns number of points in vector object

    NumVectorPoints(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    GetInputVector(V);
    numeric n=NumVectorPoints(V);
    print("Point count: ", n);
    


    NumVectorPolys
    Returns number of polygons in vector object

    NumVectorPolys(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    GetInputVector(V);
    numeric n=NumVectorPolys(V);
    print("Polygon count: ", n);
    


    OpenInputVectorList
    Open multiple Vector objects

    OpenInputVectorList(VectorList, filename1$, objname1$, filename2$, objname2$, ...$)

    場所:

    パラメータ:

    戻り値

    作成日時: 19-May-1998
    修正日時: 19-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    OpenVector
    Open a Vector without using a dialog using same flags as GetOutputVector().

    OpenVector(Vector, filename$, objname$, flag1$, flag2$, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    string fileName$ = "c:/tnt/data/cb_data/cb_soils.rvc";
    string objectName$ = "CBSOILS_Lite";
    # open the vector for editing with the toolkit
    OpenVector(V, fileName$, objectName$, "VectorToolkit");
    


    VectMerge
    Merge two or more Vector objects

    VectMerge(Obj1, Obj2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V1, V2, Vmerge;
    GetInputVector(V1);
    GetInputVector(V2);
    GetOutputVector(Vmerge);
    Vmerge = VectMerge(V1, V2);
    # get georef for merge
    class Georef georef;
    georef = GetLastUsedGeorefObject(V1);
    CopyGeorefToObject(Vmerge, georef);
    


    VectorAND
    Returns Vector that is the logical result of two input vectors

    VectorAND(OperatorVector, SourceVector, flags$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/vecop.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorCopyElements
    Returns Vector with elements from Source that meet the query selection criteria

    VectorCopyElements(SourceVector, DestVector, flags$, pointQuery$, lineQuery$, polyQuery$)

    場所:

    パラメータ:

    戻り値

    作成日時: 22-Mar-2004
    修正日時: 13-May-2004
    TNTsml for Windows で使用可能: はい

    例:

    vector V1, V2;
    GetInputVector(V1);
    GetOutputVector(V2);
    VectorCopyElements(V1, V2, "None","0","LINESTATS.Length>1000","0");
    #VectorCopyElements(V1, V2); # for a 'straight copy'
    


    VectorElementInRegion
    Tests a Vector element against a region.

    VectorElementInRegion(Region, Vectvar, element, ElemType$, TestType$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector Vin;
    region reg;
    GetInputVector(Vin);
    GetInputRegion(reg);
    numeric elementNumber = 1;
    numeric inRegion = VectorElementInRegion(reg.$Data, Vin, elementNumber, "line", "CompletelyInside");
    if (inRegion)
           print( "element ", elementNumber, "is CompletelyInside\n");
    


    VectorExists
    Determines if vector object exists in project file. Made obsolete by ObjectExists()

    VectorExists(filename$, objectname$, Credentials)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string file$="c:/tnt/data/sf_data/haywsoil.rvc";
    string ob$="hsoils";
    if (VectorExists(file$, ob$)) then
           print("Vector ", ob$, "Exists in ", file$);
    


    VectorExtract
    Returns Vector that is the result of the operator applied to the source

    VectorExtract(OperatorVector, SourceVector, operation, flags$, pointQuery$, lineQuery$, polyQuery$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector Voperator, Vsource, Vout1, Vout2;
    # get the input vectors
    GetInputVector(Voperator);
    GetInputVector(Vsource);
    # get the output vector
    GetOutputVector(Vout1);
    # use default flags
    string operation$ = "PartInside";
    Vout1 = VectorExtract(Voperator, Vsource, operation$);
    GetOutputVector(Vout2);
    operation$ = "CompInside";
    string flag$ = "TableRemoveDupRec,RemExRecords";
    # using optional flags (example showing two flags)
    Vout2 = VectorExtract(Voperator, Vout1, operation$, flag$);
    


    VectorIsEquivalent
    Determine if two Vector objects are equivalent

    VectorIsEquivalent(Vector1, Vector2)

    場所:

    パラメータ:

    戻り値

    作成日時: 23-Apr-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorLabelAddTextStyle
    Add a new TextStyle and assign this label to use it

    VectorLabelAddTextStyle(Vector, ElemNum, name$, TextStyle)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 28-Oct-2005
    修正日時: 28-Oct-2005
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorLabelGetBaseline
    Get the baseline of the label as a Polyline

    VectorLabelGetBaseline(Vector, ElemNum, Polyline, IsBaselineFit, IsBaselineSplineFit)

    場所:

    パラメータ:

    戻り値

    作成日時: 28-Oct-2005
    修正日時: 28-Oct-2005
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorLabelGetHeight
    Get the height of the label in object units

    VectorLabelGetHeight(Vector, ElemNum)

    場所:

    パラメータ:

    戻り値

    作成日時: 28-Oct-2005
    修正日時: 28-Oct-2005
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorLabelGetString
    Get the label text as a string

    VectorLabelGetString(Vector, ElemNum)

    場所:

    パラメータ:

    戻り値

    作成日時: 28-Oct-2005
    修正日時: 28-Oct-2005
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorLabelGetTextStyle
    Get the TextSyle object assosiated with the label

    VectorLabelGetTextStyle(Vector, ElemNum, TextStyle, name$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 28-Oct-2005
    修正日時: 28-Oct-2005
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorLabelSetBaseline
    Set the baseline of a label by a polyline

    VectorLabelSetBaseline(Vector, ElemNum, Polyline, BaselineFit$)

    場所:

    パラメータ:

    戻り値

    作成日時: 28-Oct-2005
    修正日時: 28-Oct-2005
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorLabelSetHeight
    Set the height of the label in object units

    VectorLabelSetHeight(Vector, ElemNum, Height)

    場所:

    パラメータ:

    戻り値

    作成日時: 28-Oct-2005
    修正日時: 28-Oct-2005
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorLabelSetString
    Set the text of the label using a string

    VectorLabelSetString(Vector, ElemNum, string$)

    場所:

    パラメータ:

    戻り値

    作成日時: 28-Oct-2005
    修正日時: 28-Oct-2005
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorLabelSetTextStyle
    Set the TextStyle that

    VectorLabelSetTextStyle(Vector, ElemNum, TextStyle)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 28-Oct-2005
    修正日時: 28-Oct-2005
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorOR
    Returns Vector that is the logical result of two input vectors

    VectorOR(OperatorVector, SourceVector, flags$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/vecop.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorReplace
    Returns Vector that is the logical result of two input vectors

    VectorReplace(OperatorVector, SourceVector, flags$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/vecop.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorSubtract
    Returns Vector that is the logical result of two input vectors

    VectorSubtract(OperatorVector, SourceVector, flags$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/vecop.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorToolkitInit
    Initialize an open Vector object for use with vector toolkit functions.

    VectorToolkitInit(Vector, flag2$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/addline.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorWarp
    Warp the SourceVector from the transparm's source to destination projection

    VectorWarp(SourceVector, DestVector, Transparm, DenseAccuracy)

    場所:

    パラメータ:

    戻り値

    作成日時: 04-May-2004
    修正日時: 13-May-2004
    TNTsml for Windows で使用可能: はい

    例:

    vector Vin, Vout;
    class TRANSPARM transparm;
    class GEOREF georef;
    class MAPPROJ inputProj, outputProj;
    GetInputVector(Vin);
    GetOutputVector(Vout);
    georef = GetLastUsedGeorefObject(Vin);
    inputProj = georef.Projection;
    outputProj.SetSystemUTM(13);
    outputProj.Datum = "North American 1927 - United States (NADCON)";
    transparm.InputProjection = inputProj;
    transparm.OutputProjection = outputProj;
    VectorWarp(Vin, Vout, transparm, 10);
    print("IN:", transparm.inputProjection.System);
    print("OUT:", transparm.outputProjection.System);
    


    VectorXOR
    Returns Vector that is the logical result of two input vectors

    VectorXOR(OperatorVector, SourceVector, flags$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/vecop.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    Object functions (29)

    CopyObject
    Copy object and all of its subobjects.

    CopyObject(srcfilename$, srcobjectnumber, destfilename$, parentobjectnumber, Credentials)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string srcfile$="/data/cb_data/cb_tm.rvc";
    string destfile$="/data/cb_data/temp.rvc";
    CopyObject(srcfile$, 1, destfile$, 1);
    


    CopyObjectWithoutSubobjects
    Same as CopyObject() except no subobjects are copied.

    CopyObjectWithoutSubobjects(srcfilename$, srcobjectnumber, destfilename$, parentobjectnumber, Credentials)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string srcfile$="/data/cb_data/cb_tm.rvc";
    string destfile$="/data/cb_data/temp.rvc";
    CopyObjectWithoutSubobjects(srcfile$, 1, destfile$, 1);
    


    CopySubobjects
    Copy subobjects from the source object to the destination object

    CopySubobjects(SourceObject, DestObject, type$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster A, B;
    GetInputRaster(A);
    GetOutputRaster(B, NumLins(A), NumCols(A), RastType(A));
    CopySubobjects(A, B);
    CloseRaster(A);
    CloseRaster(B);
    


    CreateProjectFile
    Create a project file

    CreateProjectFile(filename$, description$)

    場所:

    パラメータ:

    戻り値

    作成日時: 02-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    CreateProjectFile("c:/ProjName.rvc", "Project file created in SML");
    


    DeleteObject
    Deletes an object, (and all subobjects), by object number

    DeleteObject(filename$, objectnumber, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string fileName$="/data/cb_data/cb_tm.rvc";
    DeleteObject(fileName$, 1);
    


    DeleteSubobjects
    Deletes subobjects from raster

    DeleteSubobjects(Object, type$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rvar;
    DeleteSubobjects(Rvar, "Pyramid");
    


    DisableCredentialsPopup
    Disable the popup that pompts the user for the credential members.

    DisableCredentialsPopup(disable)

    場所:

    パラメータ:

    戻り値

    作成日時: 09-Dec-2005
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    FindInvalidObjects
    Search the rvc file for invalid objects

    FindInvalidObjects(filename$, doSubLevels, invalidList, singletonList, Credentials)

    場所:

    パラメータ:

    戻り値

    作成日時: 20-May-2004
    修正日時: 20-Dec-2005
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    proc printErrors(string file$, class STRINGLIST invalid, class STRINGLIST singleton)
    {
           print(file$);
           numeric numInvalid = invalid.GetNumItems();
           numeric numSingle = singleton.GetNumItems();
           numeric i=0;
           if (numInvalid > 0)
           {
                  print("INVALID:");
                  for (i=0; i 0)
           {
                  print("DUPLICATES:");
                  for (i=0; i


    GetAllObjectNames
    Get a list of all the object names in an RVC file

    GetAllObjectNames(filename$, type$, parent, notype, nopath, Credentials)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        Object filename
      string type$ (オプション)
        Object Type to filter for
        可能性のある値:
          "ALL"
            All objects
          "RASTER"
            Raster object
          "VECTOR"
            Vector object
          "CAD"
            CAD object
          "TIN"
            TIN object
          "SML"
            SML object
          "FOLDER"
            Folder
          "STYLE"
            Style object
          "DBASE"
            General database object
          "GEOREF"
            Georeference object
          "HISTO"
            Histogram object
          "RDBASE"
            Raster database object
          "PTDBAS"
            Vector point database object
          "LDBASE"
            Vector line database object
          "PDBASE"
            Vector polygon database object
          "NDBASE"
            Vector node database object
          "CDBASE"
            CAD database object
          "TDBASE"
            TIN database object
          "VDBASE"
            Vector database object
          "REGION"
            Region object
          "TABLE"
            Table object
      numeric parent (オプション)
        Parent object number (default is file)
      numeric notype (オプション)
        If 1 the return value does not include the object types. The default is 0.
      numeric nopath (オプション)
        If 1 the return value only has object name, not object path. The default is 1.
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

    作成日時: 09-Apr-2002
    修正日時: 22-Apr-2004
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class STRINGLIST objnames;
    objnames = GetAllObjectNames("c:/data/cb_data/cb_elev.rvc","Raster");
    numeric i;
    for i=0 to objnames.GetNumItems()-1 {
           print (objnames.GetString(i));
           }
    


    GetAllObjectNumbers
    Determines if object exists in project file

    GetAllObjectNumbers(filename$, array, object$, parent, Credentials)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string containing path and filename of the RVC file.
      array array
        Array to store the object numbers in.
      string object$ (オプション)
        Object Type to filter for
        可能性のある値:
          "ALL"
            All objects
          "RASTER"
            Raster object
          "VECTOR"
            Vector object
          "CAD"
            CAD object
          "TIN"
            TIN object
          "SML"
            SML object
          "FOLDER"
            Folder
          "STYLE"
            Style object
          "DBASE"
            General database object
          "GEOREF"
            Georeference object
          "HISTO"
            Histogram object
          "RDBASE"
            Raster database object
          "PTDBAS"
            Vector point database object
          "LDBASE"
            Vector line database object
          "PDBASE"
            Vector polygon database object
          "NDBASE"
            Vector node database object
          "CDBASE"
            CAD database object
          "TDBASE"
            TIN database object
          "VDBASE"
            Vector database object
          "REGION"
            Region object
          "TABLE"
            Table object
      numeric parent (オプション)
        Parent object number (optional - if omitted, will assume main level objects
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      numeric
      Number of object numbers in array.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    array numeric objnums[10];
    numeric max = GetAllObjectNumbers("c:/data/cb_data/cb_elev.rvc",objnums,"Raster");
    print(max);
    numeric i;
    for i=1 to max {
           print (objnums[i]);
           }
    


    GetObjectDescription
    Gets the description of an object by object number

    GetObjectDescription(filename$, objectnumber, Credentials)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string indicating path and project name
      numeric objectnumber
        A valid object number
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      string
      a string containing the name of the object, or "" if
      object not found

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string fileName$="/data/cb_data/cb_tm.rvc";
    GetObjectDescription(fileName$, 1);
    


    GetObjectExtents
    Returns the x and y extents for a CAD, TIN, vector, or raster object

    GetObjectExtents(Object, xMin, yMin, xMax, yMax, georef)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        A valid vector, CAD, raster, or TIN object
      numeric variable xMin
        Minimum x value returned
      numeric variable yMin
        Minimum y value returned
      numeric variable xMax
        Maximum x value returned
      numeric variable yMax
        Maximum y value returned
      class GEOREF georef (オプション)
        Optional - georef object (if not used values will be in object coordinates)

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V; # vector object
    class Georef vGeoref;
    GetInputVector(V);
    numeric xMin, yMin, xMax, yMax;
    GetObjectExtents(V, xMin, yMin, xMax, yMax);
    print("vector extents xMin, yMin, xMax, yMax");
    printf("%10.2f %10.2f %10.2f %10.2f \n", xMin, yMin, xMax, yMax);
    vGeoref = GetLastUsedGeorefObject(V);
    GetObjectExtents(V, xMin, yMin, xMax, yMax, vGeoref);
    print("vector extents xMin, yMin, xMax, yMax");
    printf("%10.2f %10.2f %10.2f %10.2f \n", xMin, yMin, xMax, yMax);
    


    GetObjectExtentsRegion
    Get the extents of an object as a region

    GetObjectExtentsRegion(Object, georef)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        A valid (Vector, CAD, Raster, or TIN object)
      class GEOREF georef (オプション)
        Optional georef object - if not used values will be in object coordinates

    戻り値

    作成日時: 16-Feb-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    region reg;
    class Georef georef;
    GetInputRaster(R);
    georef = GetLastUsedGeorefObject(R);
    reg = GetObjectExtentsRegion(R, georef);
    SaveRegion(reg, R.$Info.Filename, "region", R.$Info.Name + " extents region");
    


    GetObjectFileName
    Returns the path qualified RVC file name for an object.

    GetObjectFileName(Object)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        The afore-mentioned object

    戻り値

      string
      A string containing the path plus filename.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rin;
    vector Vin;
    tin TinIn;
    string str$;
    numeric objNum;
    GetInputRaster(Rin);
    # get the RVC file name
    str$ = GetObjectFileName(Rin);
    objNum = GetObjectNumber(Rin);
    print("Raster Object Number: ", objNum, "RVC file Name: ", str$);
    GetInputVector(Vin);
    # get the RVC file name
    str$ = GetObjectFileName(Vin);
    objNum = GetObjectNumber(Vin);
    print("Vector Object Number: ", objNum, "RVC file Name: ", str$);
    GetInputTIN(TinIn);
    # get the RVC file name
    str$ = GetObjectFileName(TinIn);
    objNum = GetObjectNumber(TinIn);
    print("TIN Object Number: ", objNum, "RVC file Name: ", str$);
    


    GetObjectName
    Gets the name of an object by object number

    GetObjectName(filename$, objectnumber, Credentials)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string indicating path and project name
      numeric objectnumber
        A valid object number
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      string
      a string containing the name of the object, or "" if object not found

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string fileName$="c:/data/cb_data/cb_tm.rvc";
    GetObjectName(fileName$, 1);
    


    GetObjectNumber
    Returns the object number for a Raster, Vector, TIN, or CAD object

    GetObjectNumber(inObject)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD inObject
        The Object

    詳細と仮定

      The object exists.

    戻り値

      numeric
      The object number.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    GetInputRaster(R);
    string fileName$=R.$Info.Filename;
    numeric objectNumber=GetObjectNumber(R);
    SetObjectDescription(fileName$, objectNumber, "A New Description");
    


    GetObjectSize
    Get the number of bytes in an object

    GetObjectSize(Object)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        The object

    戻り値

      numeric

    作成日時: 18-Dec-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetObjectZExtents
    Returns the z extents for a CAD, TIN, or vector object

    GetObjectZExtents(Object, zMin, zMax)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        A valid CAD, TIN, or vector object
      numeric variable zMin (オプション)
        Minimum z value returned
      numeric variable zMax (オプション)
        Maximum z value returned

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V; # vector object
    numeric zMin, zMax;
    GetInputVector(V);
    GetObjectZExtents(V, zMin, zMax);
    print("vector z extents - zMin, zMax");
    printf("%10.2f %10.2f \n", zMin, zMax);
    


    MakeRVCFolder
    Creates a folder in an RVC project.

    MakeRVCFolder(filename$, foldername$, description$, parentfolder$, Credentials)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        RVC project filename.
      string foldername$
        Name of folder to be created.
      string description$
        Description of folder.
      string parentfolder$ (オプション)
        (optional) Name of parent folder for creating a folder in a folder.
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      なし

    作成日時: 20-Jul-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    MakeRVCFolder("c:/tnt/testdata.rvc","NewFolder","A new folder","Users");
    


    ObjectExists
    Determines if object exists in project file

    ObjectExists(filename$, objectname$, type$, Credentials)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string containing path and filename
      string objectname$
        A string containing objects name
      string type$ (オプション)
        The object type (the default is "all")
        可能性のある値:
          "ALL"
            All objects
          "RASTER"
            Raster object
          "VECTOR"
            Vector object
          "CAD"
            CAD object
          "TIN"
            TIN object
          "SML"
            SML object
          "FOLDER"
            Folder
          "STYLE"
            Style object
          "DBASE"
            General database object
          "GEOREF"
            Georeference object
          "HISTO"
            Histogram object
          "RDBASE"
            Raster database object
          "PTDBAS"
            Vector point database object
          "LDBASE"
            Vector line database object
          "PDBASE"
            Vector polygon database object
          "NDBASE"
            Vector node database object
          "CDBASE"
            CAD database object
          "TDBASE"
            TIN database object
          "VDBASE"
            Vector database object
          "REGION"
            Region object
          "TABLE"
            Table object
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    詳細と仮定

      A blank object name ("") is used to determine if ANY objects of the given type exist.

    戻り値

      numeric
      1 if it exists, 0 if it doesn't

    作成日時: 24-Jun-1999
    修正日時: 28-Jan-2004
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string file$="c:/data/sf_data/haywsoil";
    string ob$="hsoils";
    if (ObjectExists(file$, ob$)) then
           print("Object", ob$, "Exists in", file$);
    else
           print("Object", ob$, "Does not exist in", file$);
    


    ObjectNumber
    Returns an object number used by several object and display functions

    ObjectNumber(filename$, objectname$, type$, Credentials)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string indicating path and project name
      string objectname$
        A string indicating name of object
      string type$
        - object type (see below)
        "FILE", File type
        "FOLDER", An object to contain other objects
        "RASTER", Raster object
        "VECTOR", VECTOR object
        "CAD", CAD object
        "DBASE", General/raster database
        "STYLE", Drawing style object
        "QUERY", Generic database query string
        "FILTER", Spatial filter description
        "VIDSEQ", Ref for sequence of frames on video disk
        "GEOREF", Georeference object
        "PAGELT", Information for page layouts
        "HYPER", Database referenced by HyperIndex
        "DBFORM", Database display layout
        "TPOINT", Tie point list
        "HISTO", Histogram object
        "CONTAB", Contrasting table
        "2DHIST", Information about 2-D histogram
        "COLMAP", Color table for rasters
        "RDBASE", Db record list for rasters
        "FPROC", Information to match frequency-domain rasters
        "RTREND", Trend Information
        "SPOTHR", Header (leader) file from SPOT tape
        "CAMERA", Camera calibration information
        "PTDBAS", Db record list for point elements
        "LDBASE", Db record list for line elements
        "PDBASE", Db record list for polygon elements
        "NDBASE", Db record list for node elements
        "CDBASE", Db record list for CAD object
        "COLBAL", Printer color balance
        "PRTDEF", Description for raster printer devices
        "PLOTDF", Description for pen plotter devices
        "OFONT", Outline (stroke) font
        "GENREF", Generic reference object, not user-viewable object
        "SCANRF", Description for scanners
        "XYDIG", Description for XY digitizer devices
        "D2DGRP", Display group layout information
        "D2DWIN", Display window layout information
        "TIN", TIN object
        "DPARM", Display parameter structure
        "LEGEND", Legend object
        "TEXT", Generic Text Object
        "TDBASE", Database for TIN objects
        "VDBASE", Database for vector objects
        "REGION", REGION object
        "ASSOC", External file association object
        "QTREE", Search Quad Tree object
        "DBPARM", Database parameters object
        "THEME", Theme Mapping parameters object
        "METADT", Metadata object - text
        "TABLE", Table OTYPE tag for databases
        "INVDBL", Database table to element lists
        "EDPARM", Object Editor parameter structure
        "DLAYOT", Display layout information
        "SML", Stand-alone SML Script
        "SPECT", Spectral object
        "RASTST", Raster Set object
        "SENSOR", Sensor calibration information for spectral bands
        "DSIM3D", Display 3D simulation parameters object
        "HYPSPC", HyperSpectral object
        "DBCONS", Database table constraint information
        可能性のある値:
          "ALL"
            All objects
          "RASTER"
            Raster object
          "VECTOR"
            Vector object
          "CAD"
            CAD object
          "TIN"
            TIN object
          "SML"
            SML object
          "FOLDER"
            Folder
          "STYLE"
            Style object
          "DBASE"
            General database object
          "GEOREF"
            Georeference object
          "HISTO"
            Histogram object
          "RDBASE"
            Raster database object
          "PTDBAS"
            Vector point database object
          "LDBASE"
            Vector line database object
          "PDBASE"
            Vector polygon database object
          "NDBASE"
            Vector node database object
          "CDBASE"
            CAD database object
          "TDBASE"
            TIN database object
          "VDBASE"
            Vector database object
          "REGION"
            Region object
          "TABLE"
            Table object
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    詳細と仮定

      returns 0 if no valid object found

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string fileName$="/data/cb_data/cb_tm.rvc";
    string obname$="TM_2";
    numeric objectNumber=ObjectNumber(fileName$, obname$, "raster");
    GetObjectDescription(fileName$, objectNumber);
    


    PackRVC
    Compresses the rvc file eliminating unused space

    PackRVC(filename$)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        The rvc file to compress

    戻り値

      numeric

    作成日時: 06-Feb-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ProjectFileIsLocked
    Returns true if the Project file is locked

    ProjectFileIsLocked(filename$)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        Filename of the project file

    戻り値

      numeric

    作成日時: 21-Jun-2005
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ReadMetaData
    Returns an object's metadata as a string

    ReadMetaData(Object)

    場所:

      オブジェクト

    パラメータ:

    戻り値

      string

    作成日時: 05-Jan-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    Vector V;
    GetInputVector(V);
    WriteMetaData(V, "Some importantant Information about this Vector object");
    string metadata$ = ReadMetaData(V);
    print(metadata$);
    


    RecoverProjectFile
    Recover project file copying to a new file

    RecoverProjectFile(infilename$, outfilename$, outfiledesc$, log$, Credentials)

    場所:

      オブジェクト

    パラメータ:

      string infilename$
        The source file to copy from
      string outfilename$
        The destination file to copy to (must be a new file)
      string outfiledesc$
        The output file description
      string log$
        Log of actions performed by the recover process
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      numeric
      0 if rvc file has no errors, 1 if errors exist, a number <0 if an error occurred

    作成日時: 24-May-2004
    修正日時: 20-Dec-2005
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string infile$ = GetInputFileName("", "Select File to perform recovery on:", ".rvc");
    string outfile$ = "C:/cleaned/cb_soils.rvc";
    string desc$ = "desc";
    class FILE logFile;
    string log$;
    logFile = fopen("C:/log.txt", "w");
    numeric err = RecoverProjectFile(infile$, outfile$, desc$, log$);
    print(err);
    fwritestring(logFile, log$);
    


    SetObjectDescription
    Changes the description of an object

    SetObjectDescription(filename$, objectnumber, string$, Credentials)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string indicating path and project name
      numeric objectnumber
        A valid object number
      string string$
        A string indicating the new object description
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    GetInputRaster(R);
    string fileName$=R.$Info.Filename;
    numeric objectNumber=GetObjectNumber(R);
    SetObjectDescription(fileName$, objectNumber, "A New Description");
    


    SetObjectName
    Change the object name of an existing object

    SetObjectName(Object, NewName$)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        The object to change
      string NewName$
        The new object name

    戻り値

      なし

    作成日時: 15-Sep-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    SubObjectNumber
    Returns an object number used by several object and display functions (similar to GetObjectNumber() but looks under "parent" object for valid subobject)

    SubObjectNumber(filename$, parentobjectnumber, objectname$, type$, Credentials)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string indicating path and project name
      numeric parentobjectnumber
        A valid object number
      string objectname$
        A string indicating name of subobject (pass "*" to get the last used subobject)
      string type$
        - object type (see below)
        "FILE", File type
        "FOLDER", An object to contain other objects
        "RASTER", Raster object
        "VECTOR", VECTOR object
        "CAD", CAD object
        "DBASE", General/raster database
        "STYLE", Drawing style object
        "QUERY", Generic database query string
        "FILTER", Spatial filter description
        "VIDSEQ", Ref for sequence of frames on video disk
        "GEOREF", Georeference object
        "PAGELT", Information for page layouts
        "HYPER", Database referenced by HyperIndex
        "DBFORM", Database display layout
        "TPOINT", Tie point list
        "HISTO", Histogram object
        "CONTAB", Contrasting table
        "2DHIST", Information about 2-D histogram
        "COLMAP", Color table for rasters
        "RDBASE", DB record list for rasters
        "FPROC", Information to match frequency-domain rasters
        "RTREND", Trend Information
        "SPOTHR", Header (leader) file from SPOT tape
        "CAMERA", Camera calibration information
        "PTDBAS", DB record list for point elements
        "LDBASE", DB record list for line elements
        "PDBASE", DB record list for polygon elements
        "NDBASE", DB record list for node elements
        "CDBASE", DB record list for CAD object
        "COLBAL", Printer color balance
        "PRTDEF", Description for raster printer devices
        "PLOTDF", Description for pen plotter devices
        "OFONT", Outline (stroke) font
        "GENREF", Generic reference object, not user-viewable object
        "SCANRF", Description for scanners
        "XYDIG", Description for XY digitizer devices
        "D2DGRP", Display group layout information
        "D2DWIN", Display window layout information
        "TIN", TIN object
        "DPARM", Display parameter structure
        "LEGEND", Legend object
        "TEXT", Generic Text Object
        "TDBASE", Database for TIN objects
        "VDBASE", Database for vector objects
        "REGION", REGION object
        "ASSOC", External file association object
        "QTREE", Search Quad Tree object
        "DBPARM", Database parameters object
        "THEME", Theme Mapping parameters object
        "METADT", Metadata object - text
        "TABLE", Table OTYPE tag for databases
        "INVDBL", Database table to element lists
        "EDPARM", Object Editor parameter structure
        "DLAYOT", Display layout information
        "SML", Stand-alone SML Script
        "SPECT", Spectral object
        "RASTST", Raster Set object
        "SENSOR", Sensor calibration information for spectral bands
        "DSIM3D", Display 3D simulation parameters object
        "HYPSPC", HyperSpectral object
        可能性のある値:
          "ALL"
            All objects
          "RASTER"
            Raster object
          "VECTOR"
            Vector object
          "CAD"
            CAD object
          "TIN"
            TIN object
          "SML"
            SML object
          "FOLDER"
            Folder
          "STYLE"
            Style object
          "DBASE"
            General database object
          "GEOREF"
            Georeference object
          "HISTO"
            Histogram object
          "RDBASE"
            Raster database object
          "PTDBAS"
            Vector point database object
          "LDBASE"
            Vector line database object
          "PDBASE"
            Vector polygon database object
          "NDBASE"
            Vector node database object
          "CDBASE"
            CAD database object
          "TDBASE"
            TIN database object
          "VDBASE"
            Vector database object
          "REGION"
            Region object
          "TABLE"
            Table object
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    詳細と仮定

      Useful for finding subobjects like histograms and georeference objects.

    戻り値

      numeric
      a number indicating the object number, or a negative number if no such object

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    GetInputRaster(R);
    string fileName$=R.$Info.Filename;
    numeric objectNumber=GetObjectNumber(R);
    numeric subobjectNumber=SubObjectNumber(fileName$, objectNumber,"HISTOGRAM","HISTO");
    #DeleteObject(fileName$, subobjectNumber); # delete histogram
    print(subobjectNumber);
    


    WriteMetaData
    Writes metadata to an object

    WriteMetaData(Object, metaData$)

    場所:

      オブジェクト

    パラメータ:

      class RVC_GEOSPATIAL Object
        The Object
      string metaData$
        The contents of the meta data to write

    戻り値

      なし

    作成日時: 05-Jan-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    Vector V;
    GetInputVector(V);
    WriteMetaData(V, "Some importantant Information about this Vector object");
    string metadata$ = ReadMetaData(V);
    print(metadata$);
    


    AddMatrix(matOut, matLeft, matRight)

    場所:

    パラメータ:

      class MATRIX matOut
        The output matrix returned
      class MATRIX matLeft
        The matrix to add
      class MATRIX matRight
        The matrix to add

    詳細と仮定

      All matrices have been created with CreateMatrix() and have not destroyed. All matrices are the same size.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1, h2, h3;
    h1 = CreateMatrix(2, 2); # create three matrices
    h2 = CreateMatrix(2, 2);
    h3 = CreateMatrix(2, 2);
    # fill the matrices with some values
    numeric r,c,a;
    for r = 0 to 1 {
           for c = 0 to 1 {
                  SetMatrixItem(h1, r, c, r + c);
                  SetMatrixItem(h2, r, c, (r + c) * 2);
                  SetMatrixItem(h3, r, c, (r + c) * 3);
                  }
           }
    # now add h1 to h2, result is h3
    AddMatrix(h3, h1, h2);
    # print the resulting matrix h3
    print("add h1 + h2");
    for r = 0 to 1 {
           for c = 0 to 1 {
                  a = GetMatrixItem(h3, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    # destroy the matrices
    DestroyMatrix(h1);
    DestroyMatrix(h2);
    DestroyMatrix(h3);
    


    AddMatrixScaler
    Adds scalar to each element of a matrix

    AddMatrixScaler(matrix, value)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        The output matrix returned
      numeric value
        The scalar value to add to each element

    詳細と仮定

      The matrix has been created with CreateMatrix() and not destroyed.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    numeric r,c,a;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrix with some values
    for r = 0 to 1 {
           for c = 0 to 1 {
                  SetMatrixItem(h1, r, c, r + c);
                  }
           }
    # print the matrix
    print("original matrix");
    for r = 0 to 1 {
           for c = 0 to 1 {
                  a = GetMatrixItem(h1, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    AddMatrixScaler(h1, 100.0); # add 100.0 to each element
    # print the resulting matrix
    print("after adding 100.0 to each element");
    for r = 0 to 1 {
           for c = 0 to 1 {
                  a = GetMatrixItem(h1, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    # destroy the matrix
    DestroyMatrix(h1);
    


    CreateMatrix
    Creates a matrix - returns a valid matrix handle

    CreateMatrix(numRows, numCols)

    場所:

      マトリックス

    パラメータ:

      numeric numRows
        The row size of the matrix to create
      numeric numCols
        The column size of the matrix to create

    詳細と仮定

      This function must be called before any other functions that take matrices as input.

    戻り値

      class MATRIX
      A valid matrix handle

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    numeric r,c,a;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrices with some values
    for r = 0 to 1 {
           for c = 0 to 1 {
                  SetMatrixItem(h1, r, c, r + c);
                  }
           }
    print("Printing the matrix:"); # print the matrix
    for r = 0 to 1 {
           for c = 0 to 1 {
                  a = GetMatrixItem(h1, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    # destroy the matrix
    DestroyMatrix(h1);
    


    DestroyMatrix
    Destroys a previously created matrix

    DestroyMatrix(matrix)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        A valid matrix handle

    詳細と仮定

      The matrix has been created with CreateMatrix() and not previously destroyed.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    h1 = CreateMatrix(2, 2); # create a matrix
    numeric r,c,a;
    # fill the matrices with some values
    for r = 0 to 1 {
           for c = 0 to 1 {
                  SetMatrixItem(h1, r, c, r + c);
                  }
           }
    print("Printing the matrix:");
    # print the matrix
    for r = 0 to 1 {
           for c = 0 to 1 {
                  a = GetMatrixItem(h1, r, c);
                  printf("%8.4f ", a);
                  }
    print();
    }
    # destroy the matrix
    DestroyMatrix(h1);
    


    GetMatrixColSize
    Returns the number of columns in a matrix

    GetMatrixColSize(matrix)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        A valid matrix handle

    詳細と仮定

      The matrix has been created with CreateMatrix() and not previously destroyed.

    戻り値

      numeric
      The number of columns in the matrix.

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # proc printMatrixToConsole(matHandle, formatStr$)
    #
    # procedure to print out a matrix to console - row major order
    # parameters:
    #    matHandle   a matrix handle
    #    format$     string to control output format
    #
    proc printMatrixToConsole(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of code
    clear();
    class MATRIX h1;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrix with some values
    numeric r, c;
    for r = 0 to 1 {
           for c = 0 to 1 {
                  SetMatrixItem(h1, r, c, r + c);
                  }
           }
    # call procedure printMatrixToConsole()
    printMatrixToConsole(h1, "%8.4f ");
    # destroy the matrix
    DestroyMatrix(h1);
    


    GetMatrixItem
    Returns value of matrix element

    GetMatrixItem(matrix, row, col)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        A valid matrix handle
      numeric row
        The row number
      numeric col
        The column number

    詳細と仮定

      The matrix has been created with CreateMatrix() and not previously destroyed.

    戻り値

      numeric
      Value of matrix[row, column]

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # proc printMatrixToConsole(matHandle, formatStr$)
    #
    # procedure to print out a matrix to console - row major order
    # parameters:
    #    matHandle   a matrix handle
    #    format$     string to control output format
    #
    proc printMatrixToConsole(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of code
    clear();
    class MATRIX h1;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrix with some values
    numeric r, c;
    for r = 0 to 1 {
           for c = 0 to 1 {
                  SetMatrixItem(h1, r, c, r + c);
                  }
           }
    # call procedure printMatrixToConsole()
    printMatrixToConsole(h1, "%8.4f ");
    # destroy the matrix
    DestroyMatrix(h1);
    


    GetMatrixRowSize
    Returns the number of rows in a matrix

    GetMatrixRowSize(matrix)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        A valid matrix handle

    詳細と仮定

      The matrix has been created with CreateMatrix() and not previously destroyed.

    戻り値

      numeric
      The number of columns in the matrix.

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # proc printMatrixToConsole(matHandle, formatStr$)
    #
    # procedure to print out a matrix to console - row major order
    # parameters:
    #    matHandle   a matrix handle
    #    format$     string to control output format
    #
    proc printMatrixToConsole(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of code
    clear();
    class MATRIX h1;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrix with some values
    numeric r, c;
    for r = 0 to 1 {
           for c = 0 to 1 {
                  SetMatrixItem(h1, r, c, r + c);
                  }
           }
    # call procedure printMatrixToConsole()
    printMatrixToConsole(h1, "%8.4f ");
    # destroy the matrix
    DestroyMatrix(h1);
    


    InvertMatrix
    Inverts a matrix

    InvertMatrix(matOut, matIn)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matOut
        The inverse of the input matrix
      class MATRIX matIn
        The matrix to invert

    詳細と仮定

      The matrix has been created with CreateMatrix() and not previously destroyed. The matrices are the same size and the input matrix has an inverse.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # proc printMatrixToConsole(matHandle, formatStr$)
    #
    # procedure to print out a matrix to console - row major order
    # parameters:
    #    matHandle   a matrix handle
    #    format$     string to control output format
    #
    proc printMatrixToConsole(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of program
    clear();
    class MATRIX h1, h2, h3;
    h1 = CreateMatrix(2, 2); # create three matrices
    h2 = CreateMatrix(2, 2);
    h3 = CreateMatrix(2, 2);
    # fill the matrices values known to produce matrix
    # with an inverse
    SetMatrixItem(h1, 0, 0, 1.0);
    SetMatrixItem(h1, 0, 1, 2.0);
    SetMatrixItem(h1, 1, 0, 3.0);
    SetMatrixItem(h1, 1, 1, 4.0);
    # print the resulting matrix
    print("matrix before inverse");
    printMatrixToConsole(h1, "%8.4f ");
    # now calculate the inverse of h1
    InvertMatrix(h2, h1);
    # print the inverse matrix
    # result should be | -2.0  1.0 |
    #                  |  1.5  -.5 |
    print("matrix after inverse");
    printMatrixToConsole(h2, "%8.4f ");
    # now multiply matrix 1 by it's inverse
    # result matrix h3 should be identity matrix
    MultiplyMatrix(h3, h1, h2);
    print("matrix times its inverse");
    printMatrixToConsole(h3, "%8.4f ");
    # destroy the matrices
    DestroyMatrix(h1);
    DestroyMatrix(h2);
    DestroyMatrix(h3);
    


    MultiplyMatrix
    Multiplies two matrices - (matrixOut = matrixLeft * matrixRight)

    MultiplyMatrix(matOut, matLeft, matRight)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matOut
        The output matrix returned
      class MATRIX matLeft
        The matrix to premultiply with
      class MATRIX matRight
        The matrix to post multiply with

    詳細と仮定

      The matrix has been created with CreateMatrix() and not previously destroyed. All matrices are the same size.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # proc printMatrixToConsole(matHandle, formatStr$)
    #
    # procedure to print out a matrix to console - row major order
    # parameters:
    #    matHandle   a matrix handle
    #    format$     string to control output format
    #
    proc printMatrixToConsole(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of program
    clear();
    class MATRIX h1, h2, h3;
    h1 = CreateMatrix(2, 2); # create three matrices
    h2 = CreateMatrix(2, 2);
    h3 = CreateMatrix(2, 2);
    # create a matrix to test
    # result should be | 1  2 |
    #                  | 3  4 |
    SetMatrixItem(h1, 0, 0, 1.0);
    SetMatrixItem(h1, 0, 1, 2.0);
    SetMatrixItem(h1, 1, 0, 3.0);
    SetMatrixItem(h1, 1, 1, 4.0);
    # print the resulting matrix
    print("Original matrix:");
    printMatrixToConsole(h1, "%8.4f ");
    # create an identity matrix
    # result should be | 1  0 |
    #                  | 0  1 |
    SetMatrixItem(h2, 0, 0, 1.0);
    SetMatrixItem(h2, 0, 1, 0.0);
    SetMatrixItem(h2, 1, 0, 0.0);
    SetMatrixItem(h2, 1, 1, 1.0);
    # print the resulting matrix
    print("Identity matrix:");
    printMatrixToConsole(h2, "%8.4f ");
    # now multiply h1 by the h2 (identity matrix)
    # result in h3
    MultiplyMatrix(h3, h2, h1);
    # print the result - should be same as original
    print("Matrix after multiplication by identity:");
    printMatrixToConsole(h3, "%8.4f ");
    # destroy the matrices
    DestroyMatrix(h1);
    DestroyMatrix(h2);
    DestroyMatrix(h3);
    


    MultiplyMatrixScaler
    Multiplies each element of a matrix by a scaler

    MultiplyMatrixScaler(matrix, value)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        The output matrix returned
      numeric value
        The scaler value to multiply each element by

    詳細と仮定

      The matrix has been created with CreateMatrix() and not destroyed.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrix with some values
    numeric r,c,a;
    for r = 0 to 1 {
           for c = 0 to 1 {
                  SetMatrixItem(h1, r, c, r + c);
                  }
           }
    # print the matrix
    print("original matrix");
    for r = 0 to 1 {
           for c = 0 to 1 {
                  a = GetMatrixItem(h1, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    # multiply each element by 100.0
    MultiplyMatrixScaler(h1, 100.0);
    # print the resulting matrix
    print("After multiplying each element by 100.0");
    for r = 0 to 1 {
           for c = 0 to 1 {
                  a = GetMatrixItem(h1, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    # destroy the matrix
    DestroyMatrix(h1);
    


    SetMatrixItem
    Sets the element of a matrix to a value.

    SetMatrixItem(matrix, row, col, value)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        A valid matrix handle
      numeric row
        The row number
      numeric col
        The column number
      numeric value
        The value to set the element to

    詳細と仮定

      The matrix has been created with CreateMatrix() and not previously destroyed.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    numeric r,c,a;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrix with some values
    for r = 0 to 1 {
           for c = 0 to 1 {
                  SetMatrixItem(h1, r, c, r + c);
                  }
           }
    # print the matrix
    print("The matrix:");
    for r = 0 to 1 {
           for c = 0 to 1 {
                  a = GetMatrixItem(h1, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    # destroy the matrix
    DestroyMatrix(h1);
    


    SubMatrix
    Subtracts two matrices - (matrixOut = matrixLeft - matrixRight)

    SubMatrix(matOut, matLeft, matRight)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matOut
        The output matrix returned
      class MATRIX matLeft
        The matrix to subtract from
      class MATRIX matRight
        The matrix to subtract

    詳細と仮定

      The matrix has been created with CreateMatrix() and not previously destroyed. All matrices are the same size.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1, h2, h3;
    h1 = CreateMatrix(2, 2); # create three matrices
    h2 = CreateMatrix(2, 2);
    h3 = CreateMatrix(2, 2);
    # fill the matrices with some values
    numeric r,c,a;
    for r = 0 to 1 {
           for c = 0 to 1 {
                  SetMatrixItem(h1, r, c, r + c);
                  SetMatrixItem(h2, r, c, (r + c) * 2);
                  SetMatrixItem(h3, r, c, (r + c) * 3);
                  }
           }
    # now subtract h2 from h1, result is h3
    SubMatrix(h3, h1, h2);
    print("Subtract h2 from h1");
    # print the resulting matrix h3
    for r = 0 to 1 {
           for c = 0 to 1 {
                  a = GetMatrixItem(h3, r, c);
                  printf("%8.4f ", a);
                  }
           print();
           }
    # destroy the matrices
    DestroyMatrix(h1);
    DestroyMatrix(h2);
    DestroyMatrix(h3);
    


    TransposeMatrix
    Transposes rows and columns of a matrix

    TransposeMatrix(matOut, matIn)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matOut
        The output matrix returned
      class MATRIX matIn
        The matrix to transpose

    詳細と仮定

      The matrices have been created with CreateMatrix() and have not destroyed. The matrices are the same size.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # proc printMatrixToConsole (matHandle, formatStr$)
    #
    # procedure to print out a matrix to console - row
    # major order
    # parameters:
    #    matHandle   a matrix handle
    #    format$     string to control output format
    #
    proc printMatrixToConsole(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of program
    clear();
    class MATRIX h1, h2;
    h1 = CreateMatrix(2, 2); # create two matrices
    h2 = CreateMatrix(2, 2);
    # fill the matrix with some values
    SetMatrixItem(h1, 0, 0, 1.0);
    SetMatrixItem(h1, 0, 1, 2.0);
    SetMatrixItem(h1, 1, 0, 3.0);
    SetMatrixItem(h1, 1, 1, 4.0);
    # print the resulting matrix
    # result should be | 1  2 |
    #                  | 3  4 |
    print("matrix before transpose");
    printMatrixToConsole(h1, "%8.4f ");
    # now calculate the transpose of h1
    TransposeMatrix(h2, h1);
    # print the inverse matrix
    # result should be | 1  3 |
    #                  | 2  4 |
    print("matrix after transpose");
    printMatrixToConsole(h2, "%8.4f ");
    # destroy the matrices
    DestroyMatrix(h1);
    DestroyMatrix(h2);
    


    CopyGeorefToObject(Object, georef)

    場所:

    パラメータ:

    詳細と仮定

      When copying a georef to a vector object which has been opened for Vector Toolkit, you need to close the vector before copying the georef. This function is used to specify that a vector, CAD or TIN has a particular implied georeference. Don't try to use it with a raster - it won't work. Rasters can't have implied georeferences. If you just want to copy a georeference, use CopySubobjects() instead.

    戻り値

      なし

    作成日時: 18-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V1, V2, Vmerge;
    GetInputVector(V1);
    GetInputVector(V2);
    GetOutputVector(Vmerge);
    Vmerge = VectMerge(V1, V2);
    # get georef for merge
    class Georef georef;
    georef = GetLastUsedGeorefObject(V1);
    CopyGeorefToObject(Vmerge, georef);
    


    CreateControlPointGeoref
    Creates a control point georeference object.

    CreateControlPointGeoref(Object, numberPoints, xSource, ySource, zSource, xDestination, yDestination, zDestination, xSourceAccuracy, ySourceAccuracy, zSourceAccuracy, xDestinationAccuracy, yDestinationAccuracy, zDestinationAccuracy, refsys)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid (raster, vector, CAD, or TIN object
      numeric numberPoints
        Number of control points
      array xSource
        One dimensional array of source x coordinates
      array ySource
        One dimensional array of source y coordinates
      array zSource
        One dimensional array of source z coordinates
      array xDestination
        One dimensional array of destination x coordinates
      array yDestination
        One dimensional array of destination y coordinates
      array zDestination (オプション)
        One dimensional array of destination z coordinates
      array xSourceAccuracy (オプション)
        Optional - one dimensional array of source x accuracy
      array ySourceAccuracy (オプション)
        Optional - one dimensional array of source y accuracy
      array zSourceAccuracy (オプション)
        Optional - one dimensional array of source z accuracy
      array xDestinationAccuracy (オプション)
        Optional - one dimensional array of destination x accuracy
      array yDestinationAccuracy (オプション)
        Optional - one dimensional array of destination y accuracy
      array zDestinationAccuracy (オプション)
        Optional - one dimensional array of destination z accuracy
      class SR_COORDREFSYS refsys (オプション)
        The coordinate reference system

    詳細と仮定

      You must have a minumum of three non-collinear points

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # SML script to demonstrate creation of georef object in SML
    #
    # 1. opens a raster - cb_tm/blue
    # 2. creates a new vector object and draws a box
    # 3. georeferences the vector so that it bounds the raster
    #
    # NOTES:
    # 1. you must use a minimum of three control points
    # 2. they must not be all on the same line!
    #
    #################################################################
    # alternate method to get extents of object
    #
    # can use this in general - if last parm is omitted then
    # returns object coordinates
    #
    # rgeoref = GetLastUsedGeorefObject(Rin)
    # GetObjectExtents(Rin, rxMin, ryMin, rxMax, ryMax, rgeoref)
    #
    # now do same for vector except do not use georef parm
    # this will give object coordinates
    # GetObjectExtents(Vout, vxMin, vyMin, vxMax, vyMax)
    #
    #################################################################
    # the source arrays will hold the object coordinates
    # for a raster this would be cell values
    # for vector, CAD, TIN it would be object, (non-georeferenced),
    # coordinates
    array numeric xsrc[5], ysrc[5], zsrc[5];
    # the destination arrays will hold the appropriate,
    # (georeferenced), values
    array numeric xdest[5], ydest[5], zdest[5];
    # arrays to hold vector points to draw box
    array numeric xpoints[10];
    array numeric ypoints[10];
    # fill in the control points (source and destination)
    # need a minimum of three
    # we will assume a georeferenced raster and a non-georeferenced
    # vector that we wish to georeference to the raster
    clear();
    raster Rin;
    vector Vout;
    class Georef rgeoref;
    # get the raster and vector
    GetInputRaster(Rin);
    # get number of lines and columns
    numeric numlines = NumLins(Rin);
    numeric numcols = NumCols(Rin);
    # get the upper left (UL), lower right (LR)
    # upper right (UR), and lower left (LL) coordinates
    numeric xUL, yUL, xLR, yLR, xUR, yUR, xLL, yLL;
    rgeoref = GetLastUsedGeorefObject(Rin);
    ObjectToMap(Rin, 1, 1, rgeoref, xUL, yUL);
    ObjectToMap(Rin, numcols+1, numlines+1, rgeoref, xLR, yLR);
    ObjectToMap(Rin, numcols+1, 1, rgeoref, xUR, yUR);
    ObjectToMap(Rin, 1, numlines+1, rgeoref, xLL, yLL);
    printf("UL: %7.2f %7.2f\n", xUL, yUL);
    printf("UR: %7.2f %7.2f\n", xUR, yUR);
    printf("LL: %7.2f %7.2f\n", xLL, yLL);
    printf("LR: %7.2f %7.2f\n", xLR, yLR);
    # create a new vector here !!!!
    # we will draw a box and match it to the raster
    GetOutputVector(Vout, "VectorToolkit");
    # draw the box - this will create a polygon
    # fill in the points
    xpoints[1] = 0;
    ypoints[1] = 0;
    xpoints[2] = 100;
    ypoints[2] = 0;
    xpoints[3] = 100;
    ypoints[3] = 100;
    xpoints[4] = 0;
    ypoints[4] = 100;
    xpoints[5] = 0;
    ypoints[5] = 0;
    VectorAddLine(Vout, 5, xpoints, ypoints);
    # fill in four control points - one for each corner
    # the source values are
    # control point 1 - upper left corner
    xsrc[1] = 0;
    ysrc[1] = 100;
    zsrc[1] = 0;
    xdest[1] = xUL;
    ydest[1] = yUL;
    zdest[1] = 0;
    # control point 2 - lower right corner
    xsrc[2] = 100;
    ysrc[2] = 0;
    zsrc[2] = 0;
    xdest[2] = xLR;
    ydest[2] = yLR;
    zdest[2] = 0;
    # control point 3 - upper right corner
    xsrc[3] = 100;
    ysrc[3] = 100;
    zsrc[3] = 0;
    xdest[3] = xUR;
    ydest[3] = yUR;
    zdest[3] = 0;
    # control point 3 - lower left corner
    xsrc[4] = 0;
    ysrc[4] = 0;
    zsrc[4] = 0;
    xdest[4] = xLL;
    ydest[4] = yLL;
    zdest[4] = 0;
    # print out the control points
    numeric i;
    for i = 1 to 4 {
           printf("%s %2d %7.2f %7.2f %7.2f  ",
           "i: xsrc, ysrc, zsrc, xdest, ydest, zdest ",
           i, xsrc[i], ysrc[i], zsrc[i]);
           printf("%7.2f %7.2f %7.2f\n", xdest[i], ydest[i], zdest[i]);
           }
    # set number of control points
    numeric numberPoints = 4;
    # now create the georef via dialog
    CreateControlPointGeoref(Vout, numberPoints, xsrc, ysrc, zsrc, xdest, ydest, zdest);
    GeorefFree(rgeoref); # clean up
    CloseRaster(Rin);
    


    CreateControlPointGeorefDefaultAccuracy
    Same as CreateControlPointGeoref but without accuracy parameters

    CreateControlPointGeorefDefaultAccuracy(Object, refsys, numberPoints, xSource, ySource, xDestination, yDestination, zDestination)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid Raster, Vector, CAD, or TIN object
      class SR_COORDREFSYS refsys
        The coordinate reference system
      numeric numberPoints
        Number of control points
      array xSource
        One dimensional array of source x coordinates
      array ySource
        One dimensional array of source y coordinates
      array xDestination
        One dimensional array of destination x coordinates
      array yDestination
        One dimensional array of destination y coordinates
      array zDestination (オプション)
        One dimensional array of destination z coordinates

    戻り値

    作成日時: 16-May-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/import_srtm.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateControlPointGeorefFromGeoref
    Creates a control point georeference object using an existing georeference for the projection system.

    CreateControlPointGeorefFromGeoref(Object, georef, numberPoints, xSource, ySource, zSource, xDestination, yDestination, zDestination, xSourceAccuracy, ySourceAccuracy, zSourceAccuracy, xDestinationAccuracy, yDestinationAccuracy, zDestinationAccuracy)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid Raster, Vector, CAD, or TIN object
      class GEOREF georef
        The georeference to use for projection system parmameters
      numeric numberPoints
        Number of control points
      array xSource
        One dimensional array of source x coordinates
      array ySource
        One dimensional array of source y coordinates
      array zSource
        One dimensional array of source z coordinates
      array xDestination
        One dimensional array of destination x coordinates
      array yDestination
        One dimensional array of destination y coordinates
      array zDestination (オプション)
        One dimensional array of destination z coordinates
      array xSourceAccuracy (オプション)
        Optional - one dimensional array of source x accuracy
      array ySourceAccuracy (オプション)
        Optional - one dimensional array of source y accuracy
      array zSourceAccuracy (オプション)
        Optional - one dimensional array of source z accuracy
      array xDestinationAccuracy (オプション)
        Optional - one dimensional array of destination x accuracy
      array yDestinationAccuracy (オプション)
        Optional - one dimensional array of destination y accuracy
      array zDestinationAccuracy (オプション)
        Optional - one dimensional array of destination z accuracy

    詳細と仮定

      You must have a minumum of three non-collinear points

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rin, Rnew;
    class Georef geoOrg, geoNew;
    array numeric xsrc[5], ysrc[5], zsrc[5];
    array numeric xdest[5], ydest[5], zdest[5];
    # get the raster
    GetInputRaster(Rin);
    #create a new raster
    CreateRaster(Rnew, "c:/tnt/win32/newras.rvc", "newras", "description", 200, 200, "8-bit unsigned");
    # duplicate the corrosponding values
    numeric r, c;
    for r = 1 to 200 {
           for c = 1 to 200 {
                  Rnew[r,c] = Rin[r,c];
                  }
           }
    # get number of lines and columns
    numeric numlines, numcols;
    numlines = NumLins(Rin);
    numcols = NumCols(Rin);
    # get the upper left (UL), lower right (LR)
    # upper right (UR), and lower left (LL) coordinates
    # of the portion of the raster we are going to duplicate
    numeric xUL, yUL, xLR, yLR, xUR, yUR, xLL, yLL;
    geoOrg = GetLastUsedGeorefObject(Rin);
    ObjectToMap(Rin, 1, 1, geoOrg, xUL, yUL);
    ObjectToMap(Rin, 201, 201, geoOrg, xLR, yLR);
    ObjectToMap(Rin, 201, 1, geoOrg, xUR, yUR);
    ObjectToMap(Rin, 1, 201, geoOrg, xLL, yLL);
    printf("UL: %7.2f %7.2f\n", xUL, yUL);
    printf("UR: %7.2f %7.2f\n", xUR, yUR);
    printf("LL: %7.2f %7.2f\n", xLL, yLL);
    printf("LR: %7.2f %7.2f\n", xLR, yLR);
    # fill in four control points - one for each corner
    # control point 1 - upper left corner
    xsrc[1] = 0;
    ysrc[1] = 0;
    zsrc[1] = 0;
    xdest[1] = xUL;
    ydest[1] = yUL;
    zdest[1] = 0;
    # control point 2 - lower right corner
    xsrc[2] = 200;
    ysrc[2] = 200;
    zsrc[2] = 0;
    xdest[2] = xLR;
    ydest[2] = yLR;
    zdest[2] = 0;
    # control point 3 - upper right corner
    xsrc[3] = 200;
    ysrc[3] = 0;
    zsrc[3] = 0;
    xdest[3] = xUR;
    ydest[3] = yUR;
    zdest[3] = 0;
    # control point 3 - lower left corner
    xsrc[4] = 0;
    ysrc[4] = 200;
    zsrc[4] = 0;
    xdest[4] = xLL;
    ydest[4] = yLL;
    zdest[4] = 0;
    # print out the control points
    numeric i;
    for i = 1 to 4 {
           printf("%s %2d %7.2f %7.2f %7.2f  ", "i: xsrc, ysrc, zsrc, xdest, ydest, zdest ", i, xsrc[i], ysrc[i], zsrc[i]);
           printf("%7.2f %7.2f %7.2f\n", xdest[i], ydest[i], zdest[i]);
           }
    # set number of control points
    numeric numpoints = 4;
    # now create the georef without dialog
    geoNew = CreateControlPointGeorefFromGeoref(Rnew, geoOrg, numpoints, xsrc, ysrc, zsrc, xdest, ydest, zdest);
    GeorefFree(geoOrg);
    GeorefFree(geoNew);
    CloseRaster(Rin);
    CloseRaster(Rnew);
    


    CreateImpliedGeoref
    Create an implied georeference subobject

    CreateImpliedGeoref(Object, refsys)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid Vector, CAD, or TIN object
      class SR_COORDREFSYS refsys
        The coordinate reference system

    戻り値

      numeric

    作成日時: 16-May-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class MAPPROJ mapproj;
    vector V;
    # set projection parameters
    mapproj.SetSystemLatLon();
    mapproj.Datum = "World Geodetic System 1984";
    GetInputVector(V);
    CreateImpliedGeoref(V, mapproj);
    


    CreateSimpleGeoref
    Create simple raster georeference

    CreateSimpleGeoref(raster, refSys, refCoord, lineScale, columnScale, referencePoint$, orientation$, angle)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster raster
        The raster object to georeference
      class SR_COORDREFSYS refSys
        Coordinate Reference System
      class POINT2D refCoord
        The reference coordinate location
      numeric lineScale
        Cell size setting for line scale
      numeric columnScale
        Cell size setting for column scale
      string referencePoint$ (オプション)
        The position of the reference point (Upper Left by default)
        可能性のある値:
          "UpperLeft"
          "UpperRight"
          "LowerLeft"
          "LowerRight"
          "Center"
      string orientation$ (オプション)
        The orientation of the raster (Projection Upright by default)
        可能性のある値:
          "Upright"
          "UpsideDown"
          "TopToLeft"
          "TopToRight"
          "UserDefined"
      numeric angle (オプション)
        The angle to use for User-defined orientation

    戻り値

      numeric

    作成日時: 08-Nov-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster src, dest;
    class RVC_GEOREFERENCE georef;
    class SR_COORDREFSYS refsys;
    class POINT2D refCoord;
    GetInputRaster(src);
    GetInputRaster(dest);
    georef.OpenLastUsed(src);
    refsys = georef.GetCoordRefSys();
    refCoord.x = 333349.501;              # Use values and units appropriate for the coord ref sys
    refCoord.y = 162833.442;
    # Create Simple Georeference (the last two are defaults)
    numeric err = CreateSimpleGeoref(dest, refsys, refCoord, LinScale(src), ColScale(src), "UpperLeft", "Upright");
    PopupError(err);
    


    DeleteGeoref
    Delete georef subobjects of the given object

    DeleteGeoref(Object)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        Any valid object

    戻り値

      なし

    作成日時: 01-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rvar;
    DeleteGeoref(Rvar);
    


    GeorefAlloc
    Allocate a new georeference handle

    GeorefAlloc()

    場所:

      ジオリファレンス(座標付与)

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Georef geonum1, geonum2;
    geonum1 = GeorefAlloc();
    geonum2 = GeorefAlloc();
    GeorefFree(geonum1);
    GeorefFree(geonum2);
    


    GeorefAngleToNorth
    Returns the angle between north and a line from center to x,y

    GeorefAngleToNorth(georef, x, y)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef
        Georeference object obtained from a previous GetGeorefObject() call
      numeric x
        Horizontal coordinate of point of interest
      numeric y
        Vertical coordinate of point of interest

    詳細と仮定

      The center of the (vector or raster) object is determined from the georeferenced extent of the object.

    戻り値

      numeric
      a number in radians

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    class Georef rGeoref;
    GetInputRaster(R);
    rGeoref = GetGeorefObject(R);
    print("Enter x value.");
           numeric x = PopupNum("Enter x.");
    print("Enter y value.");
           numeric y = PopupNum("Enter y.");
    numeric angle = GeorefAngleToNorth(rGeoref, x, y);
    print("Angle between line connecting center of object to x,y and true north:",angle/deg);
    CloseRaster(R);
    


    GeorefFree
    Free georeference object

    GeorefFree(georef)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef
        Class Georef from a previous call to GetGeorefObject() or GeorefAlloc()

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Georef gref;
    gref = GeorefAlloc();
    GeorefFree(gref);
    


    GeorefGetParms
    Open dialog for selecting georeference subobject

    GeorefGetParms(georef)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef (オプション)
        Class Georef from previous call to GetGeorefObject()

    戻り値

      class GEOREF
      a copy of the selected georeference subobject, or a new one if no parameter was specified (with parms as entered in the popup dialog)

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Georef g, h;
    raster R;
    GetInputRaster(R); # get input raster
    g = GetGeorefObject(R); # get georeference of object
    h = GeorefGetParms(g); # display the georef parms and copy to 'h'
    GeorefFree(g);
    GeorefFree(h);
    CloseRaster(R);
    


    GeorefSetCoordRefSys
    Set the coordinate reference system for this georeference

    GeorefSetCoordRefSys(georef, refsys)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef
        The georeference to use
      class SR_COORDREFSYS refsys
        The coordinate reference system

    戻り値

      なし

    作成日時: 25-Jun-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GeorefSetProjection
    Set the projection of a Georef

    GeorefSetProjection(georef, projection)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef
        Georeference to set
      class MAPPROJ projection
        Map projection to set

    戻り値

      なし

    作成日時: 17-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    GeorefTrans
    Transform point from one map projection to another

    GeorefTrans(from_georef, from_x, from_y, to_georef, to_x, to_y)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF from_georef
        The original georeference object
      numeric from_x
        The x coordinate of the point of interest, as it exists in the original georeference system
      numeric from_y
        The y coordinate in the original georeference system
      class GEOREF to_georef
        The target georeference object
      numeric variable to_x
        The x coordinate of the point of interest, as it exists in the target georeference system
      numeric variable to_y
        The y coordinate in the target georeference system

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    class Georef g1, g2;
    numeric x1, y1, x2, y2;
    GetInputRaster(R);
    g1 = GetGeorefObject(R);
    print("Enter x1");
           x1=PopupNum("Enter x1.");
    print("Enter x2");
           x2=PopupNum("Enter x2.");
    g2 = GeorefGetParms();
    GeorefTrans(g1, x1, y1, g2, x2, y2);
    print("Original: ", x1, y1);
    print("\nNew: ", x2, y2);
    GeorefFree(g1);
    GeorefFree(g2);
    CloseRaster(R);
    


    GetGeorefObject
    Return a handle to the georeference subobject

    GetGeorefObject(Object)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid Vector or Raster Object

    戻り値

      class GEOREF
      georeference subobject of object parameter

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    class Georef g;
    GetInputRaster(R);
    g=GetGeorefObject(R);
    # get georeference, change projection
    g=GeorefGetParms(g);
    # Do something with the georef here
    GeorefFree(g);
    


    GetLastUsedGeorefObject
    Return the most recently used georeference subobject

    GetLastUsedGeorefObject(Object)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid Vector or Raster object

    詳細と仮定

      Instead of prompting the user for a new georeference, the most recently used georeference is automatically used.

    戻り値

      class GEOREF
      georef object or 0 if not found

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    class Georef g;
    GetInputRaster(R);
    g=GetLastUsedGeorefObject(R);
    # get most recent georeference
    # Translate top left corner of raster to
    # map coordinates last used by R
    numeric x, y;
    ObjectToMap(R, 1, 1, g, x, y);
    print("Top left corner is at\nLat: ", y, "\nlon: ", x);
    GeorefFree(g);
    CloseRaster(R);
    


    MapToObject
    Transform georeferenced location from map coordinates to object coordinates

    MapToObject(georef, map_x, map_y, Object, x, y)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef
        Georeference object
      numeric map_x
        The x coordinate of the point of interest, as it exists in the georeferenced map coordinate system
      numeric map_y
        The y coordinate in the map coordinate system
      Raster, Vector or CAD Object
        A valid vector or raster object
      numeric variable x (オプション)
        The coordinates of the point of interest, as it exists relative to the origin of the object
      numeric variable y (オプション)
        The y coordinate relative to the object origin

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    class Georef g;
    numeric x1, y1, x2, y2;
    GetInputRaster(R);
    g=GetGeorefObject(R);
    print("Enter x1.");
           x1=PopupNum("Enter x1.");
    print("Enter y1.");
           y1=PopupNum("Enter y1.");
    MapToObject(g, x1, y1, R, x2, y2);
    print("Map: ", x1, y1);
    print("/nObject: ", x2, y2);
    GeorefFree(g);
    CloseRaster(R);
    


    ObjectToMap
    Transform object coordinates to georeferenced location

    ObjectToMap(Object, x, y, georef, map_x, map_y)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid vector or raster object
      numeric x
        The coordinates of the point of interest, as it exists relative to the origin of the object
      numeric y
        The y coordinate relative to the object origin
      class GEOREF georef
        A georeference object
      numeric variable map_x (オプション)
        The coordinates of the point of interest, as it exists in the georeferenced map coordinate system
      numeric variable map_y (オプション)
        The y coordinate in the map coordinate system

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    class Georef g;
    numeric x1, y1, x2, y2;
    GetInputRaster(R);
    g=GetGeorefObject(R);
    print("Enter object coord x1.");
           x1=PopupNum("Enter object coord x1.");
    print("Enter object coord y1.");
           y1=PopupNum("Enter object coord y1.");
    ObjectToMap(R, x1, y1, g, x2, y2);
    print("Object: ", x1,y1);
    print("/nMap: ", x2, y2);
    GeorefFree(g);
    CloseRaster(R);
    


    ProjDistanceToMeters
    Compute distance in meters between two points in specified projection. If the coordinate system is Latitude-Longitude the distance along a geodetic is returned (actual distance over curved surface).

    ProjDistanceToMeters(refsys, x1, y1, x2, y2)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class SR_COORDREFSYS refsys
        The coordinate reference system
      numeric x1
        X coordinate of point 1
      numeric y1
        Y coordinate of point 1
      numeric x2
        X coordinate of point 2
      numeric y2
        Y coordinate of point 2

    戻り値

      numeric

    作成日時: 09-Jan-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MAPPROJ mapproj;
    mapproj.SetSystemLatLon();
    class POINT2D la;
    la.x = -118;
    la.y = 33.5;
    class POINT2D ny;
    ny.x = -73.5;
    ny.y = 41;
    print(ProjDistanceToMeters(mapproj, la.x, la.y, ny.x, ny.y) / 1000, "km");
    


    ReadControlPoints
    Reads the control points of the last used georeference attached to an object

    ReadControlPoints(Object, xSource, ySource, zSource, xDestination, yDestination, zDestination)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        The Object the georeference is attached to
      array xSource
        Source x positions returned
      array ySource
        Source y positions returned
      array zSource
        Source z positions returned
      array xDestination
        Destination x positions returned
      array yDestination
        Destination y positions returned
      array zDestination
        Destination z positions returned

    詳細と仮定

      The Object has a control point georeference

    戻り値

      numeric
      number of control points read

    作成日時: 07-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    array numeric xS[5], yS[5], zS[5], xD[5], yD[5], zD[5];
    GetInputRaster(R);
    numeric numPoints = ReadControlPoints(R, xS, yS, zS, xD, yD, zD);
    numeric i;
    for i = 1 to numPoints {
           print(xS[i], yS[i], zS[i], " - ", xD[i], yD[i], zD[i]);
           }
    


    TransPoint2D
    Transform 2D point using transparm

    TransPoint2D(point, transparm, invert)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class POINT2D point
        The point to transform
      class TRANSPARM transparm
        Transparm to use
      numeric invert (オプション)
        Do inverse

    戻り値

    作成日時: 22-May-1998
    修正日時: 22-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    WriteControlPoints
    Write control points to the last used georeference attached to an object

    WriteControlPoints(Object, numberPoints, xSource, ySource, zSource, xDestination, yDestination, zDestination)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        The Object the georeference is attached to
      numeric numberPoints
        Number of control points to write
      array xSource
        Source x positions
      array ySource
        Source y positions
      array zSource
        Source z positions
      array xDestination
        Destination x positions
      array yDestination
        Destination y positions
      array zDestination
        Destination z positions

    詳細と仮定

      The Object has a control point georeference and the arrays are large enough to hold numberPoints numbers

    戻り値

      なし

    作成日時: 07-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    array numeric xS[5], yS[5], zS[5], xD[5], yD[5], zD[5];
    xS[1] = 0;
    yS[1] = 0;
    zS[1] = 0;
    xD[1] = 333354;
    yD[1] = 162833;
    zD[1] = 0;
    xS[2] = 361;
    yS[2] = 488;
    zS[2] = 0;
    xD[2] = 343050;
    yD[2] = 148559;
    zD[2] = 0;
    xS[3] = 0;
    yS[3] = 488;
    zS[3] = 0;
    xD[3] = 332803;
    yD[3] = 148958;
    zD[3] = 0;
    xS[4] = 361;
    yS[4] = 0;
    zS[4] = 0;
    xD[4] = 343000;
    yD[4] = 162000;
    zD[4] = 0;
    GetInputRaster(R);
    WriteControlPoints(R, 4, xS, yS, zS, xD, yD, zD);
    


    ColorMapFromRastVar(raster, nameOrNum)

    場所:

    パラメータ:

      Raster raster
        Raster object
      any value nameOrNum (オプション)
        Which one if more than one available (default: last used)

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/deveg68.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ColorMapGetColor
    Get a color from a colormap

    ColorMapGetColor(colormap, index)

    場所:

      カラーパレット

    パラメータ:

      class COLORMAP colormap
        The ColorMap
      numeric index
        What color index to get

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ColorMapSetColor
    Set a colormap color given a class color structure.

    ColorMapSetColor(colormap, index, color)

    場所:

      カラーパレット

    パラメータ:

      class COLORMAP colormap
        The colormap to set
      numeric index
        Index of color to set
      class COLOR color
        The color structure to set the color with

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ColorMapSetColorHIS
    Set a colormap color to given HIS values.

    ColorMapSetColorHIS(colormap, index, hue, intensity, saturation)

    場所:

      カラーパレット

    パラメータ:

      class COLORMAP colormap
        The colormap to set
      numeric index
        Index of color to set
      numeric hue
        Hue value
      numeric intensity
        Intensity value
      numeric saturation
        Saturation value

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ColorMapSetColorRGB
    Set a colormap color to given RGB values.

    ColorMapSetColorRGB(colormap, index, red, green, blue, range)

    場所:

      カラーパレット

    パラメータ:

      class COLORMAP colormap
        The colormap to set
      numeric index
        Index of color to set
      numeric red
        Red value
      numeric green
        Green value
      numeric blue
        Blue value
      numeric range (オプション)
        Sets the maximum value for red, green, blue

    詳細と仮定

      default range is 0 - 255

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/classifyRaster.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ColorMapWriteToRastVar
    Write a colormap under a raster.

    ColorMapWriteToRastVar(raster, colormap, name$, description$)

    場所:

      カラーパレット

    パラメータ:

      Raster raster
        Raster object
      class COLORMAP colormap
        The colormap to write
      string name$
        The colormap object name
      string description$ (オプション)
        The colormap object description

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/deveg68.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CloseStyleObject(style)

    場所:

    パラメータ:

    戻り値

      なし

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    OpenStyleObject
    Open a Style Object

    OpenStyleObject(filename$, objectname$, Credentials)

    場所:

      スタイル

    パラメータ:

      string filename$
        Full filepath
      string objectname$
        Object Name
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

    作成日時: 07-Apr-1998
    修正日時: 20-Dec-2005
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    OpenStyleSubObject
    Open a Sub-Object of a Style Object

    OpenStyleSubObject(ParentObject)

    場所:

      スタイル

    パラメータ:

      class RVC_OBJECT ParentObject
        Parent Style Object

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    StyleReadBitmapPattern
    Read a BITMAPPATTERN from a style object

    StyleReadBitmapPattern(style, name$)

    場所:

      スタイル

    パラメータ:

      class RVC_STYLE style
        A style object
      string name$
        The bitmap pattern name

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadHatchPattern
    Read a hatch pattern from a style object

    StyleReadHatchPattern(style, name$)

    場所:

      スタイル

    パラメータ:

      class RVC_STYLE style
        The style object to use
      string name$
        The hatch pattern name

    戻り値

    作成日時: 27-Sep-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    StyleReadLinePattern
    Read a LINEPATTERN from a style object

    StyleReadLinePattern(style, name$)

    場所:

      スタイル

    パラメータ:

      class RVC_STYLE style
        A style object
      string name$
        The line pattern name

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadLineStyle
    Read a line style from a style object

    StyleReadLineStyle(styleobj, stylename$)

    場所:

      スタイル

    パラメータ:

      class RVC_STYLE styleobj
        The style object to read from
      string stylename$
        The style name

    戻り値

    作成日時: 28-Sep-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadPointStyle
    Read a point style from a style object

    StyleReadPointStyle(styleobj, stylename$)

    場所:

      スタイル

    パラメータ:

      class RVC_STYLE styleobj
        The style object to read from
      string stylename$
        The style name

    戻り値

    作成日時: 28-Sep-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadPointSymbol
    Read a POINTSYMBOL from a style object

    StyleReadPointSymbol(style, name$)

    場所:

      スタイル

    パラメータ:

      class RVC_STYLE style
        A style object
      string name$
        The point symbol name

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadPolyStyle
    Read a polygon style from a style object

    StyleReadPolyStyle(styleobj, stylename$)

    場所:

      スタイル

    パラメータ:

      class RVC_STYLE styleobj
        The style object to read from
      string stylename$
        The style name

    戻り値

    作成日時: 28-Sep-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadTextStyle
    Read a text style from a style object

    StyleReadTextStyle(styleobj, stylename$)

    場所:

      スタイル

    パラメータ:

      class RVC_STYLE styleobj
        The style object to read from
      string stylename$
        The style name

    戻り値

    作成日時: 28-Sep-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    AddCallback(callback, function, data)

    場所:

    パラメータ:

      class CALLBACKLIST callback
        An instance of a class that is, or inherits from CallbackList
      proc function
        Procedure to call
      class anything data (オプション)
        Data passed to callback

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # DIALOG1.SML
    # Sample script for Getting Started.
    # Creates and opens a simple dialog window.
    # Define parent widget for dialog window.
    class XmForm win1;
    # Procedure for closing window
    proc OnClose() {
           DialogClose(win1);
           DestroyWidget(win1);
           }
    # Set up dialog window
    win1 = CreateFormDialog("Hello World");
    win1.MarginHeight = 5;
    win1.MarginWidth = 5;
    # Create label text for window
    class XmLabel winLabel;
    winLabel = CreateLabel(win1,"Sample Dialog Window");
    winLabel.TopWidget = win1;
    winLabel.LeftWidget = win1;
    winLabel.LeftOffset = 10;
    winLabel.RightWidget = win1;
    winLabel.RightOffset = 10;
    # Create Close button attached to label on
    # on top and to window margin on left and right
    class XmPushButton closeButton;
    closeButton = CreatePushButton(win1,"Close");
    closeButton.TopWidget = winLabel;
    closeButton.TopOffset = 5;
    closeButton.leftWidget = win1;
    closeButton.rightWidget = win1;
    closeButton.bottomWidget = win1;
    # Could also use the generic AddCallback() function
    WidgetAddCallback(closeButton.ActivateCallback,OnClose);
    # Open dialog window and keep script active
    # until window is closed.
    DialogOpen(win1);
    DialogWaitForClose(win1); # Example of CreateFormDialog()
    


    Exit
    Exit the script (calls functions registered with OnExit).

    Exit()

    場所:

      システム

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ###
    ### Using Function Group
    ###
    class STATUSHANDLE statushandle;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statushandle = StatusDialogCreate();
    statuscontext = StatusContextCreate(statushandle);
    StatusSetMessage(statuscontext, "Starting...");
    # initialize progress bar
    StatusSetBar(statuscontext, 0, count);
    numeric percent = 0;
    numeric i;
    for i=1 to count
    {
           print(i);
           StatusSetBar(statuscontext, i, count);
           
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
    }
    StatusContextDestroy(statuscontext);
    StatusDialogDestroy(statushandle);
    ###
    ### Using Class Methods (Preferred)
    ###
    class STATUSDIALOG statusdialog;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statusdialog.Create();
    statuscontext = statusdialog.CreateContext();
    statuscontext.Message = "Starting...";
    # initialize progress bar
    statuscontext.BarInit(count,0);
    numeric percent;
    numeric i;
    for i=1 to count
    {
           print(i);
           statuscontext.BarIncrement(1,0);
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
           if (statusdialog.CheckCancel())
           {
                  print("Task Cancelled");
                  Exit();
           }
    }
    statusdialog.destroy();
    


    GetLastError
    Get the last error encountered in the script to test if a function succeeded

    GetLastError()

    場所:

      システム

    詳細と仮定

      Calling the function clears the error code, so if you call it twice, the 2nd call will return 0.

    戻り値

      numeric
      Returns an error code with value < 0, or 0 if there's no error. Starting with TNTmips7.0 script writer can perform their own error handling by setting _context.AbortOnError=0

    作成日時: 29-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    _context.AbortOnError =0;
    func hadError()
    {
           if (GetLastError() < 0)
                  return 1;
           else return 0;
    }
    vector V;
    GetInputVector(V);
    if(hadError()) print("ERROR - GetInputVector");
    VectorDeleteDangleLines(V, 300);              # need to init toolkit first
    if(hadError()) print("ERROR - DeleteDangles"); # this is the only print executed
    if(hadError()) print("ERROR - Returns 0 2nd time called");
    


    OnExit
    Register function to call just before script exits.

    OnExit(function, data)

    場所:

      システム

    パラメータ:

      proc function
        The function to call
      class anything data (オプション)
        Data to pass to the function

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # prints 1 2 3
    # In general, on exit can be used to clean up at end of script
    # i.e. close rasters, delete temp files, etc.
    proc printThree()
    {
           print(3);
    }
    print(1);
    OnExit(printThree);
    print(2);
    


    run
    Runs another command

    run(command$, wait)

    場所:

      システム

    パラメータ:

      string command$
        Any valid string
      numeric wait (オプション)
        1 or 0:
        1 means run() will not return until the command completes
        0 means command will run in the background

    戻り値

      numeric
      Returns a number < 0 if the run command failed

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    run("program.exe", 0); # run in background
    


    RunAssociatedApplication
    Runs application associated with passed file

    RunAssociatedApplication(filename$)

    場所:

      システム

    パラメータ:

      string filename$
        File to open

    戻り値

      なし

    作成日時: 18-Oct-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    RunAssociatedApplication("c:/temp/sample.txt");# Opens sample.txt with associated application
    


    RunSML
    Run an SML script

    RunSML(filename$, objectname$)

    場所:

      システム

    パラメータ:

      string filename$
        File name or RVC file name
      string objectname$ (オプション)
        File name if part of RVC file

    戻り値

      なし

    作成日時: 08-May-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    RunSML("C:/Program Files/MicroImages/TNT_70/smlsamples/StandAlone/movie.sml");
    


    sleep
    Pause execution for a number of seconds.

    sleep(seconds)

    場所:

      システム

    パラメータ:

      numeric seconds
        Number of seconds to sleep

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # declare class variables
    class GPSPort gpsport;
    class GPSData gpsdata;
    clear();
    # open the port
    gpsport = GPSPortOpen("COM1", "NMEA", ":4800:8:none:1:");
    print(gpsport.Protocol, gpsport.Name);
    while (1) # now read data
    {
           print(gpsport.protocol, gpsport.name, "\n");
           gpsdata = GPSPortRead(gpsport);
           if (gpsdata.positionXYIsValid)
                  print("x y", gpsdata.position.x, gpsdata.position.y);
           if (gpsdata.positionZIsValid)
                  print("z  ", gpsdata.position.z);
           if (gpsdata.velocityXYIsValid)
                  print("vx vy ", gpsdata.velocity.x, gpsdata.velocity.y);
           if (gpsdata.velocityZIsValid)
                  print("vz    ", gpsdata.velocity.z);
           if (gpsdata.headingIsValid)
                  print("heading", gpsdata.heading);
           if (gpsdata.speedIsValid)
                  print("speed", gpsdata.speed);
           if (gpsdata.numberSatellitesIsValid)
                  print("number of satellites", gpsdata.numberOfSatellites);
           print("\n\n");
           sleep(1);
    }
    # close the port
    GPSPortClose(gpsport);
    


    WaitForExit
    Suspend script but process callbacks and events.

    WaitForExit()

    場所:

      システム

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/view.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ConvertCMYKtoRGB(maxrgbvalue, c, m, y, k, red, green, blue)

    場所:

    パラメータ:

      numeric maxrgbvalue
        The maximum value for red, green, or blue
      numeric c
        Cyan
      numeric m
        Magenta
      numeric y
        Yellow
      numeric k
        Black
      numeric variable red
        Red value returned
      numeric variable green
        Green value returned
      numeric variable blue
        Blue value returned

    戻り値

      なし

    作成日時: 08-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric c, m, y, k, red, green, blue;
    c = 100;
    m = 100;
    y = 100;
    k = 101;
    ConvertCMYKtoRGB(255, c, m, y, k, red, green, blue);
    string format$ = "%3d %3d %3d %3d - %3d %3d %3d";
    printf(format$, c, m, y, k, red, green, blue);
    


    ConvertHBStoRGB
    Convert hue, brightness, saturation to red, green, blue

    ConvertHBStoRGB(hue, saturation, value, red, green, blue)

    場所:

      カラー変換

    パラメータ:

      numeric hue
        Hue (range 0 - 360)
      numeric saturation
        Saturation (range 0 - 100)
      numeric value
        Value (range 0 - 100)
      numeric variable red
        Red value returned (range 0 - 255)
      numeric variable green
        Green value returned (range 0 - 255)
      numeric variable blue
        Blue value returned (range 0 - 255)

    戻り値

      なし

    作成日時: 13-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric h, b, s, red, green, blue;
    h = 180;
    b = 50;
    s = 50;
    ConvertHBStoRGB(h, b, s, red, green, blue);
    printf("hbs - rgb  %3d %3d %3d - %3d %3d %3d\n", h, b, s, red, green, blue);
    


    ConvertHIStoRGB
    Convert from hue, intensity, saturation to red, green, blue

    ConvertHIStoRGB(maxrgbvalue, hue, intensity, saturation, red, green, blue)

    場所:

      カラー変換

    パラメータ:

      numeric maxrgbvalue
        The maximum posible value of red, green and blue
      numeric hue
        Hue value (range 0 to 360)
      numeric intensity
        Brightness value (range 0 to 100)
      numeric saturation
        Saturation value (range 0 to 100)
      numeric variable red
        Red value returned (range 0 to maxrgbvalue)
      numeric variable green
        Green value returned (range 0 to maxrgbvalue)
      numeric variable blue
        Blue value returned (range 0 to maxrgbvalue)

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # rgbhis.sml
    # convert between rgb and his
    # each function also takes a maximum rgb value for proper scaling
    # max for 8-bit unsigned = 255
    # max for 16-bit unsigned = 65535
    clear();
    numeric maxrgb = 255;
    numeric h, i, s, r, g, b;
    for h = 1 to 360 step 179 {
           for i = 1 to 100 step 49 {
                  for s = 1 to 100 step 49 {
                         ConvertHIStoRGB(maxrgb, h, i, s, r, g, b);
                         printf("%s: %6d %6d %6d %6d %6d %6d \n",
                         "his -> rgb", h, i, s, r, g, b);
                         }
                  }
           }
    for r = 1 to 255 step 100 {
           for g = 1 to 255 step 100 {
                  for b = 1 to 255 step 100 {
                         ConvertRGBtoHIS(maxrgb, r, g, b, h, i, s);
                         printf("%s: %6d %6d %6d %6d %6d %6d \n",
                         "rgb -> his", r, g, b, h, i, s);
                         }
                  }
           }
    


    ConvertHSVtoRGB
    Convert hue, saturation, value to red, green, blue

    ConvertHSVtoRGB(hue, saturation, value, red, green, blue)

    場所:

      カラー変換

    パラメータ:

      numeric hue
        Hue (range 0 - 360)
      numeric saturation
        Saturation (range 0 - 208)
      numeric value
        Value (range 0 - 512)
      numeric variable red
        Red value returned (range 0 - 255)
      numeric variable green
        Green value returned (range 0 - 255)
      numeric variable blue
        Blue value returned (range 0 - 255)

    戻り値

      なし

    作成日時: 10-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric h,s,v,r,g,b;
    h = 180;
    s = 50;
    v = 50;
    ConvertHSVtoRGB(h, s, v, r, g, b);
    printf("hsv - rgb  %3d %3d %3d - %3d %3d %3d\n", h, s, v, r, g, b);
    


    ConvertRGBtoHBS
    Convert red, green, blue, to hue, brightness, saturation

    ConvertRGBtoHBS(red, green, blue, hue, brightness, saturation)

    場所:

      カラー変換

    パラメータ:

      numeric red
        Red value (range 0 - 255)
      numeric green
        Green value (range 0 - 255)
      numeric blue
        Blue value (range 0 - 255)
      numeric variable hue
        Hue returned (range 0 - 360)
      numeric variable brightness
        Brightness returned (range 0 - 100)
      numeric variable saturation
        Saturation returned (range 0 - 100)

    戻り値

      なし

    作成日時: 13-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of ConvertRGBtoHBS()
    numeric r, g, b, h, b, s;
    r = 127;
    g = 127;
    b = 127;
    ConvertRGBtoHBS(r, g, b, h, b, s);
    printf("rgb - hbs  %3d %3d %3d - %3d %3d %3d\n", r, g, b, h, b, s);
    


    ConvertRGBtoHIS
    Convert from red, green, blue to hue, intensity, saturation

    ConvertRGBtoHIS(maxrgbvalue, red, green, blue, hue, intensity, saturation)

    場所:

      カラー変換

    パラメータ:

      numeric maxrgbvalue
        The maximum posible value of red, green, and blue
      numeric red
        Red value (range 0 to maxrgbvalue)
      numeric green
        Green value (range 0 to maxrgbvalue)
      numeric blue
        Blue value (range 0 to maxrgbvalue)
      numeric variable hue
        Hue value returned (range 0 to 360)
      numeric variable intensity
        Brightness value returned (range 0 to 100)
      numeric variable saturation
        Saturation value returned (range 0 to 100)

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # rgbhis.sml
    # convert between rgb and his
    # each function also takes a maximum rgb value for proper scaling
    # max for 8-bit unsigned = 255
    # max for 16-bit unsigned = 65535
    clear();
    numeric maxrgb = 255;
    numeric h, i, s, r, g, b;
    for h = 1 to 360 step 179 {
           for i = 1 to 100 step 49 {
                  for s = 1 to 100 step 49 {
                         ConvertHIStoRGB(maxrgb, h, i, s, r, g, b);
                         printf("%s: %6d %6d %6d %6d %6d %6d \n",
                         "his -> rgb", h, i, s, r, g, b);
                         }
                  }
           }
    for r = 1 to 255 step 100 {
           for g = 1 to 255 step 100 {
                  for b = 1 to 255 step 100 {
                         ConvertRGBtoHIS(maxrgb, r, g, b, h, i, s);
                         printf("%s: %6d %6d %6d %6d %6d %6d \n",
                         "rgb -> his", r, g, b, h, i, s);
                         }
                  }
           }
    


    ConvertRGBtoHSV
    Convert red, green, blue to hue, saturation, value

    ConvertRGBtoHSV(red, green, blue, hue, saturation, value)

    場所:

      カラー変換

    パラメータ:

      numeric red
        Red value (range 0 - 255)
      numeric green
        Green value (range 0 - 255)
      numeric blue
        Blue value (range 0 - 255)
      numeric variable hue
        Hue returned (range 0 - 360)
      numeric variable saturation
        Saturation returned (range 0 - 208)
      numeric variable value
        Value returned (range 0 - 512)

    戻り値

      なし

    作成日時: 10-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of ConvertRGBtoHSV()
    numeric r, g, b, h, s, v;
    r = 127;
    g = 127;
    b = 127;
    ConvertRGBtoHBS(r, g, b, h, s, v);
    printf("rgb - hsv  %3d %3d %3d - %3d %3d %3d\n", r, g, b, h, s, v);
    


    CreateStatusDialog(parent, flags$)

    場所:

    パラメータ:

      class Widget parent (オプション)
        The parent widget of the status dialog
      string flags$ (オプション)
        See below
        可能性のある値:
          "NoCancel"
            Disable the cancel button
          "DelayPopup"

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DlgGetObject
    Object selection dialog for user to select a single object.

    DlgGetObject(Prompt$, ObjectTypes$, ObjItem, GetObjectFlags$)

    場所:

      ポップアップダイアログ

    パラメータ:

      string Prompt$
        Prompt String for Dialog
      string ObjectTypes$
        Object type allowed for selection
        可能性のある値:
          "All"
            Get any Object
          "Raster"
            Get Raster Object
          "Vector"
            Get Vector Object
          "CAD"
            Get CAD Object
          "TIN"
            Get TIN Object
          "Layout"
            Display Layout
          "Group"
            Display Group
          "Database"
            Database
          "Region"
            Region
          "Style"
            Style object
      class RVC_OBJITEM ObjItem
        RVC_OBJITEM returned
      string GetObjectFlags$ (オプション)
        Object selection flags
        可能性のある値:
          "ExistingOnly"
            Allow existing objects only (Default)
          "NewOnly"
            Allow new objects only
          "NewOrExisting"
            Allow new or existing objects

    戻り値

      numeric
      0 on success, 1 if an RVC_OBJITEM is new, less then 0 if error occurs

    作成日時: 30-Mar-2006
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DlgGetObjects
    Object selection dialog for user to select an unspecified number of objects.

    DlgGetObjects(Prompt$, ObjectTypes$, ObjItemList, GetObjectFlags$, MinObjs, MaxObjs)

    場所:

      ポップアップダイアログ

    パラメータ:

      string Prompt$
        Prompt String for Dialog
      string ObjectTypes$
        Object type allowed for selection
        可能性のある値:
          "All"
            Get any Object
          "Raster"
            Get Raster Object
          "Vector"
            Get Vector Object
          "CAD"
            Get CAD Object
          "TIN"
            Get TIN Object
          "Layout"
            Display Layout
          "Group"
            Display Group
          "Database"
            Database
          "Region"
            Region
          "Style"
            Style object
      class ObjItemList
        RVC_OBJITEM returned
      string GetObjectFlags$ (オプション)
        Object selection flags
        可能性のある値:
          "ExistingOnly"
            Allow existing objects only (Default)
          "NewOnly"
            Allow new objects only
          "NewOrExisting"
            Allow new or existing objects
      numeric MinObjs (オプション)
        Minimum number of objects required (Default = 1)
      numeric MaxObjs (オプション)
        Maximum number of objects required (Default = 0)

    戻り値

      numeric
      0 on success, 1 if an RVC_OBJITEM is new, less then 0 if error occurs

    作成日時: 31-Mar-2006
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DlgGetObjectSet
    Object selection dialog for user to select a specified number of objects.

    DlgGetObjectSet(Prompt$, ObjectTypes$, Labels, ObjItemList, GetObjectFlags$)

    場所:

      ポップアップダイアログ

    パラメータ:

      string Prompt$
        Prompt String for Dialog
      string ObjectTypes$
        Object type allowed for selection
        可能性のある値:
          "All"
            Get any Object
          "Raster"
            Get Raster Object
          "Vector"
            Get Vector Object
          "CAD"
            Get CAD Object
          "TIN"
            Get TIN Object
          "Layout"
            Display Layout
          "Group"
            Display Group
          "Database"
            Database
          "Region"
            Region
          "Style"
            Style object
      class STRINGLIST Labels
        Labels for the objects to select
      class ObjItemList
        RVC_OBJITEM returned
      string GetObjectFlags$ (オプション)
        Object selection flags
        可能性のある値:
          "ExistingOnly"
            Allow existing objects only (Default)
          "NewOnly"
            Allow new objects only
          "NewOrExisting"
            Allow new or existing objects

    戻り値

      numeric
      0 on success, 1 if an RVC_OBJITEM is new, less then 0 if error occurs

    作成日時: 31-Mar-2006
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetInputObject
    Popup dialog to select an object and return info.

    GetInputObject(ObjectType$, prompt$, rvcFilename$, objectName$)

    場所:

      ポップアップダイアログ

    パラメータ:

      string ObjectType$
        See below
        可能性のある値:
          "All"
            Get any Object
          "Raster"
            Get Raster Object
          "Vector"
            Get Vector Object
          "CAD"
            Get CAD Object
          "TIN"
            Get TIN Object
          "Layout"
            Display Layout
          "Group"
            Display Group
          "Database"
            Database
          "Region"
            Region
          "Style"
            Style object
      string prompt$
        Dialog prompt
      string rvcFilename$
        RVC filename returned
      string objectName$
        Object name returned

    戻り値

      なし

    作成日時: 17-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string type$ = "Style";
    string prompt$ = "Go find a style object.";
    string filename$, obj$;
    GetInputObject(type$, prompt$, filename$, obj$);
    print(filename$, obj$);
    


    GetOutputObject
    Prompt the user for an output object

    GetOutputObject(ObjectType$, NewOrExisting$, prompt$, rvcFilename$, objectName$, objectDescription$)

    場所:

      ポップアップダイアログ

    パラメータ:

      string ObjectType$
        See below
        可能性のある値:
          "All"
            Get any Object
          "Raster"
            Get Raster Object
          "Vector"
            Get Vector Object
          "CAD"
            Get CAD Object
          "TIN"
            Get TIN Object
          "Layout"
            Display Layout
          "Group"
            Display Group
          "Database"
            Database
          "Region"
            Region
          "Style"
            Style object
      string NewOrExisting$
        See below
        可能性のある値:
          "ExistingOnly"
            Allow existing objects only
          "NewOnly"
            Allow new objects only
          "NewOrExisting"
            Allow new or existing objects
      string prompt$
        Dialog prompt
      string rvcFilename$
        RVC filename returned
      string objectName$
        RVC filename returned
      string objectDescription$
        RVC filename returned

    詳細と仮定

      This function does not actually create any new objects. If the object does not already exist then "objectName" will contain the name as entered by the user. If the object already exists then "objectName" will contain the entire object path.

    戻り値

      なし

    作成日時: 17-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string type$ = "Style";
    string prompt$ = "Go find a style object.";
    string filename$, obj$, desc$;
    GetOutputObject(type$, "NewOnly", prompt$, filename$, obj$, desc$);
    print(filename$);
    print(obj$);
    print(desc$);
    


    PopupError
    Displays a popup window and displays the text associated with error_code

    PopupError(error_code)

    場所:

      ポップアップダイアログ

    パラメータ:

      numeric error_code
        A number returned from a SML function indicating an error has occurred - see errmsgs.txt for a complete list

    詳細と仮定

      Error codes are always negative.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    PopupError(-1012); # error codes are always negative
    


    PopupMessage
    Open popup window with message and [OK] choice

    PopupMessage(message$)

    場所:

      ポップアップダイアログ

    パラメータ:

      string message$
        A string holding the message

    詳細と仮定

      The only response from the user is to press the OK button in the message window.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    PopupMessage("Hello!");
    


    PopupNum
    Open popup window asking for a number

    PopupNum(prompt$, default, min, max, decimal_places)

    場所:

      ポップアップダイアログ

    パラメータ:

      string prompt$
        A string holding the message
      numeric default (オプション)
        Optional - (a number), the value returned if the user hit
      numeric min (オプション)
        Optional - (a number), the minimum acceptable value
      numeric max (オプション)
        Optional - (a number), the maximum acceptable value
      numeric decimal_places (オプション)
        Optional - (an integer), the number of decimal places used when displaying the default value. This has no effect on the value returned

    詳細と仮定

      The optional arguments must all be used and entered in order. If an out-of-range value is entered, SML will beep and require a new entry before proceeding.

    戻り値

      numeric
      either the default of the number entered. If the user hits cancel the return value will be NULL. Note that to detect this, you must use the function IsNull()

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    PopupNum("Value?", 1, 10, 0, 2);
    


    PopupSelectTable
    Popup dialog for database table selection

    PopupSelectTable(database, table$)

    場所:

      ポップアップダイアログ

    パラメータ:

      class DATABASE database
        The database
      string variable table$
        Table name (passed/returned)

    戻り値

      numeric
      1 on success, 0 on user cancel, -1 on error

    作成日時: 19-Oct-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    string tablename$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           print("You selected:", tablename$);
    }
    


    PopupSelectTableField
    Popup dialog for user to select a table and field

    PopupSelectTableField(database, table$, field$)

    場所:

      ポップアップダイアログ

    パラメータ:

      class DATABASE database
        The database
      string variable table$
        Table name (passed/returned)
      string variable field$
        Field name (passed/returned)

    戻り値

      numeric
      1 on success, 0 on user cancel, -1 on error

    作成日時: 19-Oct-2000
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DATABASE database;
    vector V;
    string table$, field$;
    GetInputVector(V);
    database = OpenVectorPolyDatabase(V);
    PopupSelectTableField(database, table$, field$);
    print(table$ + "." + field$);
    


    PopupString
    Open popup window asking for a string

    PopupString(prompt$, default$, title$)

    場所:

      ポップアップダイアログ

    パラメータ:

      string prompt$
        A string holding the message
      string default$ (オプション)
        The string returned if the user hit .
      string title$ (オプション)
        The title for the dialog window

    戻り値

      string
      either the string you entered or the default string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string a$ = PopupString("Enter a string.", "Or use this default string.");
    print(a$);
    


    PopupYesNo
    Open popup window asking for a yes or no input

    PopupYesNo(prompt$, default)

    場所:

      ポップアップダイアログ

    パラメータ:

      string prompt$
        A string holding the message
      numeric default (オプション)
        Optional - (a number), if set to 1, then hitting returns 1, which is the same as pressing yes. If set to zero, then hitting the returns 0, which is the same as pressing NO. Anything else has no effect.

    詳細と仮定

      Pressing YES returns1. Pressing NO returns 0. Pressing returns default (if set).

    戻り値

      numeric
      either 1 or 0

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(PopupYesNo("Continue?", 1));
    


    PopupYesNoCancel
    Open popup window asking for a yes, no or cancel

    PopupYesNoCancel(prompt$, default)

    場所:

      ポップアップダイアログ

    パラメータ:

      string prompt$
        A string holding the message
      numeric default (オプション)
        Optional - (a number), if set to 1, then hitting returns 1, which is the same as pressing yes. If set to zero, then hitting the returns 0, which is the same as pressing NO. Anything else has no effect.

    詳細と仮定

      Pressing YES returns1. Pressing NO returns 0. Pressing CANCEL does nothing. Pressing returns default (if set).

    戻り値

      numeric
      either 1 or 0

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(PopupYesNoCancel("Continue?", 1));
    


    CADAttachDBRecord(CADvar, block, elemnum, table, recnum)

    場所:

    パラメータ:

    戻り値

      なし

    作成日時: 16-May-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    cad C;
    GetOutputCAD(C);
    class DATABASE db;
    class DBTABLEINFO table;
    # write a point
    numeric xin = 100, yin = 200;
    CADWritePoint(C, 1, xin, yin);
    CADWritePoint(C, 1, xin+yin, yin);
    CADWritePoint(C, 1, xin-yin, yin);
    CADWritePoint(C, 1, xin, yin+xin);
    # now create a table
    db = OpenCADDatabase(C);
    table = TableCreate(db, "MyTable", "Newly Created Table");
    TableAddFieldInteger(table, "NewField");
    # write some important info to the db table
    TableWriteRecord(table, 0, 55);
    TableWriteRecord(table, 0, 45);
    # attach the records to elements
    CADAttachDBRecord(C, 1, 1, table, 1);
    CADUnattachDBRecord(C, 1, 1, table, 1);
    CADAttachDBRecord(C, 1, 1, table, 2);
    CADAttachDBRecord(C, 1, 2, table, 1);
    CADAttachDBRecord(C, 1, 3, table, 2);
    CADAttachDBRecord(C, 1, 4, table, 1);
    


    CADCreateBlock
    Create a new CAD block for element insertion

    CADCreateBlock(CADvar, blockname$, blockdesc$)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      string blockname$
        The name of the block
      string blockdesc$
        The block description

    詳細と仮定

      The CAD exists and was opened with GetOutputCAD()

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # subblock.sml
    # demonstrates creating and inserting a subblock
    cad C;
    GetOutputCAD(C);
    # first create a box in block 1
    CADWriteBox(C, 1, 0, 0, 100, 100, 0);
    # now create a subblock
    CADCreateBlock(C,"BLOCK2", "subblock");
    # create a small box in the subblock
    CADWriteBox(C, 2, 0, 0, 10, 10, 45);
    # now insert with replication - create a grid
    numeric destblock = 1, sourceblock = 2;
    numeric xinsert = 0, yinsert = 0, xScale = 1, yscale = 1, rotate = 0;
    numeric numlines = 10, numcols = 10, linespace = 10, colspace = 10;
    CADInsertBlock(C, destblock, sourceblock, xinsert, yinsert,
    xScale, yscale, rotate, numlines, numcols, linespace, colspace);
    CloseCAD(C);
    


    CADElementInRegion
    Tests a CAD element against a region.

    CADElementInRegion(region, CADvar, block, element, TestType$)

    場所:

      CAD

    パラメータ:

      class REGION2D region
        The region variable
      CAD CADvar
        The CAD object
      numeric block
        The block number
      numeric element
        The elment number
      string TestType$ (オプション)
        The region test type to perform
        可能性のある値:
          "CompletelyInside"
            Is the element completely inside the region
          "PartlyInside"
            Is the element partially inside the region
          "CompletelyOutside"
            Is the element completely outside the region
          "PartlyOutside"
            Is the element partially outside the region

    戻り値

      numeric
      0 or 1

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of CADElementInRegion()
    clear();
    cad C;
    region Rgn;
    # open existing file
    GetOutputCAD(C);
    GetInputRegion(Rgn);
    numeric block;
    numeric numberElements = CADNumElements(C, block);
    block = 1;
    string elemtype$;
    numeric i, inRegion;
    for i = 1 to numberElements {
           elemtype$ = CADElementType(C, block, i);
           inRegion = CADElementInRegion(Rgn.$Data, C, block, i, "CompletelyInside");
           if (inRegion)
                  print(elemtype$, "element ", i, "is CompletelyInside");
           inRegion = CADElementInRegion(Rgn.$Data, C, block, i, "PartlyInside");
           if (inRegion)
                  print(elemtype$, "element ", i, "is PartlyInside");
           inRegion = CADElementInRegion(Rgn.$Data, C, block, i, "CompletelyOutside");
           if (inRegion)
                  print(elemtype$, "element ", i, "is CompletelyOutside");
           inRegion = CADElementInRegion(Rgn.$Data, C, block, i, "PartlyOutside");
           if (inRegion)
                  print(elemtype$, "element ", i, "is PartlyOutside");
           print("\n");
           }
    CloseCAD(C);
    


    CADElementType
    Returns type of CAD element.

    CADElementType(CADvar, block, element)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block number of the element
      numeric element
        The elment number of the element

    戻り値

      string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # example of CADElementType()
    # read the number of blocks in a CAD object
    # and then loop through all the blocks and print out type of each element
    clear();
    cad C;
    GetInputCAD(C);
    numeric numBlocks = CADNumBlocks(C);
    print("number of blocks: ", numBlocks);
    # loop through all blocks
    string elemtype$;
    numeric blk, numElements, elem;
    for blk = 1 to numBlocks {
           numElements = CADNumElements(C, blk);
           printf("block: %3d number of elements: %5d \n\n", blk, numElements);
           # loop through all elements
           for elem = 1 to numElements {
                  # get the element type
                  string elemtype$ = CADElementType(C, blk, elem);
                  printf("block: %3d element: %5d type: %s\n", blk, elem, elemtype$);
                  }
           }
    CloseCAD(C);
    


    CADGetElementList
    Get list of all elements of a given type in a block

    CADGetElementList(CADvar, block, elemtype$, elemlist)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      string elemtype$
        The type of element list desired
        可能性のある値:
          "BlockInsertion"
            a sublock
          "Point"
            a point
          "Circle"
            a circle
          "Arc"
            an arc
          "ArcChord"
            an arc chord
          "Text"
            a single line of text
          "Line"
            a line
          "Box"
            a rectangular box
          "Polygon"
            a polygon
          "Ellipse"
            an ellipse
          "EllipticalArc"
            an eliptical arc
          "ArcWedge"
            an arc wedge
          "EllipticalArcWedge"
            an eliptical arc wedge
          "EllipticalArcChord"
            an eliptical arc chord
      array elemlist
        One dimensional array of element numbers returned

    詳細と仮定

      The array elemlist will be resized to hold number of elements in the block.

    戻り値

      numeric
      number of elements

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # elemlist.sml
    # demonstrates how to get a list of elements of a specified
    # type in a block
    # define array to hold element list - will be resized to fit
    array numeric elemlist[10];
    numeric elem;
    clear();
    cad C;
    GetInputCAD(C);
    numeric numElem = CADNumElements(C, 1);
    # get list of lines
    numeric numLines = CADGetElementList( C, 1, "Line", elemlist );
    printf("number of elements: %4d number of lines: %4d \n", numElem, numLines);
    print("Line list:\n");
    for elem = 1 to numLines {
           printf("%4d %4d\n", elem, elemlist[elem]);
           }
    CloseCAD(C);
    


    CADInsertBlock
    Create a new CAD block for element insertion

    CADInsertBlock(CADvar, destblock, sourceblock, xinsert, yinsert, xscale, yscale, rotate, numlines, numcols, linespace, colspace)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric destblock
        The block to insert into
      numeric sourceblock
        The block to insert
      numeric xinsert
        X coordinate of insertion point
      numeric yinsert
        Y coordinate of insertion point
      numeric xscale (オプション)
        Optional - x scale factor of source block (default = 1)
      numeric yscale (オプション)
        Optional - y scale factor of source block (default = 1)
      numeric rotate (オプション)
        Rotation applied to source block
      numeric numlines (オプション)
        Number of times to repeat source block - x dimension
      numeric numcols (オプション)
        Number of times to repeat source block - y dimension
      numeric linespace (オプション)
        Optional - line spacing - x dimension (default = 0)
      numeric colspace (オプション)
        Column spacing - y dimension

    詳細と仮定

      The CAD exists and was opened with GetOutputCAD(). The optional parameters xScale, yscale, and rotation must all be used together. The same holds for numlines, numcols, linespace, and colspace. If the second block of optional parameters is used then the first block must be also.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # subblock.sml
    # demonstrates creating and inserting a subblock
    cad C;
    GetOutputCAD(C);
    # first create a box in block 1
    CADWriteBox(C, 1, 0, 0, 100, 100, 0);
    # now create a subblock
    CADCreateBlock(C,"BLOCK2", "subblock");
    # create a small box in the subblock
    CADWriteBox(C, 2, 0, 0, 10, 10, 45);
    # now insert with replication - create a grid
    numeric destblock = 1, sourceblock = 2;
    numeric xinsert = 0, yinsert = 0, xScale = 1, yscale = 1, rotate = 0;
    numeric numlines = 10, numcols = 10, linespace = 10, colspace = 10;
    CADInsertBlock(C, destblock, sourceblock, xinsert, yinsert,
    xScale, yscale, rotate, numlines, numcols, linespace, colspace);
    CloseCAD(C);
    


    CADNumBlocks
    Returns number of blocks in a CAD object

    CADNumBlocks(CADvar)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object

    詳細と仮定

      The CAD exists

    戻り値

      numeric
      number of blocks in CAD object

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # readelem.sml
    # demonstrate how to read the number of blocks in a CAD object
    # and then loop through all the blocks and print out type of
    # each element
    clear();
    cad C;
    GetInputCAD(C);
    numeric numBlocks = CADNumBlocks(C);
    print("number of blocks: ", numBlocks);
    # loop through all blocks
    string elemtype$;
    numeric blk, numElements, elem;
    for blk = 1 to numBlocks {
           numElements = CADNumElements(C, blk);
           printf("block: %3d number of elements: %5d \n\n", blk, numElements);
           # loop through all elements
           for elem = 1 to numElements {
                  # get the element type
                  elemtype$ = CADElementType(C, blk, elem);
                  printf("block: %3d element: %5d type: %s\n", blk, elem, elemtype$);
                  }
           }
    CloseCAD(C);
    


    CADNumElements
    Returns number of elements of all types in CAD object block

    CADNumElements(CADvar, block)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read the number of elements of

    詳細と仮定

      The CAD exists

    戻り値

      numeric
      number of elements in CAD object block

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # readelem.sml
    # demonstrate how to read the number of blocks in a CAD object
    # and then loop through all the blocks and print out type of
    # each element
    clear();
    cad C;
    GetInputCAD(C);
    numeric numBlocks = CADNumBlocks(C);
    print("number of blocks: ", numBlocks);
    # loop through all blocks
    string elemtype$;
    numeric blk, numElements, elem;
    for blk = 1 to numBlocks {
           numElements = CADNumElements(C, blk);
           printf("block: %3d number of elements: %5d \n\n", blk, numElements);
           # loop through all elements
           for elem = 1 to numElements {
                  # get the element type
                  elemtype$ = CADElementType(C, blk, elem);
                  printf("block: %3d element: %5d type: %s\n", blk, elem, elemtype$);
                  }
           }
    CloseCAD(C);
    


    CADReadArc
    Reads an arc

    CADReadArc(CADvar, block, element, xcenter, ycenter, radius, start, end, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable xcenter
        X coordinate of center returned
      numeric variable ycenter
        Y coordinate of center returned
      numeric variable radius
        Radius of the arc returned
      numeric variable start
        Start angle returned (in degrees)
      numeric variable end
        End angle returned (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # arc.sml
    # demonstrate creating and reading an arc CAD element
    clear();
    cad C;
    GetOutputCAD(C); # create a new file or open existing file
    # write an arc chord
    numeric xin = 100, yin = 200, rin = 50, startAngle = 0, endAngle = 175;
    CADWriteArc(C, 1, xin, yin, rin, startAngle, endAngle);
    # the elements are always appended to end of block
    # so get number of elements - last element will be ours
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric xCenter, yCenter, radius, sAngle, eAngle;
    CADReadArc(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle);
    print("write and read CAD arc");
    print("element  xCenter  yCenter   radius   sAngle   eAngle");
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius, sAngle, eAngle);
    CloseCAD(C);
    


    CADReadArcChord
    Reads an arc chord

    CADReadArcChord(CADvar, block, element, xcenter, ycenter, radius, start, end, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable xcenter
        X coordinate of center returned
      numeric variable ycenter
        Y coordinate of center returned
      numeric variable radius
        Radius of the arc returned
      numeric variable start
        Start angle returned (in degrees)
      numeric variable end
        End angle returned (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # arcchord.sml
    # demonstrate creating and reading an arc chord CAD element
    clear();
    cad C;
    GetOutputCAD(C); # create a new file or open existing file
    # write an arc
    numeric xin = 100, yin = 200, rin = 50, startAngle = 0, endAngle = 175;
    CADWriteArcChord(C, 1, xin, yin, rin, startAngle, endAngle);
    # the elements are always appended to end of block
    # so get number of elements - last element will be ours
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric xCenter, yCenter, radius, sAngle, eAngle;
    CADReadArcChord(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle);
    print("write and read CAD arc chord");
    print("element  xCenter  yCenter   radius   sAngle   eAngle");
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem,
    xCenter, yCenter, radius, sAngle, eAngle);
    CloseCAD(C);
    


    CADReadArcWedge
    Reads an arc wedge

    CADReadArcWedge(CADvar, block, element, xcenter, ycenter, radius, start, end, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable xcenter
        X coordinate of center returned
      numeric variable ycenter
        Y coordinate of center returned
      numeric variable radius
        Radius of the arc returned
      numeric variable start
        Start angle returned (in degrees)
      numeric variable end
        End angle returned (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # arcwedge.sml
    # demonstrate creating and reading an arc wedge CAD element
    clear();
    cad C;
    GetOutputCAD(C); # create a new file or open existing file
    # write an arc wedge
    numeric xin = 100, yin = 200, rin = 50, startAngle = 0, endAngle = 175;
    CADWriteArcWedge(C, 1, xin, yin, rin, startAngle, endAngle);
    # the elements are always appended to end of block
    # so get number of elements - last element will be ours
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric xCenter, yCenter, radius, sAngle, eAngle;
    CADReadArcWedge(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle);
    print("write and read CAD arc wedge");
    print("element  xCenter  yCenter   radius   sAngle   eAngle");
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius, sAngle, eAngle);
    CloseCAD(C);
    


    CADReadBox
    Reads a polygon box

    CADReadBox(CADvar, block, element, lowerleftx, lowerlefty, upperrightx, upperrighty, rotation, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable lowerleftx
        X coordinate of lower left corner of box returned
      numeric variable lowerlefty
        Y coordinate of lower left corner of box returned
      numeric variable upperrightx
        X coordinate of upper right corner of box returned
      numeric variable upperrighty
        Y coordinate of upper right corner of box returned
      numeric variable rotation
        Rotation of box with respect to world x axis
        returned (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # box.sml
    # demonstrate creating and reading a box CAD element
    # define array to hold element list
    array numeric elemlist[10];
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    numeric llX, llY, urX, urY;
    llX = 2000; # define lower left x, y
    llY = 2000;
    urX = 2500; # define upper right x, y
    urY = 2050;
    numeric rotation;
    for rotation = 0 to 180 step 20 {
           CADWriteBox(C, 1, llX, llY, urX, urY, rotation);
           }
    # now read out the box values
    numeric numElem = CADNumElements(C, 1);
    numeric numBoxes = CADGetElementList(C, 1, "Box", elemlist );
    printf("number of elements: %4d number of boxes: %4d \n", numElem, numBoxes);
    print("box list:\n");
    numeric elem;
    for elem = 1 to numBoxes {
           CADReadBox(C, 1, elemlist[elem], llX, llY, urX, urY, rotation);
           printf("%4d %4d %6.2f %6.2f %6.2f %6.2f %6.2f\n", elem, elemlist[elem], llX, llY, urX, urY, rotation);
           }
    CloseCAD(C);
    


    CADReadCircle
    Reads a circle

    CADReadCircle(CADvar, block, element, xcenter, ycenter, radius, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable xcenter
        X coordinate of center returned
      numeric variable ycenter
        Y coordinate of center returned
      numeric variable radius
        Radius of the circle returned
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # circle.sml
    # demonstrate creating and reading a circle CAD element
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write a circle
    numeric xin, yin, rin;
    xin = 100; yin = 200; rin = 50;
    CADWriteCircle(C, 1, xin, yin, rin);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our circle
    numeric lastelem = CADNumElements(C, 1);
    # now read circle data for most recently added element
    numeric xCenter, yCenter, radius;
    CADReadCircle(C, 1, lastelem, xCenter, yCenter, radius);
    print("write and read CAD circle");
    print("element  xCenter  yCenter   radius");
    printf("%7d %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius);
    CloseCAD(C);
    


    CADReadEllipse
    Reads an ellipse

    CADReadEllipse(CADvar, block, element, xcenter, ycenter, xsize, ysize, rotate, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable xcenter
        X coordinate of center returned
      numeric variable ycenter
        Y coordinate of center returned
      numeric variable xsize
        X width of ellipse returned
      numeric variable ysize
        Y width of ellipse returned
      numeric variable rotate
        Rotation with respect to the world x axis returned (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # ellipse.sml
    # demonstrate creating and reading an ellipse CAD element
    clear();
    cad C;
    GetOutputCAD(C); # create a new file or open existing file
    # write an ellipse
    numeric xin = 1000, yin = 2000, xSize = 500, ySize = 300, rotation = 45;
    CADWriteEllipse(C, 1, xin, yin, xSize, ySize, rotation);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our ellipse
    numeric lastelem = CADNumElements(C, 1);
    # now read ellipse data for most recently added element
    numeric xCenter, yCenter;
    CADReadEllipse(C, 1, lastelem, xCenter, yCenter, xSize, ySize, rotation);
    print("write and read CAD ellipse");
    print("element  xCenter  yCenter    xSize    ySize rotation");
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, xSize, ySize, rotation);
    CloseCAD(C);
    


    CADReadEllipticalArc
    Reads an elliptical arc

    CADReadEllipticalArc(CADvar, block, element, xcenter, ycenter, xsize, ysize, start, end, rotate, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable xcenter
        X coordinate of center returned
      numeric variable ycenter
        Y coordinate of center returned
      numeric variable xsize
        X width of ellipse returned
      numeric variable ysize
        Y width of ellipse returned
      numeric variable start
        Start angle returned (in degrees)
      numeric variable end
        End angle returned (in degrees)
      numeric variable rotate
        Rotation of ellipse axis with respect to the world x axis returned (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # earc.sml
    # demonstrate creating and reading an elliptical arc CAD element
    clear();
    cad C;
    # create a new file or open existing file
    GetOutputCAD(C);
    # write an elliptical arc
    numeric xin = 1000, yin = 2000, xSize = 500, ySize = 300;
    numeric startAngle = 30, endAngle = 150, rotation = 45;
    CADWriteEllipticalArc(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation);
    # the elements are always appended to end of block
    # so get number of elements - last element will be ours
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric xCenter, yCenter, sAngle, eAngle;
    CADReadEllipticalArc(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
    print("write and read CAD elliptical arc");
    string a$ = "element  xCenter  yCenter    ";
    string b$ = "xSize    ySize   sAngle  eAngle rotation";
    print(a$ + b$);
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
    lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle,
    rotation);
    CloseCAD(C);
    


    CADReadEllipticalArcChord
    Reads an elliptical arc chord

    CADReadEllipticalArcChord(CADvar, block, element, xcenter, ycenter, xsize, ysize, start, end, rotate, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable xcenter
        X coordinate of center returned
      numeric variable ycenter
        Y coordinate of center returned
      numeric variable xsize
        X width of ellipse returned
      numeric variable ysize
        Y width of ellipse returned
      numeric variable start
        Start angle returned (in degrees)
      numeric variable end
        End angle returned (in degrees)
      numeric variable rotate
        Rotation of ellipse axis with respect to the world x axis returned (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # echord.sml
    # demonstrate creating and reading an
    # elliptical arc chord CAD element
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write an elliptical arc chord
    numeric xin = 1000, yin = 2000, xSize = 500, ySize = 300, startAngle = 30;
    numeric endAngle = 150, rotation = 45;
    CADWriteEllipticalArcChord(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation);
    # the elements are always appended to end of block
    # so get number of elements - last element will be ours
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric xCenter, yCenter, sAngle, eAngle;
    CADReadEllipticalArcChord(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
    print("write and read CAD elliptical arc chord");
    string a$ = "element  xCenter  yCenter    ";
    string b$ = "xSize    ySize   sAngle  eAngle rotation";
    print(a$ + b$);
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
    lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
    CloseCAD(C);
    


    CADReadEllipticalArcWedge
    Reads an elliptical arc wedge.

    CADReadEllipticalArcWedge(CADvar, block, element, xcenter, ycenter, xsize, ysize, start, end, rotate, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable xcenter
        X coordinate of center returned
      numeric variable ycenter
        Y coordinate of center returned
      numeric variable xsize
        X width of ellipse returned
      numeric variable ysize
        Y width of ellipse returned
      numeric variable start
        Start angle returned (in degrees)
      numeric variable end
        End angle returned (in degrees)
      numeric variable rotate
        Rotation of ellipse axis with respect to the world x axis returned (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # ewedge.sml
    # demonstrate creating and reading an
    # elliptical arc wedge CAD element
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write an elliptical arc wedge
    numeric xin = 1000, yin = 2000, xSize = 500, ySize = 300, startAngle = 30;
    numeric endAngle = 150, rotation = 45;
    CADWriteEllipticalArcWedge(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation);
    # the elements are always appended to end of block
    # so get number of elements - last element will be ours
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric xCenter, yCenter, sAngle, eAngle;
    CADReadEllipticalArcWedge(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
    print("write and read CAD elliptical arc wedge");
    string a$ = "element  xCenter  yCenter    ";
    string b$ = "xSize    ySize   sAngle  eAngle rotation";
    print(a$ + b$);
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
    lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle,
    rotation);
    CloseCAD(C);
    


    CADReadLine
    Reads a line

    CADReadLine(CADvar, block, element, xpoints, ypoints, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      array xpoints
        One dimensional array of x coordinates returned
      array ypoints
        One dimensional array of y coordinates returned
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      numeric
      number of points in the line

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # line.sml
    # demonstrate creating and reading a line CAD element
    # draws an amplitude modulated sine wave
    cad C;
    array numeric xPoints[1000];
    array numeric yPoints[1000];
    GetOutputCAD(C);
    numeric numberPoints = 250, inc = .025;
    numeric i, x;
    for i = 1 to numberPoints {
           x = i * inc;
           xPoints[i] = x;
           yPoints[i] = sin(x) * cos(10 * x);
           }
    CADWriteLine(C, 1, numberPoints, xPoints, yPoints);
    # now read and print out the points
    numberPoints = CADReadLine(C, 1, 1, xPoints, yPoints);
    print("line point list:\n");
    numeric elem;
    for elem = 1 to numberPoints {
           printf("%4d %6.2 %6.2f\n", elem, xPoints[elem], yPoints[elem]);
           }
    CloseCAD(C);
    


    CADReadPoint
    Reads a single point

    CADReadPoint(CADvar, block, element, xcoord, ycoord, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable xcoord
        X coordinate of point returned
      numeric variable ycoord
        Y coordinate of point returned
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # point.sml
    # demonstrate creating and reading a point CAD element
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write a point
    numeric xin = 100, yin = 200;
    CADWritePoint(C, 1, xin, yin);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our point
    numeric lastelem = CADNumElements(C, 1);
    # now read point data for most recently added element
    numeric xCenter, yCenter;
    CADReadPoint(C, 1, lastelem, xCenter, yCenter);
    print("write and read CAD point");
    print("element  xCenter  yCenter");
    printf("%7d %8.2f %8.2f \n", lastelem, xCenter, yCenter);
    CloseCAD(C);
    


    CADReadPoly
    Reads a polygon

    CADReadPoly(CADvar, block, element, xpoints, ypoints, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      array xpoints
        One dimensional array of x coordinates returned returned
      array ypoints
        One dimensional array of y coordinates returned returned
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      numeric
      number of points in the polygon

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # poly.sml
    # demonstrate creating and reading a polygon CAD element
    clear();
    cad C;
    array numeric xPoints[1000];
    array numeric yPoints[1000];
    GetOutputCAD(C);
    # define the polygon (triangle)
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 100;
    yPoints[2] = 0;
    xPoints[3] = 50;
    yPoints[3] = 100;
    numeric numberPoints = 3; # polygon will automatically close to last point
    CADWritePoly(C, 1, numberPoints, xPoints, yPoints);
    # now read and print out the points
    numberPoints = CADReadPoly( C, 1, 1, xPoints, yPoints);
    print("polygon point list:\n");
    numeric elem;
    for elem = 1 to numberPoints {
           printf("%4d %6.2f %6.2f\n", elem, xPoints[elem], yPoints[elem]);
           }
    CloseCAD(C);
    


    CADReadPolyLine
    Read a cad element into the polyline

    CADReadPolyLine(CADvar, block, element, polyline, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      class polyline
        Polyline returned
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    戻り値

      numeric

    作成日時: 27-May-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    CADReadText
    Reads a single line of text

    CADReadText(CADvar, block, element, basex1, basey1, basex2, basey2, textheight, rotation, xscale, shear, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block to read from
      numeric element
        The element to read
      numeric variable basex1
        X coordinate of first base point returned
      numeric variable basey1
        Y coordinate of first base point returned
      numeric variable basex2
        X coordinate of second base point returned
      numeric variable basey2
        Y coordinate of second base point returned
      numeric variable textheight
        The height of text in CAD coordinates returned
      numeric variable rotation
        Rotation angle of baseline returned (in degrees)
      numeric variable xscale
        X scale factor relative to height returned
      numeric variable shear
        Shear angle returned (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD, block, and element exist

    戻り値

      string
      the text string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # text.sml
    # demonstrate creating and reading a text CAD element
    clear();
    cad C;
    string format$ = "%7d %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n";
    # create a new file or open existing file
    GetOutputCAD(C);
    # write some text
    numeric baseX1 = 100, baseY1 = 100, baseX2 = 200, baseY2 = 100;
    numeric height = 100, rotation = 0, xScale = 1.0, shear = 0;
    # since rotation = 0 we will use both basepoints
    string text$ = "CAD text string 1";
    CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our text
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    string text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2,
    baseY2, height, rotation, xScale, shear);
    print("write and read CAD text");
    print("element   baseX1   baseY1   baseX2   baseY2   height   rotation   xScale    shear");
    printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    print("Text: ", text$);
    # now use rotation and one base point
    numeric baseX1 = 100, baseY1 = 500;
    numeric baseX2 = 0, baseY2 = 0; # don't care
    numeric height = 100, rotation = 45, xScale = 1.0, shear = -40; # angle text backwards
    string text$ = "CAD text string 2 - rotated and sheared";
    CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    string text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    print("Text: ", text$);
    CloseCAD(C);
    


    CADUnattachDBRecord
    Attach a database record to a CAD element

    CADUnattachDBRecord(CADvar, block, elemnum, table, recnum)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The CAD object
      numeric block
        The block that the element is in
      numeric elemnum
        The element to attach the record to
      class DBTABLEINFO table
        The table the record is in
      numeric recnum
        The record number

    戻り値

      なし

    作成日時: 16-May-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    cad C;
    GetOutputCAD(C);
    class DATABASE db;
    class DBTABLEINFO table;
    # write a point
    numeric xin = 100, yin = 200;
    CADWritePoint(C, 1, xin, yin);
    CADWritePoint(C, 1, xin+yin, yin);
    CADWritePoint(C, 1, xin-yin, yin);
    CADWritePoint(C, 1, xin, yin+xin);
    # now create a table
    db = OpenCADDatabase(C);
    table = TableCreate(db, "MyTable", "Newly Created Table");
    TableAddFieldInteger(table, "NewField");
    # write some important info to the db table
    TableWriteRecord(table, 0, 55);
    TableWriteRecord(table, 0, 45);
    # attach the records to elements
    CADAttachDBRecord(C, 1, 1, table, 1);
    CADUnattachDBRecord(C, 1, 1, table, 1);
    CADAttachDBRecord(C, 1, 1, table, 2);
    CADAttachDBRecord(C, 1, 2, table, 1);
    CADAttachDBRecord(C, 1, 3, table, 2);
    CADAttachDBRecord(C, 1, 4, table, 1);
    


    CADWriteArc
    Creates an arc

    CADWriteArc(CADvar, block, xcenter, ycenter, radius, start, end, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric xcenter
        X coordinate of center
      numeric ycenter
        Y coordinate of center
      numeric radius
        Radius of the arc
      numeric start
        Start angle (in degrees)
      numeric end
        End angle (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # arc.sml
    # demonstrates creating and reading an arc CAD element
    clear();
    cad C;
    GetOutputCAD(C); # create a new file or open existing file
    # write an arc
    numeric xin = 100, yin = 200, rin = 50, startAngle = 0, endAngle = 175;
    CADWriteArc(C, 1, xin, yin, rin, startAngle, endAngle);
    # the elements are always appended to end of block
    # so get number of elements - last element will be ours
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric radius, sAngle, eAngle, xCenter, yCenter;
    CADReadArc(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle);
    print("write and read CAD arc");
    print("element  xCenter  yCenter   radius   sAngle   eAngle");
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter,
    yCenter, radius, sAngle, eAngle);
    CloseCAD(C);
    


    CADWriteArcChord
    Creates an arc chord

    CADWriteArcChord(CADvar, block, xcenter, ycenter, radius, start, end, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric xcenter
        X coordinate of center
      numeric ycenter
        Y coordinate of center
      numeric radius
        Radius of the arc
      numeric start
        Start angle (in degrees)
      numeric end
        End angle (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # arcchord.sml
    # demonstrate creating and reading an arc chord CAD element
    clear();
    cad C;
    GetOutputCAD(C); # create a new file or open existing file
    # write an arc
    numeric xin = 100, yin = 200, rin = 50, startAngle = 0, endAngle = 175;
    CADWriteArcChord(C, 1, xin, yin, rin, startAngle, endAngle);
    # the elements are always appended to end of block
    # so get number of elements - last element will be ours
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric radius, sAngle, eAngle, xCenter, yCenter;
    CADReadArcChord(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle);
    print("write and read CAD arc chord");
    print("element  xCenter  yCenter   radius   sAngle   eAngle");
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius, sAngle, eAngle);
    CloseCAD(C);
    


    CADWriteArcWedge
    Creates an arc wedge

    CADWriteArcWedge(CADvar, block, xcenter, ycenter, radius, start, end, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric xcenter
        X coordinate of center
      numeric ycenter
        Y coordinate of center
      numeric radius
        Radius of the arc
      numeric start
        Start angle (in degrees)
      numeric end
        End angle (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # arcwedge.sml
    # demonstrate creating and reading an arc wedge CAD element
    clear();
    cad C;
    GetOutputCAD(C); # create a new file or open existing file
    # write an arc
    numeric xin = 100, yin = 200, rin = 50, startAngle = 0, endAngle = 175;
    CADWriteArcWedge(C, 1, xin, yin, rin, startAngle, endAngle);
    # the elements are always appended to end of block
    # so get number of elements - last element will be ours
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric radius, sAngle, eAngle, xCenter, yCenter;
    CADReadArcWedge(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle);
    print("write and read CAD arc wedge");
    print("element  xCenter  yCenter   radius   sAngle   eAngle");
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius, sAngle, eAngle);
    


    CADWriteBox
    Creates a polygon from lower left and upper right corner points

    CADWriteBox(CADvar, block, lowerleftx, lowerlefty, upperrightx, upperrighty, rotation, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric lowerleftx
        X coordinate of lower left corner of box
      numeric lowerlefty
        Y coordinate of lower left corner of box
      numeric upperrightx
        X coordinate of upper right corner of box
      numeric upperrighty
        Y coordinate of upper right corner of box
      numeric rotation (オプション)
        Optional - rotation of box with respect to
        world x axis (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # box.sml
    # demonstrate creating and reading a box CAD element
    clear();
    # define array to hold element list
    array numeric elemlist[10];
    cad C;
    # create a new file or open existing file
    GetOutputCAD(C);
    numeric llX = 2000; # define lower left x, y
    numeric llY = 2000;
    numeric urX = 2500; # define upper right x, y
    numeric urY = 2050;
    numeric rotation;
    for rotation = 0 to 180 step 20 {
           CADWriteBox(C, 1, llX, llY, urX, urY, rotation);
           }
    # now read out the box values
    numeric numElem = CADNumElements(C, 1);
    numeric numBoxes = CADGetElementList(C, 1, "Box", elemlist );
    printf("number of elements: %4d number of boxes: %4d \n", numElem, numBoxes);
    print("box list:\n");numeric elem;
    for elem = 1 to numBoxes {
           CADReadBox(C, 1, elemlist[elem], llX, llY, urX, urY, rotation);
           printf("%4d %4d %6.2f %6.2f %6.2f %6.2f %6.2f\n", elem, elemlist[elem], llX, llY, urX, urY, rotation);
           }
           
    CloseCAD(C);
    


    CADWriteCircle
    Creates a circle

    CADWriteCircle(CADvar, block, xcenter, ycenter, radius, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric xcenter
        X coordinate of center
      numeric ycenter
        Y coordinate of center
      numeric radius
        Radius of the circle
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # circle.sml
    # demonstrate creating and reading a circle CAD element
    cad C;
    GetOutputCAD(C); # create a new file or open existing file
    # write a circle
    numeric xin = 100, yin = 200, rin = 50;
    CADWriteCircle(C, 1, xin, yin, rin);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our circle
    numeric lastelem = CADNumElements(C, 1);
    # now read circle data for most recently added element
    numeric xCenter, yCenter, radius;
    CADReadCircle(C, 1, lastelem, xCenter, yCenter, radius);
    print("write and read CAD circle");
    print("element  xCenter  yCenter   radius");
    printf("%7d %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius);
    CloseCAD(C);
    


    CADWriteEllipse
    Creates an ellipse

    CADWriteEllipse(CADvar, block, xcenter, ycenter, xsize, ysize, rotate, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric xcenter
        X coordinate of center
      numeric ycenter
        Y coordinate of center
      numeric xsize
        X width of ellipse
      numeric ysize
        Y width of ellipse
      numeric rotate
        Rotation with respect to the world x axis (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # ellipse.sml
    # demonstrate creating and reading an ellipse CAD element
    clear();
    cad C;
    GetOutputCAD(C); # create a new file or open existing file
    # write an ellipse
    numeric xin = 1000, yin = 2000, xSize = 500, ySize = 300, rotation = 45;
    CADWriteEllipse(C, 1, xin, yin, xSize, ySize, rotation);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our ellipse
    numeric lastelem = CADNumElements(C, 1);
    # now read ellipse data for most recently added element
    numeric xCenter, yCenter, xSize, ySize, radius;
    CADReadEllipse(C, 1, lastelem, xCenter, yCenter, xSize, ySize, rotation);
    print("write and read CAD ellipse");
    print("element  xCenter  yCenter    xSize    ySize rotation");
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, xSize, ySize, rotation);
    CloseCAD(C);
    


    CADWriteEllipticalArc
    Creates an elliptical arc

    CADWriteEllipticalArc(CADvar, block, xcenter, ycenter, xsize, ysize, start, end, rotate, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric xcenter
        X coordinate of center
      numeric ycenter
        Y coordinate of center
      numeric xsize
        X width of ellipse
      numeric ysize
        Y width of ellipse
      numeric start
        Start angle (in degrees)
      numeric end
        End angle (in degrees)
      numeric rotate
        Rotation of ellipse axis with respect to the world x axis (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # earc.sml
    # demonstrate creating and reading an elliptical arc CAD element
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write a elliptical arc
    numeric xin = 1000, yin = 2000, xSize = 500, ySize = 300, startAngle = 30;
    numeric endAngle = 150, rotation = 45;
    CADWriteEllipticalArc(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our ellipse
    numeric lastelem = CADNumElements(C, 1);
    # now read ellipse data for most recently added element
    numeric radius, sAngle, eAngle, xCenter, yCenter;
    CADReadEllipticalArc(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
    print("write and read CAD elliptical arc");
    string a$ = "element  xCenter  yCenter    ";
    string b$ = "xSize    ySize   sAngle  eAngle rotation";
    print(a$ + b$);
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
    lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
    CloseCAD(C);
    


    CADWriteEllipticalArcChord
    Creates an elliptical arc chord

    CADWriteEllipticalArcChord(CADvar, block, xcenter, ycenter, xsize, ysize, start, end, rotate, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric xcenter
        X coordinate of center
      numeric ycenter
        Y coordinate of center
      numeric xsize
        X width of ellipse
      numeric ysize
        Y width of ellipse
      numeric start
        Start angle (in degrees)
      numeric end
        End angle (in degrees)
      numeric rotate
        Rotation of ellipse axis with respect to the world x axis (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # echord.sml
    # demonstrate creating and reading an
    # elliptical arc chord CAD element
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write an elliptical arc chord
    numeric xin = 1000, yin = 2000, xSize = 500, ySize = 300, startAngle = 30;
    numeric endAngle = 150, rotation = 45;
    CADWriteEllipticalArcChord(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our ellipse
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric radius, sAngle, eAngle, xCenter, yCenter;
    CADReadEllipticalArcChord(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
    print("write and read CAD elliptical arc chord");
    string a$ = "element  xCenter  yCenter    ";
    string b$ = "xSize    ySize   sAngle  eAngle rotation";
    print(a$ + b$);
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
    lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
    CloseCAD(C);
    


    CADWriteEllipticalArcWedge
    Creates an elliptical arc wedge

    CADWriteEllipticalArcWedge(CADvar, block, xcenter, ycenter, xsize, ysize, start, end, rotate, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric xcenter
        X coordinate of center
      numeric ycenter
        Y coordinate of center
      numeric xsize
        X width of ellipse
      numeric ysize
        Y width of ellipse
      numeric start
        Start angle (in degrees)
      numeric end
        End angle (in degrees)
      numeric rotate
        Rotation of ellipse axis with respect to the world x axis (in degrees)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # ewedge.sml
    # demonstrate creating and reading an
    # elliptical arc wedge CAD element
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write an elliptical arc wedge
    numeric xin = 1000, yin = 2000, xSize = 500, ySize = 300, startAngle = 30;
    numeric endAngle = 150, rotation = 45;
    CADWriteEllipticalArcWedge(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation);
    # the elements are always appended to end of block
    # so get number of elements - last element will be ours
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    numeric radius, sAngle, eAngle, xCenter, yCenter;
    CADReadEllipticalArcWedge(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
    print("write and read CAD elliptical arc wedge");
    string a$ = "element  xCenter  yCenter    ";
    string b$ = "xSize    ySize   sAngle  eAngle  rotation";
    print(a$ + b$);
    printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
    lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
    CloseCAD(C);
    


    CADWriteLine
    Creates a line

    CADWriteLine(CADvar, block, numPoints, xpoints, ypoints, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric numPoints
        Number of points in the line
      array xpoints
        One dimensional array of x coordinates
      array ypoints
        One dimensional array of y coordinates
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # line.sml
    # demonstrate creating and reading a line CAD element
    # draws an amplitude modulated sine wave
    cad C;
    array numeric xPoints[1000];
    array numeric yPoints[1000];
    GetOutputCAD(C);
    numeric i, x, numberPoints = 250, inc = .025;
    for i = 1 to numberPoints {
           x = i * inc;
           xPoints[i] = x;
           yPoints[i] = sin(x) * cos(10 * x);
           }
    CADWriteLine(C, 1, numberPoints, xPoints, yPoints);
    # now print out the points
    numeric numberPoints = CADReadLine(C, 1, 1, xPoints, yPoints);
    print("line point list:\n");
    numeric elem;
    for elem = 1 to numberPoints {
           printf("%4d %6.2 %6.2f\n", elem, xPoints[elem], yPoints[elem]);
           }
    CloseCAD(C);
    


    CADWritePoint
    Creates a single point

    CADWritePoint(CADvar, block, xcoord, ycoord, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric xcoord
        X coordinate of point
      numeric ycoord
        Y coordinate of point
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # point.sml
    # demonstrate creating and reading a point CAD element
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write a point
    numeric xin = 100, yin = 200;
    CADWritePoint(C, 1, xin, yin);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our point
    numeric lastelem = CADNumElements(C, 1);
    # now read point data for most recently added element
    numeric xCenter, yCenter;
    CADReadPoint(C, 1, lastelem, xCenter, yCenter);
    print("write and read CAD point");
    print("element  xCenter  yCenter");
    printf("%7d %8.2f %8.2f \n", lastelem, xCenter, yCenter);
    CloseCAD(C);
    


    CADWritePoly
    Creates a polygon

    CADWritePoly(CADvar, block, numPoints, xpoints, ypoints, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      numeric numPoints
        Number of points in the polygon
      array xpoints
        One dimensional array of x coordinates
      array ypoints
        One dimensional array of y coordinates
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # poly.sml
    # demonstrate creating and reading a polygon CAD element
    cad C;
    array numeric xPoints[1000];
    array numeric yPoints[1000];
    clear();
    GetOutputCAD(C);
    # define the polygon (triangle)
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 100;
    yPoints[2] = 0;
    xPoints[3] = 50;
    yPoints[3] = 100;
    numeric numberPoints = 3; # polygon will automatically close to last point
    CADWritePoly(C, 1, numberPoints, xPoints, yPoints);
    # now print out the points
    numberPoints = CADReadPoly(C, 1, 1, xPoints, yPoints);
    print("polygon point list:\n");
    numeric elem, numberPoints;
    for elem = 1 to numberPoints {
           printf("%4d %6.2f %6.2f\n", elem, xPoints[elem], yPoints[elem]);
           }
    CloseCAD(C);
    


    CADWritePolyLine
    Write a cad element from a given polyline

    CADWritePolyLine(CADvar, block, polyline, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      class polyline
        The polyline of coordinate points
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    戻り値

      なし

    作成日時: 27-May-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    CADWriteText
    Creates a single line of text

    CADWriteText(CADvar, block, text$, basex1, basey1, basex2, basey2, textheight, rotation, xscale, shear, elemopt)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object
      numeric block
        The block to write to
      string text$
        The text to write
      numeric basex1
        X coordinate of first base point
      numeric basey1
        Y coordinate of first base point
      numeric basex2
        X coordinate of second base point
      numeric basey2
        Y coordinate of second base point
      numeric textheight
        The height of text in CAD coordinates
      numeric rotation (オプション)
        Optional - rotation angle of baseline (in degrees,
        default = 0)
      numeric xscale (オプション)
        Optional - x scale factor relative to height
        (default = 1.0)
      numeric shear (オプション)
        Optional - shear angle (in degrees) use for italic
        effects (default = 0)
      class CADELEMOPT elemopt (オプション)
        Optional element parameters

    詳細と仮定

      The CAD and block exist. Use of any optional parameter,
      (rotation, xScale, or shear), requires the use of all optional
      parameters preceeding it. Rotation can be achieved by giving two
      baseline points or one baseline point and a rotation angle. If
      rotation is non-zero then the baseX2, and baseY2 parameters are
      ignored. See the sample script below for examples of both cases.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # text.sml
    # demonstrate creating and reading a text CAD element
    clear();
    string format$ = "%7d %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n";
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write some text
    numeric baseX1 = 100, baseY1 = 100, baseX2 = 200, baseY2 = 100, height = 100;
    numeric rotation = 0, xScale = 1.0, shear = 0;
    # since rotation = 0 we will use both basepoints
    string text$ = "CAD text string 1";
    CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our text
    numeric lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    print("write and read CAD text");
    print("element   baseX1   baseY1   baseX2   baseY2   height ", "rotation   xScale    shear");
    printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    print("Text: ", text$);
    # now use rotation and one base point
    baseX1 = 100;
    baseY1 = 500;
    baseX2 = 0; # don't care
    baseY2 = 0; # don't care
    height = 100;
    rotation = 45;
    xScale = 1.0;
    shear = -40; # angle text backwards
    text$ = "CAD text string 2 - rotated and sheared";
    CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    lastelem = CADNumElements(C, 1);
    # now read data for most recently added element
    text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear);
    print("Text: ", text$);
    CloseCAD(C);
    


    CloseCAD
    Closes a previously opened CAD object

    CloseCAD(CADvar)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        A valid CAD object variable name

    詳細と仮定

      The CADVar is a valid variable name and was previously opened

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    cad C;
    GetInputCAD(C);
    # or GetOutputCAD(C)
    # do something with CAD object C
    CloseCAD(C);
    


    CreateCAD
    Create a CAD object

    CreateCAD(CADvar, filename$, objname$, desc$, Credentials)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        CAD variable to reference the object by
      string filename$
        RVC file name to hold the object
      string objname$
        RVC object name of the new object
      string desc$
        Description for the new object
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      なし

    作成日時: 16-May-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/deveg68.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GetInputCAD
    Use a File/Object selection dialog to select an input CAD

    GetInputCAD(CADvar)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The input CAD object

    詳細と仮定

      The CADVar is a valid variable name

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # read elem.sml
    # demonstrates how to read the number of blocks in a CAD object
    # and loop through all the blocks and print out type of each
    # element
    clear();
    cad C;
    GetInputCAD(C);
    numeric numBlocks = CADNumBlocks(C);
    print("number of blocks: ", numBlocks);
    string elemtype$;
    numeric numElements;
    # loop through all blocks
    numeric blk, elem;
    for blk = 1 to numBlocks {
           numElements = CADNumElements(C, blk);
           printf("block: %3d number of elements: %5d \n\n", blk, numElements);
           
           # loop through all elements
           for elem = 1 to numElements {
                  # get the element type
                  elemtype$ = CADElementType(C, blk, elem);
                  printf("block: %3d element: %5d type: %s\n", blk, elem, elemtype$);
                  }
           }
    CloseCAD(C);
    


    GetOutputCAD
    Opens a CAD object for reading or writing

    GetOutputCAD(CADvar)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object

    詳細と仮定

      The CAD is a valid variable name

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # circle.sml
    # demonstrate creating and reading a circle CAD element
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write a circle
    numeric xin = 100, yin = 200, rin = 50;
    CADWriteCircle(C, 1, xin, yin, rin);
    # the elements are always appended to end of block
    # so get number of elements - last element will be our circle
    numeric lastelem = CADNumElements(C, 1);
    # now read cirle data for most recently added element
    numeric xCenter, yCenter, radius;
    CADReadCircle(C, 1, lastelem, xCenter, yCenter, radius);
    print("write and read CAD circle");
    print("element  xCenter  yCenter   radius");
    printf("%7d %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius);
    CloseCAD(C);
    


    OpenCAD
    Open a CAD object given a filename and objectname

    OpenCAD(CADvar, filename$, objname$, Credentials)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        CAD variable to reference the object by
      string filename$
        File name of the RVC file containing the object
      string objname$
        RVC object name of the object to open
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      なし

    作成日時: 16-May-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    CloseTIN(TINvar)

    場所:

    パラメータ:

      TIN TINvar
        A valid TIN variable

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    tin TinIn;
    GetInputTIN(TinIn);
    # do something useful with the tin
    CloseTIN(TinIn);
    


    CreateTIN
    Create a new TIN object

    CreateTIN(TINvar, filename$, objname$, description$, Credentials)

    場所:

      TIN

    パラメータ:

    戻り値

      numeric

    作成日時: 21-Sep-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetInputTIN
    Use a File/Object selection dialog to select an input TIN

    GetInputTIN(TIN)

    場所:

      TIN

    パラメータ:

      TIN TIN
        A valid TIN variable

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    tin TinIn;
    GetInputTIN(TinIn);
    # do something useful with the tin
    CloseTIN(TinIn);
    


    GetOutputTIN
    Use a File/Object selection dialog to select an output TIN

    GetOutputTIN(TIN, flag1$, flag2$)

    場所:

      TIN

    パラメータ:

      TIN TIN
        A valid TIN variable
      string flag1$ (オプション)
        See below
        可能性のある値:
          "TINToolkit"
            Open existing or create new TIN object for write
      string flag2$ (オプション)
        See below
        可能性のある値:
          "TINToolkit"
            Open existing or create new TIN object for write

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class tin Tout;
    GetOutputTIN(Tout);
    # get the RVC file name
    string str$ = GetObjectFileName(Tout);
    numeric objNum = GetObjectNumber(Tout);
    clear();
    print("TIN Object Number: ", objNum, "RVC file Name: ", str$);
    


    OpenTIN
    Open a TIN object

    OpenTIN(TINvar, filename$, objname$, Credentials)

    場所:

      TIN

    パラメータ:

      TIN TINvar
        The TIN object
      string filename$
        The filename to read from
      string objname$
        The object open
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      numeric

    作成日時: 21-Sep-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    TINAddNode
    Add a node to a TIN object

    TINAddNode(TIN, x, y, z)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object
      numeric x
        X coordinate of the node
      numeric y
        Y coordinate of the node
      numeric z
        Z coordinate of the node

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # addnode.sml
    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # note that node must be inside existing hull
    # use TINCreateFromNodes() to make initial TIN
    # get the extents - use georef version if needed
    numeric xMin, yMin, xMax, yMax;
    GetObjectExtents(Tout, xMin, yMin, xMax, yMax);
    print("xMin, yMin, xMax, yMax ", xMin, yMin, xMax, yMax);
    numeric x, y, z;
    x = floor((xMin + xMax) / 2);
    y = floor((yMin + yMax) / 2);
    z = 100; # set to what makes sense
    TINAddNode(Tout, x, y, z);
    print("node added at x, y ", x, y);
    


    TINCreateFromNodes
    Create a new TIN object from a list of nodes

    TINCreateFromNodes(TIN, numNodes, xpoints, ypoints, zpoints, zscale, zoffset, xytolerance)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object
      numeric numNodes
        Number of nodes to create
      array xpoints
        One dimensional array of x coordinates
      array ypoints
        One dimensional array of y coordinates
      array zpoints
        One dimensional array of z coordinates
      numeric zscale
        Scale applied to z values
      numeric zoffset
        Offset applied to z values
      numeric xytolerance
        Minimum allowed distance between points

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN() using
      the "TINToolkit" flag

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # declare arrays to hold node x, y, and z values
    array numeric x[100], y[100], z[100];
    numeric zscale = 1, zoffset = 0, xytolerance = 1;
    # create some node values
    numeric numnodes = 0, offset;
    numeric yy, xx;
    for yy = 0 to 4 {
           for xx = 0 to 4 {
                  if ((xx % 2) == 0) {
                         offset = 0;
                         }
                  else {
                         offset = 10;
                         }
                  numnodes += 1;
                  x[numnodes] = xx * 20;
                  y[numnodes] = yy * 20 + offset;
                  z[numnodes] = yy * 5 + xx * 10;
                  }
           }
    # create the tin
    TINCreateFromNodes(Tout, numnodes, x, y, z, zscale, zoffset, xytolerance);
    


    TINDeleteEdgeAndMakeHole
    Delete an edge from a TIN object and create a hole

    TINDeleteEdgeAndMakeHole(TIN, edge)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object
      numeric edge
        Number of edge to delete

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick an edge less than or equal
    # to number of edges
    numeric numedges, edge;
    numedges = TINNumberEdges(Tout);
    edge = floor(numedges / 2);
    TINDeleteEdgeAndMakeHole(Tout, edge);
    print("edge deleted ", edge);
    


    TINDeleteNode
    Delete a node from a TIN object without creating hole

    TINDeleteNode(TIN, node)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object
      numeric node
        Number of node to delete

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick a node less than or equal
    # to number of nodes
    numeric numnodes, node;
    numnodes = TINNumberNodes(Tout);
    node = floor(numnodes / 2);
    TINDeleteNode(Tout, node);
    print("node deleted ", node);
    


    TINDeleteNodeAndMakeHole
    Delete a node from a TIN object and create a hole

    TINDeleteNodeAndMakeHole(TIN, node)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object
      numeric node
        Number of node to delete

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # nodehole.sml
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick a node less than or equal
    # to number of nodes
    numeric numnodes, node;
    numnodes = TINNumberNodes(Tout);
    node = floor(numnodes / 2);
    TINDeleteNodeAndMakeHole(Tout, node);
    


    TINDeleteTriangleAndMakeHole
    Delete a triangle from a TIN object and create a hole

    TINDeleteTriangleAndMakeHole(TIN, triangle)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object
      numeric triangle
        Number of triangle to delete

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # trihole.sml
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick a triangle less than or equal
    # to number of triangle
    numeric numtriangles, triangle;
    numtriangles = TINNumberTriangles(Tout);
    triangle = floor(numtriangles / 2);
    TINDeleteTriangleAndMakeHole(Tout, triangle);
    print("triangle deleted ", triangle);
    


    TINDeleteTrianglesInPolygon
    Delete TIN triangles inside a polygon

    TINDeleteTrianglesInPolygon(TIN, numpoints, xpoints, ypoints)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN Object
      numeric numpoints
        Number of points in the polygon
      array xpoints
        Array of polygon X coordinates
      array ypoints
        Array of polygon Y coordinates

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    TIN T;
    GetOutputTIN(T, "TinToolkit");
    numeric minx, miny, maxx, maxy;
    numeric x1, y1, x2, y2;
    numeric numpoints = 4;
    numeric numtriangles = 0;
    array numeric arrayx[numpoints], arrayy[numpoints];
    array numeric triangles[10];
    # get the tin extents
    minx = T.$Info.MinX;
    miny = T.$Info.MinY;
    maxx = T.$Info.MaxX;
    maxy = T.$Info.MaxY;
    # define a four-sided poly and get the number of triangles
    x1 = minx + (maxx-minx) * (1/4);
    x2 = minx + (maxx-minx) * (3/4);
    y1 = miny + (maxy-miny) * (1/4);
    y2 = miny + (maxy-miny) * (3/4);
    arrayx[1] = x1;
    arrayx[2] = x2;
    arrayx[3] = x1;
    arrayx[4] = x2;
    arrayy[1] = y1;
    arrayy[2] = y1;
    arrayy[3] = y2;
    arrayy[4] = y2;
    numtriangles = TINGetTrianglesInPolygon(T, numpoints, arrayx, arrayy, triangles);
    print(numtriangles);
    TINDeleteTrianglesInPolygon(T, numpoints, arrayx, arrayy);
    


    TINElementInRegion
    Tests a TIN element against a region.

    TINElementInRegion(region, TINvar, element, ElemType$, TestType$)

    場所:

      TIN

    パラメータ:

      class REGION2D region
        The region variable
      TIN TINvar
        The TIN object
      numeric element
        The element number
      string ElemType$
        The element type to test
        可能性のある値:
          "node"
            the element is a node
          "edge"
            the element is an edge
          "triangle"
            the element is a triangle
      string TestType$ (オプション)
        The region test type to perform
        可能性のある値:
          "CompletelyInside"
            Is the element completely inside the region
          "PartlyInside"
            Is the element partially inside the region
          "CompletelyOutside"
            Is the element completely outside the region
          "PartlyOutside"
            Is the element partially outside the region

    戻り値

      numeric
      0 or 1

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # example of TINElementInRegion()
    tin Tin1;
    region reg;
    GetInputTIN(Tin1);
    GetInputRegion(reg);
    # check triangle 1
    numeric elem=1;
    numeric inRegion = TINElementInRegion(reg.$Data, Tin1, elem, "triangle", "CompletelyInside");
    if (inRegion)
           print( "element ", elem, "is CompletelyInside\n");
    


    TINGetConnectedEdgeList
    Returns list of all edges connected to a given node

    TINGetConnectedEdgeList(TIN, node, edgelist)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object
      numeric node
        The node
      array edgelist
        One dimensional array of edges returned

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      numeric
      number of edges

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # edgelist.sml
    clear();
    array numeric edgelist[100];
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick a node less than or equal to number of nodes
    numeric numnodes, node;
    numnodes = TINNumberNodes(Tout);
    node = floor(numnodes / 2);
    numeric numedges = TINGetConnectedEdgeList(Tout, node, edgelist);
    print("number of edges connected to node: ", node, " = ", numedges);
    numeric i;
    for i = 1 to numedges {
           print(edgelist[i]);
           }
    


    TINGetConnectedNodeList
    Returns list of all nodes connected to a given node

    TINGetConnectedNodeList(TIN, node, nodelist)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object
      numeric node
        The node
      array nodelist
        One dimensional array of nodes returned

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      numeric
      number of nodes

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # nodelist.sml
    tin Tout;
    array numeric nodelist[100];
    clear();
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick a node less than or equal to number of nodes
    numeric numnodes, node;
    numnodes = TINNumberNodes(Tout);
    node = floor(numnodes / 2);
    numnodes = TINGetConnectedNodeList(Tout, node, nodelist);
    print("number of nodes connected to node: ", node, " = ", numnodes);
    numeric i;
    for i = 1 to numnodes {
           print(nodelist[i]);
           }
    


    TINGetEdgeExtents
    Return x and y extents of a edge

    TINGetEdgeExtents(TINvar, edge, x1, y1, x2, y2)

    場所:

      TIN

    パラメータ:

      TIN TINvar
        The TIN object
      numeric edge
        The edge to read
      numeric variable x1
        First x coordinate of line returned
      numeric variable y1
        First y coordinate of line returned
      numeric variable x2
        Second x coordinate of line returned
      numeric variable y2
        Second y coordinate of line returned

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick an edge less than or equal to number of edges
    numeric numedges, edge;
    numedges = TINNumberEdges(Tout);
    edge = floor(numedges / 2);
    numeric x1, y1, x2, y2;
    TINGetEdgeExtents(Tout, edge, x1, y1, x2, y2);
    print("node, x1, y1, x2, y2 ", edge, x1, y1, x2, y2);
    


    TINGetEdgeNodesAndTriangles
    Returns nodes and left and right triangles for a given edge

    TINGetEdgeNodesAndTriangles(TINvar, edge, nodefrom, nodeto, lefttriangle, righttriangle)

    場所:

      TIN

    パラメータ:

      TIN TINvar
        The TIN object
      numeric edge
        The edge to read
      numeric variable nodefrom
        The node from
      numeric variable nodeto
        The node to
      numeric variable lefttriangle
        The left triangle
      numeric variable righttriangle
        The right triangle

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick an edge less than or equal
    # to number of edges
    numeric numedges, edge;
    numedges = TINNumberEdges(Tout);
    edge = floor(numedges / 2);
    numeric nodefrom, nodeto, lefttriangle, righttriangle;
    TINGetEdgeNodesAndTriangles(Tout, edge, nodefrom, nodeto, lefttriangle, righttriangle);
    string temp$ = "edge, nodefrom, nodeto, lefttriangle, righttriangle ";
    print(temp$, edge, nodefrom, nodeto, lefttriangle, righttriangle);
    


    TINGetNodeExtents
    Return x and y coordinates of a node

    TINGetNodeExtents(TINvar, node, xcoord, ycoord)

    場所:

      TIN

    パラメータ:

      TIN TINvar
        The TIN object
      numeric node
        The node to read
      numeric variable xcoord
        X coordinate of node returned
      numeric variable ycoord
        Y coordinate of node returned

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick a node less than or equal
    # to number of nodes
    numeric numnodes, node;
    numnodes = TINNumberNodes(Tout);
    node = floor(numnodes / 2);
    numeric xCoordinate, yCoordinate;
    TINGetNodeExtents(Tout, node, xCoordinate, yCoordinate);
    print("node, x, y ", node, xCoordinate, yCoordinate);
    


    TINGetNodeZValue
    Returns z value for a node

    TINGetNodeZValue(TINvar, node)

    場所:

      TIN

    パラメータ:

      TIN TINvar
        The TIN object
      numeric node
        The node to read

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      numeric
      The z value of the node.

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick a node less than or equal
    # to number of nodes
    numeric numnodes, node;
    numnodes = TINNumberNodes(Tout);
    node = floor(numnodes / 2);
    numeric zvalue = TINGetNodeZValue(Tout, node);
    print("node, zvalue ", node, zvalue);
    


    TINGetSurroundTriangleList
    Get the list of triangles surrounding a TIN node

    TINGetSurroundTriangleList(TIN, node, trianglelist)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object
      numeric node
        Node number
      array trianglelist
        List of triangles returned. Array will be resized

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      numeric
      number of triangles in array

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    TIN T;
    GetOutputTIN(T, "TinToolkit");
    array numeric list[10];
    numeric node=5;
    numeric num = TINGetSurroundTriangleList(T, node, list);
    print(num);
    


    TINGetTriangleExtents
    Return x and y extents of a triangle

    TINGetTriangleExtents(TINvar, triangle, x1, y1, x2, y2)

    場所:

      TIN

    パラメータ:

      TIN TINvar
        The TIN object
      numeric triangle
        The triangle to read
      numeric variable x1
        First x coordinate of triangle returned
      numeric variable y1
        First y coordinate of triangle returned
      numeric variable x2
        Second x coordinate of triangle returned
      numeric variable y2
        Second y coordinate of triangle returned

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick a triangle less than or equal
    # to number of triangle
    numeric numtriangles, triangle;
    numtriangles = TINNumberTriangles(Tout);
    triangle = floor(numtriangles / 2);
    numeric x1, y1, x2, y2;
    TINGetTriangleExtents(Tout, triangle, x1, y1, x2, y2);
    print("node, x1, y1, x2, y2 ", triangle, x1, y1, x2, y2);
    


    TINGetTriangleNodesAndEdges
    Returns the nodes and edges that make up a given triangle

    TINGetTriangleNodesAndEdges(TINvar, triangle, node1, node2, node3, edge12, edge23, edge31)

    場所:

      TIN

    パラメータ:

      TIN TINvar
        The TIN object
      numeric triangle
        The triangle to read
      numeric variable node1
        Node 1
      numeric variable node2
        Node 2
      numeric variable node3
        Node 3
      numeric variable edge12
        The edge between nodes 1 and 2
      numeric variable edge23
        The edge between nodes 2 and 3
      numeric variable edge31
        The edge between nodes 3 and 1

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick a triangle less than or equal
    # to number of triangles
    numeric numtriangles, triangle;
    numtriangles = TINNumberTriangles(Tout);
    triangle = floor(numtriangles / 2);
    numeric node1, node2, node3, edge12, edge23, edge31;
    TINGetTriangleNodesAndEdges(Tout, triangle, node1, node2, node3, edge12, edge23, edge31);
    string temp$ = "triangle, node1,node2, node3, edge12, edge23, edge31 ";
    print(temp$,"\n", triangle, node1, node2, node3, edge12, edge23, edge31);
    


    TINGetTrianglesInPolygon
    Get a list of TIN triangles in a polygon

    TINGetTrianglesInPolygon(TIN, numpoints, xpoints, ypoints, trianglelist)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN Object
      numeric numpoints
        Number of points in the polygon
      array xpoints
        Array of polygon X coordinates
      array ypoints
        Array of polygon Y coordinates
      array trianglelist
        List of triangles returned. Array will be resized

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      numeric
      The number of triangles returned

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    TIN T;
    GetOutputTIN(T, "TinToolkit");
    numeric minx, miny, maxx, maxy;
    numeric x1, y1, x2, y2;
    numeric numpoints = 4;
    numeric numtriangles = 0;
    array numeric arrayx[numpoints], arrayy[numpoints];
    array numeric triangles[10];
    # get the tin extents
    minx = T.$Info.MinX;
    miny = T.$Info.MinY;
    maxx = T.$Info.MaxX;
    maxy = T.$Info.MaxY;
    # define a four-sided poly and get the number of triangles
    x1 = minx + (maxx-minx) * (1/4);
    x2 = minx + (maxx-minx) * (3/4);
    y1 = miny + (maxy-miny) * (1/4);
    y2 = miny + (maxy-miny) * (3/4);
    arrayx[1] = x1;
    arrayx[2] = x2;
    arrayx[3] = x1;
    arrayx[4] = x2;
    arrayy[1] = y1;
    arrayy[2] = y1;
    arrayy[3] = y2;
    arrayy[4] = y2;
    numtriangles = TINGetTrianglesInPolygon(T, numpoints, arrayx, arrayy, triangles);
    print(numtriangles);
    TINDeleteTrianglesInPolygon(T, numpoints, arrayx, arrayy);
    


    TINNumberEdges
    Returns number of edges in a TIN object

    TINNumberEdges(TIN)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      numeric
      number of edges

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    numeric numhulls, numedges, numnodes, numtri;
    numhulls = TINNumberHulls(Tout);
    numedges = TINNumberEdges(Tout);
    numnodes = TINNumberNodes(Tout);
    numtri = TINNumberTriangles(Tout);
    string temp$ = "num hulls, nodes, edges, triangles";
    print(temp$, numhulls, numnodes, numedges, numtri);
    


    TINNumberHulls
    Returns number of hulls in a TIN object

    TINNumberHulls(TIN)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      numeric
      number of hulls

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    numeric numhulls, numedges, numnodes, numtri;
    numhulls = TINNumberHulls(Tout);
    numedges = TINNumberEdges(Tout);
    numnodes = TINNumberNodes(Tout);
    numtri = TINNumberTriangles(Tout);
    string temp$ = "num hulls, nodes, edges, triangles";
    print(temp$, numhulls, numnodes, numedges, numtri);
    


    TINNumberNodes
    Returns number of nodes in a TIN object

    TINNumberNodes(TIN)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      numeric
      number of nodes

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    numeric numhulls, numedges, numnodes, numtri;
    numhulls = TINNumberHulls(Tout);
    numedges = TINNumberEdges(Tout);
    numnodes = TINNumberNodes(Tout);
    numtri = TINNumberTriangles(Tout);
    string temp$ = "num hulls, nodes, edges, triangles";
    print(temp$, numhulls, numnodes, numedges, numtri);
    


    TINNumberTriangles
    Returns number of triangles in a TIN object

    TINNumberTriangles(TIN)

    場所:

      TIN

    パラメータ:

      TIN TIN
        TIN object

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      numeric
      number of triangles

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    numeric numhulls, numedges, numnodes, numtri;
    numhulls = TINNumberHulls(Tout);
    numedges = TINNumberEdges(Tout);
    numnodes = TINNumberNodes(Tout);
    numtri = TINNumberTriangles(Tout);
    string temp$ = "num hulls, nodes, edges, triangles";
    print(temp$, numhulls, numnodes, numedges, numtri);
    


    TINSetNodeZValue
    Sets z value for a node

    TINSetNodeZValue(TINvar, node, zvalue)

    場所:

      TIN

    パラメータ:

      TIN TINvar
        The TIN object
      numeric node
        The node to set
      numeric zvalue
        The z value to set

    詳細と仮定

      The TIN Object exists and was opened with GetOutputTIN()

    戻り値

      なし

    作成日時: 05-Oct-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # setz.sml
    clear();
    tin Tout;
    GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
    # pick a node less than or equal
    # to number of nodes
    numeric numnodes, node;
    numnodes = TINNumberNodes(Tout);
    node = floor(numnodes / 2);
    numeric zvalue = TINGetNodeZValue(Tout, node);
    print("original node, value ", node, zvalue);
    TINSetNodeZValue(Tout, node, 100);
    zvalue = TINGetNodeZValue(Tout, node);
    print("new node, value ", node, zvalue);
    


    CopyFile(inputFile$, outputFile$, statusHandle)

    場所:

    パラメータ:

    詳細と仮定

      if a StatusHandle is passed and it is NULL then no status will be shown

    戻り値

      numeric
      Returns 0 for success and an error code < 0 for failure.
      Starting with TNTmips7.0 script writer can perform their
      own error handling by setting _context.AbortOnError=0
      See Also: GetLastError

    作成日時: 22-Jun-1998
    修正日時: 22-Jun-1998
    TNTsml for Windows で使用可能: はい

    例:

    # Example of CopyFile()
    class StatusHandle statusHandle;
    # create and destroy default status dialog
    numeric result = CopyFile("c:/tnt/data/cb_tm.rvc", "c:/tnt/data/cb_tm_copy.rvc");
    print(result);
    # don't display status - statusHandle is NULL
    result = CopyFile("c:/tnt/data/cb_tm.rvc", "c:/tnt/data/cb_tm_copy.rvc", statusHandle);
    print(result);
    


    CreateDir
    Create a directory

    CreateDir(filename$)

    場所:

      ファイル

    パラメータ:

      string filename$
        New directory name

    戻り値

      numeric
      Returns 0 for success and an error code < 0 for failure.
      Starting with TNTmips7.0 script writer can perform their
      own error handling by setting _context.AbortOnError=0
      See Also: GetLastError

    作成日時: 06-Mar-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string base$ = "C:/Who created this";
    string subfolder$ = base$ +  "/SML Did";
    CreateDir(base$);
    CreateDir(subfolder$);
    


    CreateTempFileName
    Create a temporary file name.

    CreateTempFileName()

    場所:

      ファイル

    パラメータ:

    戻り値

      string
      Filename string.

    作成日時: 08-Dec-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class FILE file;
    numeric numbytes = 8;
    array numeric bufferW[numbytes];              # 8-byte buffer
    array numeric bufferR[numbytes];
    class FILEPATH tmp = CreateTempFileName();
    file = fopen(tmp,"wb" );
    # write some stuff into the buffer
    numeric i;
    for i=1 to 8
    {
           bufferW[i] = (i * 100) % 256;
    }
    fwrite(file, bufferW, numbytes); # could also use fwritebyte()
    fclose(file);
    file = fopen(tmp,"rb" );
    fread(file, bufferR, numbytes);       # could also use freadbyte()
    # test that everything was written/read properly
    for i=1 to 8
    {
           print(bufferW[i], "=", bufferR[i]);
    }
    fclose(file);
    DeleteFile(tmp);
    


    DeleteFile
    Delete a file.

    DeleteFile(filename$)

    場所:

      ファイル

    パラメータ:

      string filename$
        The file name of the file to delete

    戻り値

      numeric
      Returns 0 for success and an error code < 0 for failure.
      Starting with TNTmips7.0 script writer can perform their
      own error handling by setting _context.AbortOnError=0
      See Also: GetLastError

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/view-rgb.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    fclose
    Close a file previously opened with fopen()

    fclose(file)

    場所:

      ファイル

    パラメータ:

      class FILE file
        The file number returned by the fopen() function.

    詳細と仮定

      The text file must already exist for any mode that expects to read
      from it.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # assume file already exists
    clear();
    class FILE f;
    f=fopen("c:/junk.txt", "r");
    # get next line of text from text file specified by fileNumber
    string str$ = fgetline$(f);
    print(str$);
    fclose(f);
    


    feof
    Detects end of file

    feof(file)

    場所:

      ファイル

    パラメータ:

      class FILE file
        A valid file handle

    詳細と仮定

      fileNumber is a valid file number returned from previous fopen()

    戻り値

      numeric
      1 if at the end of the file, 0 if not.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class FILE f;
    string filename$ = GetInputFileName("","Select the desired file",".txt");
    f=fopen(filename$, "r");
    # get next line of text from text file specified by fileNumber
    while(!feof(f))
    {
           string str$ = fgetline$(f);
           print(str$);
    }
    fclose(f);
    


    fexists
    Checks for existence and i/o mode of file

    fexists(filename$, mode$)

    場所:

      ファイル

    パラメータ:

      string filename$
        A string-path and file name
      string mode$ (オプション)
        A string-the mode "r", "w", etc.
        可能性のある値:
          "r"
            See if we can read the file
          "r+"
            See if we can read and write the file
          "w"
            See if we can write the file

    戻り値

      numeric
      Boolean true or false indicating existence of file

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    if (fexists("c:\temp.txt", "r")) then
           print("c:\temp.txt exists");
    


    fgetline$
    Get next line of text from a text file

    fgetline$(file)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File handle returned by the fopen() function

    詳細と仮定

      The pointer starts at the beginning of the text file.
      After each call to fgetline$() or fgetnum(), the
      pointer automatically advances.

    戻り値

      string
      the next line of text after the pointer, including the
      end of line character (\n), or 0 if at the end of file

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class FILE f;
    string filename$ = GetInputFileName("","Select the desired file",".txt");
    f=fopen(filename$, "r");
    # get next line of text from text file specified by fileNumber
    while(!feof(f))
    {
           string str$ = fgetline$(f);
           print(str$);
    }
    fclose(f);
    


    fgetnum
    Get next number from text file

    fgetnum(file)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File handle returned by the fopen() function

    詳細と仮定

      The pointer begins at the beginning of the text file.
      After each call to fgetline$() or fgetnum(), the
      pointer automatically advances to the next piece of
      text that can be interpreted as a number. The number(s)
      returned must be within the range of the system.

    戻り値

      numeric
      The next number after the pointer. Returns 0 if the
      next segment of ASCII is not a number.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class FILE f;
    string filename$ = GetInputFileName("","Select the desired file",".txt");
    f=fopen(filename$, "r");
    # get next number from text file specified by fileNumber
    while(!feof(f))
    {
           numeric num = fgetnum(f);
           print(num);
    }
    fclose(f);
    


    fopen
    Open text file

    fopen(filename$, mode$, encoding$)

    場所:

      ファイル

    パラメータ:

      string filename$
        A string holding the filename, including a full path
      string mode$ (オプション)
        Optional - a string holding the read / write permissions for the file.
        By default, newline characters are translated from whatever is in
        the file to the format the current platform expects. This behavior
        can be changed by adding a "b" to the end of the mode string,
        causing the file to be opened in "binary" mode.
        可能性のある値:
          "r"
            Open for reading
          "r+"
            Open for reading and writing
          "w"
            Open for writing, truncate to zero length first
          "a"
            Open in append mode, write starting at the end of the file
          "rb"
            Open for reading - binary mode
          "r+b"
            Open for reading and writing - binary mode
          "wb"
            Open for writing, truncate to zero length first - binary mode
          "ab"
            Open in append mode, write starting at the end of the file - binary mode
      string encoding$ (オプション)
        The string encoding
        可能性のある値:
          "ASCII"
            ASCII
          "WinANSI"
            ANSI (Windows Code Page)
          "Big5"
            Chinese (Big5)
          "GB-2312"
            Chinese (GB-2312)
          "JIS"
            Japanese (JIS)
          "Shift-JIS"
            Shift-JIS Japanese encoding
          "EUC"
            Japanese (EUC)
          "MacJapanese"
            Japanese (Macintosh)
          "ISO-2022"
            ISO-2022 encoding (Default)
          "X-Resfile"
            X Resource File (TNTXRES.TXT)
          "Unicode"
            Unicode (2-byte)
          "UTF8"
            Unicode (UTF8) encoding
          "KSC-5601"
            Korean (KSC-5601)
          "KOI-8"
            Cyrillic (KOI-8)
          "CP855"
            Russian (CP855)
          "CP1251"
            Cyrillic (Windows Code Page 1251)
          "CP869"
            Greek (CP869)
          "CP1250"
            Eastern Europe (Windows Code Page 1250)
          "CP1253"
            Greek (Windows Code Page 1253)
          "CP1254"
            Turkish (Windows Code Page 1254)
          "CP1255"
            Hebrew (Windows Code Page 1255)
          "CP1256"
            Arabic (Windows Code Page 1256)
          "Thai"
            Thai
          "DOSCP437"
            United States (CP437)
          "DOSCP850"
            Multilingual (CP850)
          "DOSCP852"
            Slavic (CP852)
          "DOSCP857"
            DOS Code Page 857
          "DOSCP861"
            DOS Code Page 861
          "DOSCP863"
            Canadian French (CP863)
          "DOSCP865"
            Nordic (CP865)
          "ISO-8859-1"
            Latin 1 (ISO)
          "ISO-8859-2"
            Latin 2 (ISO)
          "ISO-8859-3"
            Latin 3 (ISO)
          "ISO-8859-4"
            Latin 4 (ISO)
          "ISO-8859-5"
            Cyrillic (ISO)
          "ISO-8859-6"
            Arabic (ISO)
          "ISO-8859-7"
            Greek (ISO)
          "ISO-8859-8"
            Hebrew (ISO)
          "ISO-8859-9"
            Turkish (ISO)
          "MacArabic"
            Arabic (Macintosh)
          "MacCroatian"
            Croatian (Macintosh)
          "MacCyrillic"
            Cyrillic (Macintosh)
          "MacCentEurope"
            Central Europe (Macintosh)
          "MacGreek"
            Greek (Macintosh)
          "MacHebrew"
            Hebrew (Macintosh)
          "MacIcelandic"
            Icelandic (Macintosh)
          "MacRomanian"
            Romanian (Macintosh)
          "MacRoman"
            Roman (Macintosh)
          "MacThai"
            Thai (Macintosh)
          "MacTurkish"
            Turkish (Macintosh)
          "MacUkrainian"
            Ukrainian (Macintosh)
          "ISCII_Devanagari"
            ISCII (Devanagari)
          "ISCII_Bengali"
            ISCII (Bengali)
          "ISCII_Gurmukhi"
            ISCII (Gurmukhi)
          "ISCII_Gujarati"
            ISCII (Gujarati)
          "ISCII_Oriya"
            ISCII (Oriya)
          "ISCII_Tamil"
            ISCII (Tamil)
          "ISCII_Telugu"
            ISCII (Telugu)
          "ISCII_Kannada"
            ISCII (Kannada)
          "ISCII_Malayalam"
            ISCII (Malayalam)

    詳細と仮定

      The text file must already exist for any mode that expects to read
      from it.

    戻り値

      class FILE
      a file handle

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # assume file already exists
    clear();
    class FILE f;
    f=fopen("c:junk.txt", "w+"); # create a file
    fprint(f, "This is line 1.\nThis is line 2."); # write to it
    fclose(f); # close it
    f=fopen("c:junk.txt", "r"); # open the file for reading
    print(fgetline$(f)); # read and print two lines
    fclose(f); # close it
    


    fprint
    Print unformated text or values to text file

    fprint(file, value, ...)

    場所:

      ファイル

    パラメータ:

      class FILE file
        The number returned from the previously
        used fopen() function
      any value value (オプション)
        One or more numbers or strings to print
      any value ... (オプション)
        (you can have any number of values)

    詳細と仮定

      The text file must be open and writable

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear(); # assume file already exists
    # Open a file, then write to the file, then close it
    class FILE f;
    f=fopen("c:/junk.txt", "r+");
    fprint(f, "This is line 1\nThis is line2.", "More line 2");
    fclose(f);
    f=fopen("c:/junk.txt", "r");
    print(fgetline$(f));
    print(fgetline$(f));
    fclose(f);
    


    fprintf
    Print formatted text or values to text file

    fprintf(file, format$, value, ...)

    場所:

      ファイル

    パラメータ:

      class FILE file
        The number returned from the previously used fopen() function
      string format$
        Printf-style format string.
        The format string is scanned for format specification fields, which all start with a percent sign (%). Each format specification is replaced by the value of the next parameter passed after the format string. There should be a value passed for each format specification field.
        Format Specification fields have the following form (parts in square brackets are optional)
        %[flags][width][.precision]type
        flags
        Optional characters to control justification and sign display
        - : Left align the result within the field
        + : Prefix numeric value with a sign (+ or -), even if positive
        0 : If with is prefixed with a zero, the number will have leading zeros
        width
        Optional number that specifies the minimum number of characters output
        precision
        Optional number that specifies the maximum number of digits after the
        decimal place for floating point numbers
        type
        Required character specifying the type of parameter to output
        s : String
        d : Signed decimal integer
        u : Unsigned decimal integer
        o : Unsigned octal integer
        x : Unsigned hexadecimal integer, using "abcdef"
        X : Unsigned hexadecimal integer, using "ABCDEF"
        c : A single character, specified the ASCII value.
        e : Floating point value in scientific notation (e.g.: 1e6 for 1,000,000)
        f : Floating point value, not in scientific notation
        g : Floating point value in e or f format, whichever is more compact
      any value value (オプション)
        Etc. one or more numbers or strings
      any value ... (オプション)
        (you can have any number of values)

    詳細と仮定

      The text file must be open and writable. See the printf()
      function for information on formatting strings.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string str1$="This is line ";
    string str2$=" you see. ";
    string str3$="This is line 2. ";
    numeric number=1;
    # Create a file, then write to the file, then close it
    class FILE f;
    f=fopen("c:/junk.txt", "w+");
    fprintf(f, "%s%d%sn%s", str1$, number, str2$, str3$);
    fclose(f);
    f=fopen("c:/junk.txt", "r");
    print(fgetline$(f));
    print(fgetline$(f));
    fclose(f);
    


    fread
    Read raw bytes a from a file.

    fread(file, buffer, length)

    場所:

      ファイル

    パラメータ:

      class FILE file
        An open file handle
      array buffer
        The array to hold the data read. Values will all be in the range of 0 to 255
      numeric length
        Number of bytes to read

    戻り値

      numeric
      Number of bytes actually read

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class FILE file;
    numeric numbytes = 8;
    array numeric bufferW[numbytes];              # 8-byte buffer
    array numeric bufferR[numbytes];
    class FILEPATH tmp = CreateTempFileName();
    file = fopen(tmp,"wb" );
    # write some stuff into the buffer
    numeric i;
    for i=1 to 8
    {
           bufferW[i] = (i * 100) % 256;
    }
    fwrite(file, bufferW, numbytes); # could also use fwritebyte()
    fclose(file);
    file = fopen(tmp,"rb" );
    fread(file, bufferR, numbytes);       # could also use freadbyte()
    # test that everything was written/read properly
    for i=1 to 8
    {
           print(bufferW[i], "=", bufferR[i]);
    }
    fclose(file);
    DeleteFile(tmp);
    


    freadbyte
    Read a byte from a file or port.

    freadbyte(file)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File or port

    戻り値

      numeric
      The byte read. Returns NULL if at end of file.
      You must use IsNull() to detect null value, you cannot
      compare to it.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class FILE file;
    numeric numbytes = 8;
    array numeric bufferW[numbytes];              # 8-byte buffer
    array numeric bufferR[numbytes];
    class FILEPATH tmp = CreateTempFileName();
    file = fopen(tmp,"wb" );
    # write some stuff into the buffer
    numeric i;
    for i=1 to 8
    {
           bufferW[i] = (i * 100) % 256;
    }
    fwrite(file, bufferW, numbytes); # could also use fwritebyte()
    fclose(file);
    file = fopen(tmp,"rb" );
    fread(file, bufferR, numbytes);       # could also use freadbyte()
    # test that everything was written/read properly
    for i=1 to 8
    {
           print(bufferW[i], "=", bufferR[i]);
    }
    fclose(file);
    DeleteFile(tmp);
    


    freadstring
    Read a string from a file.

    freadstring(file, length)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File or port
      numeric length
        Maximum length to read

    戻り値

      string
      The string read.
      Use fgetline$() to read an entire line up to the next newline character

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    fwrite
    Write unformated data to a file.

    fwrite(file, buffer, length)

    場所:

      ファイル

    パラメータ:

      class FILE file
        An open file handle
      array buffer
        The array holding the bytes to write. Values must be in the range of 0 to 255
      numeric length
        Number of bytes to write

    戻り値

      numeric
      The number of bytes actually written

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class FILE file;
    numeric numbytes = 8;
    array numeric bufferW[numbytes];              # 8-byte buffer
    array numeric bufferR[numbytes];
    class FILEPATH tmp = CreateTempFileName();
    file = fopen(tmp,"wb" );
    # write some stuff into the buffer
    numeric i;
    for i=1 to 8
    {
           bufferW[i] = (i * 100) % 256;
    }
    fwrite(file, bufferW, numbytes); # could also use fwritebyte()
    fclose(file);
    file = fopen(tmp,"rb" );
    fread(file, bufferR, numbytes);       # could also use freadbyte()
    # test that everything was written/read properly
    for i=1 to 8
    {
           print(bufferW[i], "=", bufferR[i]);
    }
    fclose(file);
    DeleteFile(tmp);
    


    fwritebyte
    Write a byte to a file or port.

    fwritebyte(file, byte, ...)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File or port
      numeric byte
        The byte to write
      numeric ... (オプション)
        Additional bytes to write

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/planter2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    fwritestring
    Write a string to a file.

    fwritestring(file, string$, length)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File or port
      string string$
        The string to write
      numeric length (オプション)
        Maximum length to write

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of GetOutputTextFile()
    class FILE fOut;
    clear();
    fOut = GetOutputTextFile("c:/default.txt", "Select text file for input", "txt");
    # write some lines to the text file
    fwritestring(fOut, "string1\n");
    fwritestring(fOut, "string2\n");
    


    GetDirectory
    Popup a dialog for selecting a directory

    GetDirectory(default$, prompt$)

    場所:

      ファイル

    パラメータ:

      string default$
        Default directory to use
      string prompt$
        Prompt to use

    戻り値

      string
      Filepath of the selected directory. Returns an empty string if user canels the dialog

    作成日時: 11-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string path$ = GetDirectory("C:/tnt", "Select a directory");
    print(path$);
    


    GetInputFileName
    Popup dialog to select a file

    GetInputFileName(default$, prompt$, ext$)

    場所:

      ファイル

    パラメータ:

      string default$
        Default file name
      string prompt$
        Prompt string
      string ext$
        File extension

    戻り値

      string
      Filepath of the selected file. Returns an empty string if user canels the dialog

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class FILE f;
    string filename$ = GetInputFileName("","Select the desired file",".txt");
    f=fopen(filename$, "r");
    # get next line of text from text file specified by fileNumber
    while(!feof(f))
    {
           string str$ = fgetline$(f);
           print(str$);
    }
    fclose(f);
    


    GetInputTextFile
    Open or create a text file for input/output via dialog

    GetInputTextFile(defaultFilename$, prompt$, extension$, encoding$)

    場所:

      ファイル

    パラメータ:

      string defaultFilename$
        A default filename for the file selection dialog
      string prompt$
        Prompt for dialog
      string extension$
        The file extension of the file to open
      string encoding$ (オプション)
        The string encoding
        可能性のある値:
          "ISO-2022"
            ISO-2022 encoding (Default)
          "UTF8"
            Unicode (UTF8) encoding
          "Shift-JIS"
            Shift-JIS Japanese encoding

    戻り値

      class FILE
      Open file handle

    作成日時: 06-Aug-1998
    修正日時: 01-Feb-2001
    TNTsml for Windows で使用可能: はい

    例:

    # Example of GetInputTextFile()
    class FILE fIn;
    clear();
    fIn = GetInputTextFile("c:/default.txt", "Select text file for input", "txt");
    # read a line from the text file
    string str$ = fgetline$(fIn);
    print(str$);
    


    GetOutputFileName
    Popup dialog to select an output file.

    GetOutputFileName(default$, prompt$, ext$)

    場所:

      ファイル

    パラメータ:

      string default$
        Default file name
      string prompt$
        Prompt string
      string ext$
        File extension

    戻り値

      string
      Filepath of the selected file. Returns an empty string if user canels the dialog

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/pca.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GetOutputTextFile
    Open a text file for output via dialog

    GetOutputTextFile(defaultFilename$, prompt$, extension$, encoding$)

    場所:

      ファイル

    パラメータ:

      string defaultFilename$
        Default path/filename.ext
      string prompt$
        Prompt for dialog
      string extension$
        File extension
      string encoding$ (オプション)
        File encoding
        可能性のある値:
          "ISO-2022"
            ISO-2022 encoding (Default)
          "UTF8"
            Unicode (UTF8) encoding
          "Shift-JIS"
            Shift-JIS Japanese encoding

    戻り値

    作成日時: 06-Aug-1998
    修正日時: 01-Feb-2001
    TNTsml for Windows で使用可能: はい

    例:

    # Example of GetOutputTextFile()
    class FILE fOut;
    clear();
    fOut = GetOutputTextFile("c:/default.txt", "Select text file for input", "txt");
    # write some lines to the text file
    fwritestring(fOut, "string1\n");
    fwritestring(fOut, "string2\n");
    


    PortAddCallback
    Used to register functions to call when data is available. Procedure will be passed two parameters, the port, and the value passed as the data parameter to PortAddCallback()

    PortAddCallback(callback, function, data)

    場所:

      ファイル

    パラメータ:

      class CALLBACKLIST callback
        Class CallbackList
      proc function
        Procedure to call
      class anything data (オプション)
        Data passed to callback

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    PortClose
    Close a port.

    PortClose(port)

    場所:

      ファイル

    パラメータ:

      class PORT port
        The port to close

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/planter2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    PortOpen
    Open a port.

    PortOpen(name$, type$)

    場所:

      ファイル

    パラメータ:

      string name$
        Port name
      string type$ (オプション)
        Port type

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/planter2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    RenameFile
    Rename a file.

    RenameFile(oldname$, newname$)

    場所:

      ファイル

    パラメータ:

      string oldname$
        The old filename (with the full filepath)
      string newname$
        The new filename (just the new name of the file)

    戻り値

      numeric
      Returns 0 for success and an error code < 0 for failure.
      Starting with TNTmips7.0 script writer can perform their
      own error handling by setting _context.AbortOnError=0
      See Also: GetLastError

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/URLS.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ScriptResourceReadFull
    Read a text file from a text subobject under the script or a file in the same directory

    ScriptResourceReadFull(filename$)

    場所:

      ファイル

    パラメータ:

      string filename$
        File name

    戻り値

      string

    作成日時: 20-Nov-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    TextFileReadFull
    Read an entire text file into a string (keep the size "reasonable")

    TextFileReadFull(filename$)

    場所:

      ファイル

    パラメータ:

      string filename$
        The text file

    戻り値

      string

    作成日時: 01-Feb-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    IniClose(handle)

    場所:

    パラメータ:

    戻り値

      なし

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # read default display position from an ini and open a raster in view window
    class DISP d;
    numeric w = 500;
    numeric h = 600;
    raster R;
    class INIHANDLE ini;
    # get the position
    string inifile$ = "C:/Program Files/MicroImages/TNT_69/tntproc.ini";
    ini = IniOpenFile(inifile$);
    string pos$ = IniReadString("tntdisp", "WinPosGroup1View2D1");
    IniClose(ini);
    numeric x = StrToNum(GetToken(pos$, " ", 1, 1));
    numeric y = StrToNum(GetToken(pos$, " ", 2, 1));
    # open the raster
    GetInputRaster(R);
    d = DispOpen(w, h, x, y);
    DispQuickAddRasterVar(d, R);
    


    IniOpenFile
    Open an ini file

    IniOpenFile(filename$)

    場所:

      INI ファイル

    パラメータ:

      string filename$
        The file to open

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # read default display position from an ini and open a raster in view window
    class DISP d;
    numeric w = 500;
    numeric h = 600;
    raster R;
    class INIHANDLE ini;
    # get the position
    string inifile$ = "C:/Program Files/MicroImages/TNT_69/tntproc.ini";
    ini = IniOpenFile(inifile$);
    string pos$ = IniReadString("tntdisp", "WinPosGroup1View2D1");
    IniClose(ini);
    numeric x = StrToNum(GetToken(pos$, " ", 1, 1));
    numeric y = StrToNum(GetToken(pos$, " ", 2, 1));
    # open the raster
    GetInputRaster(R);
    d = DispOpen(w, h, x, y);
    DispQuickAddRasterVar(d, R);
    


    IniOpenObject
    Open an RVC text object

    IniOpenObject(filename$, objectname$)

    場所:

      INI ファイル

    パラメータ:

      string filename$
        The RVC filename
      string objectname$
        The object name

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # See: IniOpenFile()
    # IniOpenObject() works similarly to IniOpenFile
    #
    # Use this function if the ini file is stored as an object.
    


    IniOpenScriptResource
    Open an INI file as a subobject of the script or file in same directory

    IniOpenScriptResource(objectname$)

    場所:

      INI ファイル

    パラメータ:

      string objectname$
        Object name

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # See: IniOpenFile()
    # IniOpenScriptResource() works similarly to IniOpenFile
    #
    # It is assumed to be in the same directory.
    


    IniReadNumber
    Read a number from an ini file

    IniReadNumber(group$, field$, default, min, max)

    場所:

      INI ファイル

    パラメータ:

      string group$
        The group name
      string field$
        The field name
      numeric default (オプション)
        The default value
      numeric min (オプション)
        Minumum allowed value
      numeric max (オプション)
        Maximum allowed value

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    IniReadString
    Read a string from an ini file

    IniReadString(group$, field$, default$)

    場所:

      INI ファイル

    パラメータ:

      string group$
        The group name
      string field$
        The field name
      string default$ (オプション)
        Default string to return if value not found

    戻り値

      string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # read default display position from an ini and open a raster in view window
    class DISP d;
    numeric w = 500;
    numeric h = 600;
    raster R;
    class INIHANDLE ini;
    # get the position
    string inifile$ = "C:/Program Files/MicroImages/TNT_69/tntproc.ini";
    ini = IniOpenFile(inifile$);
    string pos$ = IniReadString("tntdisp", "WinPosGroup1View2D1");
    IniClose(ini);
    numeric x = StrToNum(GetToken(pos$, " ", 1, 1));
    numeric y = StrToNum(GetToken(pos$, " ", 2, 1));
    # open the raster
    GetInputRaster(R);
    d = DispOpen(w, h, x, y);
    DispQuickAddRasterVar(d, R);
    


    IniWriteNumber
    Write a number to an ini file

    IniWriteNumber(group$, field$, value)

    場所:

      INI ファイル

    パラメータ:

      string group$
        The group name
      string field$
        The field name
      numeric value
        The value to write

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    IniWriteString
    Write a string to an ini file

    IniWriteString(group$, field$, value$)

    場所:

      INI ファイル

    パラメータ:

      string group$
        The group name
      string field$
        The field name
      string value$
        The value to write

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ResourceAugment(xmlfilename$)

    場所:

    パラメータ:

      string xmlfilename$
        Path to file, must be in proper XML or binary format

    戻り値

      numeric

    作成日時: 23-Sep-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ResourceLookupLabel
    Lookup a labelString resource from tntxres.txt

    ResourceLookupLabel(key$)

    場所:

      リソースファイル

    パラメータ:

      string key$
        The identifier of the message to read

    戻り値

      string

    作成日時: 26-Feb-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # for displaying localized messages and interface text
    clear();
    string search$ = "help";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    string search$ = "Prompt_Patterns_Insert";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    


    ResourceLookupMessage
    Lookup a message from messages.txt

    ResourceLookupMessage(name$)

    場所:

      リソースファイル

    パラメータ:

      string name$
        The name of the message to read

    詳細と仮定

      The messages.txt file is broken up into groups of related messages.

    戻り値

      string

    作成日時: 26-Feb-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # for displaying localized messages and interface text
    clear();
    string search$ = "help";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    string search$ = "Prompt_Patterns_Insert";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    


    ResourceLookupTitle
    Lookup a title resource from tntxres.txt

    ResourceLookupTitle(key$)

    場所:

      リソースファイル

    パラメータ:

      string key$
        The identifier of the message to read

    戻り値

      string

    作成日時: 26-Feb-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # for displaying localized messages and interface text
    clear();
    string search$ = "help";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    string search$ = "Prompt_Patterns_Insert";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    


    MovieAddFrame(movie, frame)

    場所:

    パラメータ:

    戻り値

      numeric

    作成日時: 04-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    MovieExit
    Finalize movie handle

    MovieExit(movie)

    場所:

      ムービー

    パラメータ:

      class MOVIE movie
        A valid movie handle

    戻り値

      なし

    作成日時: 02-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    MovieGetFileExt
    Get File Extension

    MovieGetFileExt(movie)

    場所:

      ムービー

    パラメータ:

      class MOVIE movie
        A valid movie handle

    戻り値

      string

    作成日時: 05-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    MovieInit
    Initialize movie handle (returns handle)

    MovieInit()

    場所:

      ムービー

    パラメータ:

    戻り値

    作成日時: 02-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    MovieSetFormat
    Set movie format

    MovieSetFormat(movie, format$)

    場所:

      ムービー

    パラメータ:

      class MOVIE movie
        A valid movie handle
      string format$
        Movie format
        可能性のある値:
          "AVI"
            AVI

    戻り値

      numeric

    作成日時: 02-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    MovieSetFrameHeight
    Set movie frame height

    MovieSetFrameHeight(movie, height)

    場所:

      ムービー

    パラメータ:

      class MOVIE movie
        A valid movie handle
      numeric height
        Value to be set as current frame height

    戻り値

      なし

    作成日時: 02-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    MovieSetFrameRate
    Set movie frame rate

    MovieSetFrameRate(movie, framerate$)

    場所:

      ムービー

    パラメータ:

      class MOVIE movie
        A valid movie handle
      string framerate$
        Frame rate
        可能性のある値:
          "MOVIE_FRAMERATE_23_976"
            23.976 (24000/1001) fps - NTSC encapsulated film rate
          "MOVIE_FRAMERATE_24"
            24 fps - Standard international cinema film rate
          "MOVIE_FRAMERATE_25"
            25 fps - PAL (625/50) video frame rate
          "MOVIE_FRAMERATE_29_970"
            29.97 (30000/1001) fps - NTSC video frame rate
          "MOVIE_FRAMERATE_30"
            30 fps - NTSC drop-frame (525/60) video frame rate
          "MOVIE_FRAMERATE_50"
            50 fps - Double frame rate / progressive PAL
          "MOVIE_FRAMERATE_59_940"
            59.94 (60000/1001) fps - Double frame rate NTSC
          "MOVIE_FRAMERATE_60"
            60 fps - Double frame rate drop-frame NTSC

    戻り値

      なし

    作成日時: 02-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    MovieSetFrameWidth
    Set movie frame width

    MovieSetFrameWidth(movie, width)

    場所:

      ムービー

    パラメータ:

      class MOVIE movie
        A valid movie handle
      numeric width
        Value to be set as current frame width

    詳細と仮定

      The width setting should be divisible by 4 for AVI movie format

    戻り値

      なし

    作成日時: 02-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    MovieStart
    Start movie

    MovieStart(movie, filename$)

    場所:

      ムービー

    パラメータ:

      class MOVIE movie
        A valid movie handle
      string filename$
        Movie filename

    戻り値

      なし

    作成日時: 02-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    MovieStop
    Stop movie

    MovieStop(movie)

    場所:

      ムービー

    パラメータ:

      class MOVIE movie
        A valid movie handle

    戻り値

      なし

    作成日時: 02-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    ViewActivateTool(view, tool)

    場所:

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewAddStandardTools
    Add "standard" tools to a view.

    ViewAddStandardTools(view)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to add "standard" tools to

    詳細と仮定

      After adding all the tools you want to the view, you have to call ViewAddToolIcons() to get
      the icon buttons to actually show up.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewAddToolIcons
    Create icons for tools added.

    ViewAddToolIcons(view, addscripts)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to add icons to
      numeric addscripts (オプション)
        For tool/macro script icons (0 or 1)

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewDestroy
    Destroy a view.

    ViewDestroy(view)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to destroy

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewGetMapScale
    Get the current map scale of a view.

    ViewGetMapScale(view)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to get map scale for

    戻り値

      numeric
      the map scale of the specified view

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/STREET.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewGetTransLayerToScreen
    Get transformation from layer to screen.

    ViewGetTransLayerToScreen(view, layer, inverse)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view
      class GRE_LAYER layer
        The layer
      numeric inverse (オプション)
        Create inverse transform

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/Rastprof.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewGetTransLayerToView
    Get transformation from layer to screen.

    ViewGetTransLayerToView(view, layer, inverse)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view
      class GRE_LAYER layer
        The layer
      numeric inverse (オプション)
        Create inverse transform

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewGetTransMapToView
    Get the transparm to translate between a map projection and view coordinates

    ViewGetTransMapToView(view, projection, inverse)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view
      class SR_COORDREFSYS projection
        The map projection
      numeric inverse (オプション)
        If true, return the ViewToMap trans instead

    戻り値

    作成日時: 28-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewGetTransViewToScreen
    Get transformation from view to screen.

    ViewGetTransViewToScreen(view, inverse)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view
      numeric inverse (オプション)
        Create inverse transform

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewRedraw
    Redraw view.

    ViewRedraw(view, noUpdateBetweenLayers)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to redraw
      numeric noUpdateBetweenLayers (オプション)
        If non-zero, don't refresh display between each layer

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    ViewRedrawDirect
    Draw view direct with drawflags

    ViewRedrawDirect(view, drawflags$)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        View handle
      string drawflags$ (オプション)
        Draw flags
        可能性のある値:
          "NoBlankScreen"
            Don't clear screen before drawing

    戻り値

      なし

    作成日時: 17-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    ViewRedrawFull
    Redraw view (full).

    ViewRedrawFull(view)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    ViewRedrawIfNeeded
    Redraw a view (but only if it has changed since last redraw)

    ViewRedrawIfNeeded(view)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to redraw

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/FLOWPATH.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewRedrawLayer
    Redraw the specified layer in the view

    ViewRedrawLayer(view, layer)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

    戻り値

      なし

    作成日時: 10-May-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ViewSaveSnapshot
    Save a snapshot of a view.

    ViewSaveSnapshot(view, filename$, objname$, desc$)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to save
      string filename$
        RVC file name
      string objname$
        Object name
      string desc$
        Object description

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/MacroScript/Snapshot.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewSetGPS
    Set the GPS source for a view

    ViewSetGPS(view, gps)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to set
      class GPSPORT gps (オプション)
        The GPS source

    戻り値

      なし

    作成日時: 13-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewSetMapScale
    Set the mapscale for a view (for next redraw).

    ViewSetMapScale(view, mapscale)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to set map scale for
      numeric mapscale
        The map scale to set

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/MacroScript/ZOOMTO.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewSetMessage
    Set message in status line at bottom of view.

    ViewSetMessage(view, msg$)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to set the message for
      string msg$
        The message

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewSetStatusBar
    Set status bar at bottom of view.

    ViewSetStatusBar(view, value, max)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view the status bar is attached to
      numeric value
        Current status bar value
      numeric max
        Maximum status bar number

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ViewStatusBarClear
    Clear the status bar.

    ViewStatusBarClear(view)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view whose status bar is cleared

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ViewTransPointLayerToView
    Translate a point from layer coordinates to view coordinates.

    ViewTransPointLayerToView(view, layer, inPoint)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ViewTransPointViewToLayer
    Translate a point from layer view to layer coordinates.

    ViewTransPointViewToLayer(view, layer, inPoint)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewZoom1X
    Set view to 1X zoom and redraw.

    ViewZoom1X(view, redraw)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to zoom
      numeric redraw (オプション)
        Do redraw

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ViewZoomFull
    Zoom to show full extents of view

    ViewZoomFull(view, redraw)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        Description
      numeric redraw (オプション)
        Description

    戻り値

      なし

    作成日時: 24-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ViewZoomIn
    Zoom in on view.

    ViewZoomIn(view, zoomfactor, redraw)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to zoom
      numeric zoomfactor (オプション)
        Amount to zoom
      numeric redraw (オプション)
        Do redraw

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ViewZoomOut
    Zoom out on view.

    ViewZoomOut(view, zoomfactor, redraw)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view to zoom
      numeric zoomfactor (オプション)
        Amount to zoom
      numeric redraw (オプション)
        Do redraw

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    ViewZoomToGroup
    Zoom so that a given group fills the view

    ViewZoomToGroup(view, group, redraw)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view
      class GRE_GROUP group
        The group
      numeric redraw (オプション)
        Force redraw if true

    戻り値

      なし

    作成日時: 05-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ViewZoomToLayer
    Zoom so that a given layer fills the view

    ViewZoomToLayer(view, layer, redraw)

    場所:

      空間データ表示ウィンドウ

    パラメータ:

      class GRE_VIEW view
        The view
      class GRE_LAYER layer
        The layer
      numeric redraw (オプション)
        Force a redraw if true

    戻り値

      なし

    作成日時: 05-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    LayoutCreate(name$, hardcopy)

    場所:

    パラメータ:

      string name$ (オプション)
        The layout name
      numeric hardcopy (オプション)
        Pass 1 for a hardcopy layout, 0 for display layout

    戻り値

    作成日時: 11-Jun-1998
    修正日時: 20-Mar-2001
    TNTsml for Windows で使用可能: はい

    例:

    class GRE_LAYOUT layout;
    class GRE_GROUP gp;
    Raster R;
    # Get the raster to print
    GetInputRaster(R);
    # Create the layout used to print the raster
    layout = LayoutCreate("myLayout", 1);  # 1 for hardcopy
    # Create group to add raster to
    gp = GroupCreate("Any Group Name", layout);
    # Add the raster to the group
    GroupQuickAddRasterVar(gp, R); # (GROUP name, raster)
    # open up dialog to setup printer
    numeric err = LayoutPageSetupDialog(layout);
    if(err>=0)
    {
           LayoutPrint(layout, 1);
    }
    else
    {
           print("Layout was sent to printer");
    }
    GroupDestroy(gp);
    LayoutDestroy(layout);
    


    LayoutCreateView
    Create a view for a layout.

    LayoutCreateView(layout, form, name$, height, width)

    場所:

      空間データレイアウト

    パラメータ:

      class GRE_LAYOUT layout
        The layout
      class Widget form
        Parent widget for view widget form
      string name$ (オプション)
        Name for title bar
      numeric height (オプション)
        Initial height of drawing area
      numeric width (オプション)
        Initial width of drawing area

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    LayoutDestroy
    Destroy a layout and all the groups in it

    LayoutDestroy(layout)

    場所:

      空間データレイアウト

    パラメータ:

    戻り値

    作成日時: 04-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/PrintRasterLayout.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    LayoutGetGroupByName
    Get a group pointer given group name.

    LayoutGetGroupByName(layout, name$)

    場所:

      空間データレイアウト

    パラメータ:

      class GRE_LAYOUT layout
        The layout
      string name$
        The group name

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    LayoutPageSetupDialog
    Popup page setup dialog for a layout

    LayoutPageSetupDialog(layout)

    場所:

      空間データレイアウト

    パラメータ:

    戻り値

      numeric
      negative if dialog canceled, 0 if 'ok'

    作成日時: 03-Feb-1999
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class GRE_LAYOUT layout;
    class GRE_GROUP gp;
    Raster R;
    # Get the raster to print
    GetInputRaster(R);
    # Create the layout used to print the raster
    layout = LayoutCreate("myLayout", 1);  # 1 for hardcopy
    # Create group to add raster to
    gp = GroupCreate("Any Group Name", layout);
    # Add the raster to the group
    GroupQuickAddRasterVar(gp, R); # (GROUP name, raster)
    # open up dialog to setup printer
    numeric err = LayoutPageSetupDialog(layout);
    if(err>=0)
    {
           LayoutPrint(layout, 1);
    }
    else
    {
           print("Layout was sent to printer");
    }
    GroupDestroy(gp);
    LayoutDestroy(layout);
    


    LayoutPrint
    Print a layout

    LayoutPrint(layout, setupDialog)

    場所:

      空間データレイアウト

    パラメータ:

      class GRE_LAYOUT layout
        The layout to print
      numeric setupDialog (オプション)
        Pass 0 to bypass setup dialog (unless needed)

    戻り値

      なし

    作成日時: 03-Feb-1999
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class GRE_LAYOUT layout;
    class GRE_GROUP gp;
    Raster R;
    # Get the raster to print
    GetInputRaster(R);
    # Create the layout used to print the raster
    layout = LayoutCreate("myLayout", 1);  # 1 for hardcopy
    # Create group to add raster to
    gp = GroupCreate("Any Group Name", layout);
    # Add the raster to the group
    GroupQuickAddRasterVar(gp, R); # (GROUP name, raster)
    # open up dialog to setup printer
    numeric err = LayoutPageSetupDialog(layout);
    if(err>=0)
    {
           LayoutPrint(layout, 1);
    }
    else
    {
           print("Layout was sent to printer");
    }
    GroupDestroy(gp);
    LayoutDestroy(layout);
    


    LayoutRead
    Read a saved display layout from a file

    LayoutRead(layout, filename$, objectname$)

    場所:

      空間データレイアウト

    パラメータ:

      class GRE_LAYOUT layout
        The layout
      string filename$
        RVC filename
      string objectname$ (オプション)
        Object name

    戻り値

      なし

    作成日時: 11-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/LayoutPrint.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    LayoutWrite
    Save a display layout to a file

    LayoutWrite(layout, filename$, objectname$, description$)

    場所:

      空間データレイアウト

    パラメータ:

      class GRE_LAYOUT layout
        The layout to save
      string filename$
        RVC filename
      string objectname$ (オプション)
        Object name
      string description$ (オプション)
        Object description

    戻り値

      なし

    作成日時: 11-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DispCreate2DGroup(name$, layout)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/View3d.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GroupAttachHorizontal
    Set horizontal position of display group in layout

    GroupAttachHorizontal(group, groupPoint$, offset, anchor$, anchorPoint$, refgroup)

    場所:

      空間データグループ

    パラメータ:

      class GRE_GROUP group
        Group to position
      string groupPoint$
        Where on the group to attach
        可能性のある値:
          "None"
            No attachment
          "Left"
            Attach left edge
          "Center"
            Attach center
          "Right"
            Attach right edge
          "Geographic"
            Attach Geographically (both groups must be georeferenced)
      numeric offset
        Page inches in hardcopy mode, ground meters in display mode
      string anchor$
        What to attach the group to
        可能性のある値:
          "None"
            No attachment
          "Group"
            Attach to another group (set RefGroup to the group to attach to)
          "Page"
            Attach to the page
          "Margin"
            Attach to the margin
      string anchorPoint$
        Attachment location on the anchor
        可能性のある値:
          "None"
            No attachment
          "Left"
            Attach left edge
          "Center"
            Attach center
          "Right"
            Attach right edge
          "Geographic"
            Attach Geographically (both groups must be georeferenced)
      class GRE_GROUP refgroup (オプション)
        Group to attach to, if needed

    戻り値

      なし

    作成日時: 12-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupAttachVertical
    Set vertical position of display group in layout

    GroupAttachVertical(group, groupPoint$, offset, anchor$, anchorPoint$, refgroup)

    場所:

      空間データグループ

    パラメータ:

      class GRE_GROUP group
        Group to position
      string groupPoint$
        Where on the group to attach
        可能性のある値:
          "None"
            No attachment
          "Top"
            Attach top edge
          "Center"
            Attach center
          "Bottom"
            Attach bottom edge
          "Geographic"
            Attach Geographically (both groups must be georeferenced)
      numeric offset
        Page inches in hardcopy mode, ground meters in display mode
      string anchor$
        What to attach the group to
        可能性のある値:
          "None"
            No attachment
          "Group"
            Attach to another group (set RefGroup to the group to attach to)
          "Page"
            Attach to the page
          "Margin"
            Attach to the margin
      string anchorPoint$
        Attachment location on the anchor
        可能性のある値:
          "None"
            No attachment
          "Top"
            Attach top edge
          "Center"
            Attach center
          "Bottom"
            Attach bottom edge
          "Geographic"
            Attach Geographically (both groups must be georeferenced)
      class GRE_GROUP refgroup (オプション)
        Group to attach to, if needed

    戻り値

      なし

    作成日時: 12-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupCreate
    Create a group

    GroupCreate(name$, layout)

    場所:

      空間データグループ

    パラメータ:

      string name$ (オプション)
        Group name
      class GRE_LAYOUT layout (オプション)
        Layout to contain group (if any)

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class GRE_LAYOUT layout;
    class GRE_GROUP gp;
    Raster R;
    # Get the raster to print
    GetInputRaster(R);
    # Create the layout used to print the raster
    layout = LayoutCreate("myLayout", 1);  # 1 for hardcopy
    # Create group to add raster to
    gp = GroupCreate("Any Group Name", layout);
    # Add the raster to the group
    GroupQuickAddRasterVar(gp, R); # (GROUP name, raster)
    # open up dialog to setup printer
    numeric err = LayoutPageSetupDialog(layout);
    if(err>=0)
    {
           LayoutPrint(layout, 1);
    }
    else
    {
           print("Layout was sent to printer");
    }
    GroupDestroy(gp);
    LayoutDestroy(layout);
    


    GroupCreate3DView
    Create a 3d view of a group.

    GroupCreate3DView(group, form, name$, height, width, createflags$)

    場所:

      空間データグループ

    パラメータ:

      class GRE_GROUP group
        The group
      class Widget form
        Parent widget for view widget form
      string name$ (オプション)
        The name for the view
      numeric height (オプション)
        Initial height of drawing area
      numeric width (オプション)
        Initial width of drawing area
      string createflags$ (オプション)
        Create flags
        可能性のある値:
          "NoCloseOption"
            Don't include "Close" option on view menu
          "DestroyOnClose"
            Destroy view when View/Close selected
          "NoSelectTool"
            Don't add "Select" tool
          "NoLegendView"
            Don't create LegendView
          "NoStdTools"
            Don't add any standard tools
          "NoDftAddIcons"
            Don't put default "add" icon(s) on toolbar
          "NoCancelButton"
            Don't put "Cancel" button at bottom of window
          "NoSkipButton"
            Don't put "Skip" button at bottom of window
          "NoRedrawButton"
            Don't put "Redraw" button at bottom of window
          "NoToolBoxTool"
            Don't add "ToolBox" tool
          "NoStatusLine"
            Don't create "status" line
          "NoIconBar"
            Don't create iconbar
          "NoDftDrawIcons"
            Don't create default "draw" icons when creating window
          "NoDftViewIcons"
            Don't create default "view" icons when creating window
          "NoDftMarkIcons"
            Don't create default "mark" icons when creating window
          "NoScalePosLine"
            Don't create zoom/scale/position line at bottom of view window
          "NoScrollbars"
            Don't create scroll bars

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    GroupCreateLayerManagerForm
    Create layer manager as a form, (not a dialog)

    GroupCreateLayerManagerForm(parent, group)

    場所:

      空間データグループ

    パラメータ:

      class Widget parent
        Parent widget for form
      class GRE_GROUP group
        The group

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    GroupCreateView
    Create a 2d view of a group.

    GroupCreateView(group, form, name$, height, width, createflags$)

    場所:

      空間データグループ

    パラメータ:

      class GRE_GROUP group
        The group
      class Widget form
        Parent widget for view widget form
      string name$ (オプション)
        The name for the view
      numeric height (オプション)
        Initial height of drawing area
      numeric width (オプション)
        Initial width of drawing area
      string createflags$ (オプション)
        Create flags
        可能性のある値:
          "NoCloseOption"
            Don't include "Close" option on view menu
          "DestroyOnClose"
            Destroy view when View/Close selected
          "NoSelectTool"
            Don't add "Select" tool
          "NoLegendView"
            Don't create LegendView
          "NoStdTools"
            Don't add any standard tools
          "NoDftAddIcons"
            Don't put default "add" icon(s) on toolbar
          "NoCancelButton"
            Don't put "Cancel" button at bottom of window
          "NoSkipButton"
            Don't put "Skip" button at bottom of window
          "NoRedrawButton"
            Don't put "Redraw" button at bottom of window
          "NoToolBoxTool"
            Don't add "ToolBox" tool
          "NoStatusLine"
            Don't create "status" line
          "NoIconBar"
            Don't create iconbar
          "NoDftDrawIcons"
            Don't create default "draw" icons when creating window
          "NoDftViewIcons"
            Don't create default "view" icons when creating window
          "NoDftMarkIcons"
            Don't create default "mark" icons when creating window
          "NoScalePosLine"
            Don't create zoom/scale/position line at bottom of view window
          "NoScrollbars"
            Don't create scroll bars

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    GroupDestroy
    Destroy a group.

    GroupDestroy(group)

    場所:

      空間データグループ

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/PrintRasterLayout.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GroupGetLayerByName
    Get a layer pointer given the layer name.

    GroupGetLayerByName(group, name$)

    場所:

      空間データグループ

    パラメータ:

      class GRE_GROUP group
        The group
      string name$
        The layer name

    詳細と仮定

      The layer name may or may not be equal to the object's name (depending on display settings).
      If possible, use the ActiveLayer or allow the user to select the desired layer.

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GroupOpenLayerManagerWindow
    Create "layer manager" dialog

    GroupOpenLayerManagerWindow(parent, group)

    場所:

      空間データグループ

    パラメータ:

      class Widget parent
        Parent widget for "layer manager" dialog
      class GRE_GROUP group
        The group

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    GroupRead
    Read a saved display group from a file

    GroupRead(group, filename$, objectname$)

    場所:

      空間データグループ

    パラメータ:

      class GRE_GROUP group
        A group class
      string filename$
        RVC filename
      string objectname$ (オプション)
        Object name

    詳細と仮定

      If no objectname is specified the group will be read from the filename as text

    戻り値

      なし

    作成日時: 11-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupRemoveAllLayers
    Remove all layers from a group.

    GroupRemoveAllLayers(group)

    場所:

      空間データグループ

    パラメータ:

      class GRE_GROUP group
        The group to remove all layers from

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupRemoveLayer
    Remove a single layer from a group

    GroupRemoveLayer(group, layer)

    場所:

      空間データグループ

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupSetActiveLayer
    Set the active layer for a group

    GroupSetActiveLayer(group, layer)

    場所:

      空間データグループ

    パラメータ:

    戻り値

      なし

    作成日時: 05-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupWrite
    Save a display group to a file

    GroupWrite(group, filename$, objectname$, description$)

    場所:

      空間データグループ

    パラメータ:

      class GRE_GROUP group
        The group to save
      string filename$
        RVC filename
      string objectname$ (オプション)
        Object name
      string description$ (オプション)
        Object description

    詳細と仮定

      If no objectname is specified the group will be written to the filename as text

    戻り値

      なし

    作成日時: 11-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    CADLayerGetObject(layer, Object)

    場所:

    パラメータ:

    戻り値

      なし

    作成日時: 17-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    CADLayerSetObject
    Change the object used by a CAD layer

    CADLayerSetObject(layer, Object)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER_CAD layer
        The CAD layer
      CAD Object
        The CAD object

    戻り値

      なし

    作成日時: 26-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DispAddButtons
    Adds custom buttons to a display

    DispAddButtons(disp, button1$, button2$, ...$)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A display handle
      string button1$
        A string indicating the label of the button
      string button2$ (オプション)
        A string indicating the lable of the 2nd button
      string ...$ (オプション)
        (you can have any number of buttons)

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP handle;
    handle=DispOpen();
    DispSetName(handle, "Window1");
    DispAddButtons(handle, "Close");
    string str$=DispWaitForButtonPress(handle);
    if (str$ == "Close")
    {
           print("Close Pressed");
           DispClose(handle);
    }
    


    DispAddCallback
    Register function to call when an action happens on a view.

    DispAddCallback(callback, function, data)

    場所:

      空間データ表示

    パラメータ:

      class CALLBACKLIST callback
        A class member of type XmCallbackList
      proc function
        Function to call for view event
      class anything data (オプション)
        Data sent to function

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/planter.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DispAddRaster
    Adds a raster layer to a display window

    DispAddRaster(disp, filename$, objectnum)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A valid display handle
      string filename$
        A string indicating path and project name
      numeric objectnum
        Object number of raster, use GetObjectNumber() to
        retrieve

    詳細と仮定

      The display does not automatically redraw after a DispAddRaster().

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP handle;
    raster Rvar;
    GetInputRaster(Rvar);
    string fileName$=Rvar.$Info.Filename;
    numeric objectNumber=GetObjectNumber(Rvar);
    handle=DispOpen();
    DispAddRaster(handle, fileName$, objectNumber);
    DispRedraw(handle);
    CloseRaster(Rvar);
    


    DispAddRasterVar
    Same as DispAddRaster() except uses SML raster variable

    DispAddRasterVar(disp, Raster)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A valid display handle
      Raster Raster
        Any valid raster variable

    詳細と仮定

      The display does not automatically redraw after a
      DispAddRasterVar().

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP handle;
    raster Rvar;
    GetInputRaster(Rvar); # open a raster
    handle=DispOpen();
    DispAddRasterVar(handle, Rvar);
    DispRedraw(handle);
    CloseRaster(Rvar);
    


    DispAddStandardTools
    Add standard tools to a display, (zoom box, slide view, and measurement)

    DispAddStandardTools(disp)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A valid display handle

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP handle;
    handle=DispOpen();
    DispAddStandardTools(handle); # adds the tools
    


    DispClose
    Closes the display associated with handle displayNumber

    DispClose(disp)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A valid display handle

    詳細と仮定

      If the handle is zero, the display functions will
      ignore any calls using that handle. A useful safety
      tip is to always set handle to zero after closing a display.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP handle;
    handle=DispOpen();
    DispAddStandardTools(handle); # adds the tools
    # do something with the display
    DispClose(handle);
    


    DispGetMapScale
    Returns the current map scale of the display associated with displayNumber

    DispGetMapScale(disp)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid display handle

    詳細と仮定

      The map scale of an empty display is undefined.

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP handle;
    raster Rvar;
    handle=DispOpen();
    DispQuickAddRasterVar(handle, Rvar);
    DispRedraw(handle);
    print(DispGetMapScale(handle));
    DispClose(handle);
    


    DispGetRasterFromLayer
    Get the raster used by a given layer.

    DispGetRasterFromLayer(Object, layer, component)

    場所:

      空間データ表示

    パラメータ:

      Raster Object
        The Raster object
      class GRE_LAYER layer
        The layer
      numeric component (オプション)
        The nth component
        0 for RED, 1 for GREEN, 2 for BLUE for RGB Raster

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/Rastprof.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DispGetVectorFromLayer
    Get the vector used by a given layer.

    DispGetVectorFromLayer(Object, layer)

    場所:

      空間データ表示

    パラメータ:

      Vector Object
        The Vector object
      class GRE_LAYER layer
        The layer

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/elemsel.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DispLastButtonPressed
    Returns the label of the last button that was pressed

    DispLastButtonPressed(disp)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid display handle

    詳細と仮定

      You must use DispResetButtons() after this function.
      Subsequent calls to DispLastButtonPressed() return the
      same string unless DispResetButtons() is called.

    戻り値

      string
      a string-indicating label of last button pressed, or ""
      if none pressed

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP handle1;
    handle1=DispOpen();
    DispSetName(handle1, "Window1");
    DispAddButtons(handle1, "Close");
    string str$=DispLastButtonPressed(handle1);
    # reset button so it can be used again
    DispResetButtons(handle1);
    if (str$ == "Close") then
           DispClose(handle1);
    


    DispOpen
    Opens a display and returns a handle to the display

    DispOpen(xsize, ysize, x, y)

    場所:

      空間データ表示

    パラメータ:

      numeric xsize (オプション)
        The x dimension of the display
      numeric ysize (オプション)
        The y dimension of the display
      numeric x (オプション)
        The x position of the display
      numeric y (オプション)
        The y position of the display

    戻り値

      class DISP
      a handle to the display, used by other display
      functions that require an open display window.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP disp1, disp2;
    disp1=DispOpen();
    disp2=DispOpen();
    DispSetTitle(disp1, "Display 1"); # set the titles
    DispSetTitle(disp2, "Display 2");
    


    DispPanTo
    Pan to a given location.

    DispPanTo(disp, x, y, redraw)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Handle for an open display.
      numeric x
        X coordinate to pan to.
      numeric y
        Y coordinate to pan to.
      numeric redraw (オプション)
        1 to redraw after operation or 0 to not.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class DISP mydisp;
    raster R;
    OpenRaster(R, "c:/tnt/benchmarks/benchmrk.sml", "milogo24");
    mydisp = DispOpen(700,500);
    DispQuickAddRasterVar(mydisp, R);
    DispRedraw(mydisp);
    DispZoomIn(mydisp,4,1);
    DispPanTo(mydisp,.03,.03,1);
    


    DispQuickAddCAD
    Adds a CAD layer to display window referenced by displayNumber

    DispQuickAddCAD(disp, filename$, objectnum)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A valid display handle
      string filename$
        A string indicating path and project name
      numeric objectnum
        Object number of CAD object, use
        GetObjectNumber() to retrieve

    詳細と仮定

      The display does not automatically redraw after a
      DispQuickAddCad().

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP handle;
    cad C;
    GetInputCAD(C);
    string fileName$=C.$Info.Filename;
    numeric objectNumber=GetObjectNumber(C);
    handle=DispOpen();
    DispQuickAddCAD(handle, fileName$, objectNumber);
    DispRedraw(handle);
    


    DispQuickAddCADVar
    Quick add a CAD object to a Disp window given a CAD variable

    DispQuickAddCADVar(disp, CADVar)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Display to add object to
      CAD CADVar
        Oject variable to add

    戻り値

    作成日時: 06-Jul-2001
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP handle;
    cad C;
    GetInputCAD(C);
    handle=DispOpen();
    DispQuickAddCADVar(handle, C);
    DispRedraw(handle);
    


    DispQuickAddRaster
    Adds a raster layer to display window referenced by displayNumber

    DispQuickAddRaster(disp, filename$, objectnum)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A valid display handle
      string filename$
        A string indicating path and project name
      numeric objectnum
        Object number of raster, use GetObjectNumber() to retrieve

    詳細と仮定

      The display does not automatically redraw after a
      DispQuickAddRaster().

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class DISP handle;
    raster R;
    GetInputRaster(R);
    string filename$=R.$Info.Filename;
    numeric objectNumber=GetObjectNumber(R);
    handle=DispOpen();
    DispQuickAddRaster(handle, filename$, objectNumber);
    DispRedraw(handle);
    


    DispQuickAddRasterVar
    Same as DispQuickAddRaster() except uses SML raster variable

    DispQuickAddRasterVar(disp, Raster)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A valid display handle
      Raster Raster
        Any valid raster variable

    詳細と仮定

      The display does not automatically redraw after a
      DispQuickAddRasterVar().

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class DISP handle;
    class GRE_LAYER_RASTER layer;
    raster Rvar;
    GetInputRaster(Rvar); # open a raster
    handle=DispOpen();
    layer = DispQuickAddRasterVar(handle, Rvar);
    DispRedraw(handle);
    


    DispQuickAddTIN
    Adds a TIN layer to display window referenced by displayNumber

    DispQuickAddTIN(disp, filename$, objectnum)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A valid display handle
      string filename$
        A string indicating path and project name
      numeric objectnum
        Object number of TIN, use GetObjectNumber() to retrieve

    詳細と仮定

      The display does not automatically redraw after a
      DispQuickAddTIN().

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    DispQuickAddTINVar
    Quick add TIN object to a Disp window given a TIN variable

    DispQuickAddTINVar(disp, TINVar)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Display to add object to
      TIN TINVar
        Oject variable to add

    戻り値

    作成日時: 06-Jul-2001
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    DispQuickAddVector
    Adds a vector layer to display window referenced by displayNumber

    DispQuickAddVector(disp, filename$, objectnum)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A valid display handle
      string filename$
        A string indicating path and project name
      numeric objectnum
        Object number of vector, use
        GetObjectNumber() to retrieve

    詳細と仮定

      The display does not automatically redraw after a
      DispQuickAddVector().

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class DISP handle;
    vector V;
    GetInputVector(V);
    string filename$=V.$Info.Filename;
    numeric objectNumber=GetObjectNumber(V);
    handle=DispOpen();
    DispQuickAddVector(handle, filename$, objectNumber);
    DispRedraw(handle);
    


    DispQuickAddVectorVar
    Same as DispQuickAddVector() except uses SML vector variable

    DispQuickAddVectorVar(disp, Vector)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        A valid display handle
      Vector Vector
        Any valid Vector variable

    詳細と仮定

      The display does not automatically redraw after a
      DispQuickAddVectorVar().

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class DISP handle;
    class GRE_LAYER_VECTOR layer;
    vector V;
    GetInputVector(V); # open a vector
    handle=DispOpen();
    layer = DispQuickAddVectorVar(handle, V);
    DispRedraw(handle);
    


    DispRedraw
    Same as clicking "Redraw"

    DispRedraw(disp)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class DISP handle;
    class GRE_LAYER_RASTER layer;
    raster Rvar;
    GetInputRaster(Rvar); # open a raster
    handle=DispOpen();
    layer = DispQuickAddRasterVar(handle, Rvar);
    DispRedraw(handle);
    


    DispRedrawFull
    Same as clicking "Full view"

    DispRedrawFull(disp)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    vector Vvar;
    class DISP handle;
    GetInputVector(Vvar); # open a vector
    handle=DispOpen();
    DispQuickAddVectorVar(handle, Vvar);
    DispRedrawFull(handle);
    


    DispRemoveAllLayers
    Removes all layers from display referenced by displayNumber

    DispRemoveAllLayers(disp)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    vector Vvar1, Vvar2;
    class DISP handle;
    handle=DispOpen();
    GetInputVector(Vvar1); # open a vector
    GetInputVector(Vvar2); # open a second vector
    DispQuickAddVectorVar(handle, Vvar1);
    DispQuickAddVectorVar(handle, Vvar2);
    DispRedrawFull(handle);
    DispRemoveAllLayers(handle);
    


    DispResetButtons
    Forces system to "forget" last button pressed

    DispResetButtons(disp)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle

    詳細と仮定

      Used in conjunction with DispLastButtonPressed() and DispWaitForButtonPress().

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    raster Rvar;
    class DISP handle1;
    handle1=DispOpen();
    DispSetName(handle1, "Window1");
    DispAddButtons(handle1, "Close");
    string str$=DispWaitForButtonPress(handle1);
    # reset button so it can be used again
    DispResetButtons(handle1);
    if (str$ == "Close") then
           DispClose(handle1);
    


    DispSetBackgroundColor
    Set the background color of a display

    DispSetBackgroundColor(disp, red, green, blue)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Description
      numeric red
        Red value (0-255)
      numeric green
        Green value (0-255)
      numeric blue
        Blue value (0-255)

    詳細と仮定

      Note, the numeric range of color componants here is 0-255 instead
      of 0-100 as it is elsewhere.
      This function is for older scripts using the Display class instead
      of the newer Group/View classes. On a View, you would do...
      view.BackgroundColor.Name = "white";
      or
      view.BackgroundColor.Red = 100;
      view.BackgroundColor.Green = 100;
      view.BackgroundColor.Blue = 100;

    戻り値

      なし

    作成日時: 30-Jul-1999
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    DispSetMapScale
    Sets the map scale for a display

    DispSetMapScale(disp, mapscale)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle
      numeric mapscale
        A number-equal to the denominator in the
        scale ratio 1 / mapscale

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DISP handle;
    handle=DispOpen();
    DispSetMapScale(handle, 24000); # sets map scale to 1:24,000
    


    DispSetMessage
    Displays string in message area of display window

    DispSetMessage(disp, message$)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle
      string message$
        A string holding the message

    詳細と仮定

      the display is open

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class DISP handle;
    handle=DispOpen();
    DispSetMessage(handle, "This is a message");
    


    DispSetMinMaxIndexFromGroup
    Set Raster cells to layer index of Raster with largest/smallest cell value in a group

    DispSetMinMaxIndexFromGroup(Object, group, MinMaxFlag$)

    場所:

      空間データ表示

    パラメータ:

      Raster Object
        Output Raster object
      class GRE_GROUP group
        Group containing Rasters
      string MinMaxFlag$
        Minimum/maximum flag
        可能性のある値:
          "Min"
            set cells to minimum of all Rasters
          "Max"
            set cells to maximum of all Rasters

    詳細と仮定

      Rasters are non-composite types and are same size as output Raster

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class DISP handle;
    class GRE_GROUP g;
    raster Rout, R1, R2, R3;
    GetInputRaster(R1, 0, 0, "8-bit unsigned");
    GetInputRaster(R2, NumLins(R1), NumCols(R1), RastType(R1));
    GetInputRaster(R3, NumLins(R1), NumCols(R1), RastType(R1));
    GetOutputRaster(Rout, NumLins(R1), NumCols(R1), RastType(R1));
    handle = DispOpen();
    DispQuickAddRasterVar(handle, R1);
    DispQuickAddRasterVar(handle, R2);
    DispQuickAddRasterVar(handle, R3);
    DispRedraw(handle);
    g = handle.Group;
    DispSetMinMaxIndexFromGroup(Rout, g, "Max");
    


    DispSetName
    Sets the name of a display window

    DispSetName(disp, name$)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle
      string name$
        A string holding the message

    詳細と仮定

      The name is used by the button functions to return a string
      indicating what button was pressed in which window. The returned
      value from DispWaitForButtonPress(), (with no display number
      parameter), is "WindowName.ButtonName"

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    raster Rvar;
    class DISP handle1, handle2;
    handle1=DispOpen();
    handle2=DispOpen();
    DispSetName(handle1, "Window1");
    DispSetName(handle2, "Window2");
    string str$=DispWaitForButtonPress();
    DispSetMessage(handle2, "Button press message is " + str$);
    DispClose(handle1);
    DispClose(handle2);
    


    DispSetStatusBar
    Set the status bar on a standalone display window.

    DispSetStatusBar(disp, value, max)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        The display
      numeric value
        The value to set
      numeric max
        The maximum value

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    DispSetTitle
    Displays string in title area of display window

    DispSetTitle(disp, title$)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle
      string title$
        A string holding the message

    詳細と仮定

      the display is open

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class DISP handle;
    handle=DispOpen();
    DispSetTitle(handle, "My Custom Window");
    


    DispStatusBarClear
    Clear the status bar.

    DispStatusBarClear(disp)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        The display

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    DispWaitForButtonPress
    Suspend execution and wait until button event

    DispWaitForButtonPress(disp)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp (オプション)
        Optional - a window handle. If used, then wait for a
        button press in a specific window. If not used, then you
        may intercept button events from any window

    詳細と仮定

      If disp parameter is not used then the returned value is in
      the form "Windowname.ButtonLabel". If disp parameter is used
      then the returned value is in the form "ButtonLabel".
      You must use DispResetButtons() after this function.
      Subsequent calls to DispWaitForButtonPress() return the
      same string unless DispResetButtons() is called.

    戻り値

      string
      a string - if disp parameter is used then returns "ButtonLabel",
      if disp parameter is omitted then returns "WindowName.ButtonLabel"

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    class DISP handle;
    handle=DispOpen();
    DispSetName(handle, "Window1");
    string str$ = DispWaitForButtonPress(handle);
    DispResetButtons(handle);
    DispSetMessage(handle, "ButtonPressed = " + str$);
    DispClose(handle);
    


    DispZoom1X
    Same as clicking "Zoom 1X"

    DispZoom1X(disp, redraw)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle
      numeric redraw (オプション)
        If non-zero, redraw now.

    詳細と仮定

      displays one pixel per raster cell

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    raster Rvar;
    class DISP handle;
    GetInputRaster(Rvar); # open a raster
    handle=DispOpen();
    DispQuickAddRasterVar(handle, Rvar);
    DispZoom1X(handle);
    


    DispZoomIn
    Same as clicking "Zoom In"

    DispZoomIn(disp, zoomfactor, redraw)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle
      numeric zoomfactor (オプション)
        Optional - a number indicating zoom,
        default value is two
      numeric redraw (オプション)
        Optional - a Boolean value indicating
        whether to redraw the display, default
        value is true

    詳細と仮定

      Zoomfactor is relative to the current zoom factor.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # DispZoomIn
    raster Rvar;
    class DISP handle;
    GetInputRaster(Rvar); # open a raster
    handle=DispOpen();
    DispQuickAddRasterVar(handle, Rvar);
    DispZoom1X(handle, true); # sets current zoomFactor to one
    # zoom in to four pixels per raster cell, with redraw
    DispZoomIn(handle, 4, true);
    # zoom in to eight pixels per raster cell, with redraw
    DispZoomIn(handle); # zoomFactor==2, redraw==true are implied
    


    DispZoomOut
    Same as clicking "Zoom Out"

    DispZoomOut(disp, zoomfactor, redraw)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Any valid window handle
      numeric zoomfactor (オプション)
        Optional - a number indicating zoom,
        default value is two
      numeric redraw (オプション)
        Optional - a Boolean value indicating
        whether to redraw the display, default
        value is true

    詳細と仮定

      Zoomfactor is relative to the current zoom factor.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    raster Rvar;
    class DISP handle;
    GetInputRaster(Rvar); # open a raster
    handle=DispOpen();
    DispQuickAddRasterVar(handle, Rvar);
    DispZoom1X(handle,true) ; # sets current zoomFactor to one
    # zoom out to four pixels per raster cell, with redraw
    DispZoomOut(handle, 4, true);
    # zoom out to eight pixels per raster cell, with redraw
    DispZoomOut(handle); # zoomFactor==2, redraw==true are implied
    


    DispZoomTo
    Pan to a given location.

    DispZoomTo(disp, x, y, zoomfactor, redraw)

    場所:

      空間データ表示

    パラメータ:

      class DISP disp
        Handle for an open display.
      numeric x
        X coordinate to pan to.
      numeric y
        Y coordinate to pan to.
      numeric zoomfactor (オプション)
        Reletive zoom factor.
      numeric redraw (オプション)
        1 to redraw after operation or 0 to not.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    GroupAddMapGridLayer
    Add a MapGridLayer to a group

    GroupAddMapGridLayer(group, refsys, xinterval, yinterval, units$, extentsProjection, extents)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        Group to add MapGridLayer to
      class SR_COORDREFSYS refsys
        The coordinate reference system
      numeric xinterval
        Grid x interval in ground meters or decimal degrees
      numeric yinterval
        Grid y interval in ground meters or decimal degrees
      string units$
        Units for interval
      class SR_COORDREFSYS extentsProjection (オプション)
        Projection the extents are given in
      class RECT extents (オプション)
        Extents (will use current group extents if omitted)

    戻り値

    作成日時: 01-Feb-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GroupAddRaster
    Add a raster to a group by name

    GroupAddRaster(group, filename$, objectnum, isElevation)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        The group to add to
      string filename$
        RVC file name
      numeric objectnum
        Object number of Raster
      numeric isElevation (オプション)
        The raster is a surface

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupAddRasterVar
    Add a raster to a group.

    GroupAddRasterVar(group, Raster, isElevation)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        The group to add to
      Raster Raster
        The Raster to add
      numeric isElevation (オプション)
        The raster is a surface

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupQuickAddCAD
    Quick add a CAD layer (prompt).

    GroupQuickAddCAD(group, filename$, objectnum)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        The group to add to
      string filename$
        RVC file name
      numeric objectnum
        CAD object number

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupQuickAddCADVar
    Quick add a CAD layer given a CAD variable

    GroupQuickAddCADVar(group, CADVar)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        Group to add the object to
      CAD CADVar
        Oject variable to add

    戻り値

    作成日時: 07-Jun-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupQuickAddDBPinmap
    Add a database pinmap to a group.

    GroupQuickAddDBPinmap(group, filename$, objectname$, tablename$, xfieldname$, yfieldname$)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        The group to add the pin map to
      string filename$
        RVC file of pinmap
      string objectname$
        Pinmap object name
      string tablename$
        Table name
      string xfieldname$
        Field holding x coordinates of pin locations
      string yfieldname$
        Field holding y coordinates of pin locations

    戻り値

    作成日時: 03-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupQuickAddRaster
    Quick add a Raster layer (prompt).

    GroupQuickAddRaster(group, filename$, objectnum, isElevation)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        The group to add to
      string filename$
        RVC file name
      numeric objectnum
        Raster object number
      numeric isElevation (オプション)
        The Raster is a surface

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupQuickAddRasterVar
    Quick add a Raster layer given SML variable.

    GroupQuickAddRasterVar(group, Raster, isElevation)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        The group to add to
      Raster Raster
        Raster variable
      numeric isElevation (オプション)
        The raster is a surface

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class GRE_LAYOUT layout;
    class GRE_GROUP gp;
    Raster R;
    # Get the raster to print
    GetInputRaster(R);
    # Create the layout used to print the raster
    layout = LayoutCreate("myLayout", 1);  # 1 for hardcopy
    # Create group to add raster to
    gp = GroupCreate("Any Group Name", layout);
    # Add the raster to the group
    GroupQuickAddRasterVar(gp, R); # (GROUP name, raster)
    # open up dialog to setup printer
    numeric err = LayoutPageSetupDialog(layout);
    if(err>=0)
    {
           LayoutPrint(layout, 1);
    }
    else
    {
           print("Layout was sent to printer");
    }
    GroupDestroy(gp);
    LayoutDestroy(layout);
    


    GroupQuickAddRGBRastersVar
    Quick add a raster layer given 3 raster variables

    GroupQuickAddRGBRastersVar(group, RedRaster, GreenRaster, BlueRaster)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        The group to add to
      Raster RedRaster
        Red Raster variable
      Raster GreenRaster
        Green Raster variable
      Raster BlueRaster
        Blue Raster variable

    戻り値

    作成日時: 18-Jun-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupQuickAddTIN
    Quick add a TIN layer (prompt).

    GroupQuickAddTIN(group, filename$, objectnum)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        The group to add to
      string filename$
        RVC file name
      numeric objectnum
        TIN object number

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupQuickAddTINVar
    Quick add a TIN layer given a TIN variable

    GroupQuickAddTINVar(group, TINVar)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        Group to add the object to
      TIN TINVar
        Oject variable to add

    戻り値

    作成日時: 07-Jun-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupQuickAddVector
    Quick add a Vector layer (prompt).

    GroupQuickAddVector(group, filename$, objectnum, isElevation)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        The group to add to
      string filename$
        RVC file name
      numeric objectnum
        Vector object number
      numeric isElevation (オプション)
        The Vector is a surface

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GroupQuickAddVectorVar
    Quick add a Vector layer given SML variable.

    GroupQuickAddVectorVar(group, Vector)

    場所:

      空間データ表示

    パラメータ:

      class GRE_GROUP group
        The group to add to
      Vector Vector
        The Vector to add

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    LayerDestroy
    Destroy a layer.

    LayerDestroy(layer)

    場所:

      空間データ表示

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Dialog/boxcar2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    LayerHide
    Hide a layer.

    LayerHide(layer, view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER layer
        The layer to hide
      class GRE_VIEW view (オプション)
        The view

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/PATHcHT1.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    LayerLower
    Lower a layer. Returns 1 if moved, 0 if already at bottom of group.

    LayerLower(layer)

    場所:

      空間データ表示

    パラメータ:

    戻り値

      numeric

    作成日時: 04-Feb-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    LayerOpenControls
    Open layer controls.

    LayerOpenControls(layer, view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER layer
        The layer to open controls for
      class GRE_VIEW view (オプション)
        The view

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    LayerRaise
    Raise a layer. Returns 1 if moved, 0 if already at top of group.

    LayerRaise(layer)

    場所:

      空間データ表示

    パラメータ:

    戻り値

      numeric

    作成日時: 04-Feb-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    LayerShow
    Show a layer.

    LayerShow(layer, view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER layer
        The layer to show
      class GRE_VIEW view (オプション)
        The view

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    LayoutAddScaleBarLayer
    Add a ScaleBarLayer to a layout

    LayoutAddScaleBarLayer(layout, length, lengthUnits$, width, widthUnits$, majorDiv, minorDiv)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYOUT layout
        Layout to add ScaleBarLayer to
      numeric length
        Length of ScaleBar in ground units
      string lengthUnits$
        Units for scalebar length (eg: "miles")
      numeric width
        Width (thickness) of ScaleBar in page units
      string widthUnits$
        Units for scalebar width (eg: "mm")
        可能性のある値:
          "Inches"
            inches
          "mm"
            millimeters
          "Points"
            points (1/72 inches)
          "Pixels"
            pixels
      numeric majorDiv
        Number of major divisions
      numeric minorDiv
        Number of minor divisions

    戻り値

    作成日時: 01-Feb-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    LayoutAddTextLayer
    Add a text Layer to a layout

    LayoutAddTextLayer(layout)

    場所:

      空間データ表示

    パラメータ:

    戻り値

    作成日時: 03-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    PinmapLayerFindClosest
    Find the element closest to a given point in a PinmapLayer

    PinmapLayerFindClosest(layer, point, maxdist, distance)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER_PINMAP layer
        The pin map layer
      class POINT2D point
        The point to search around
      numeric maxdist (オプション)
        Max search distance - (default 10000000.0)
      numeric variable distance (オプション)
        Distance to the point returnd

    戻り値

      numeric
      the element number

    作成日時: 12-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    PinmapLayerGetFieldInfo
    Gets field information for a pin map layer

    PinmapLayerGetFieldInfo(layer, tablename$, fieldname$)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER_PINMAP layer
        The pin map layer
      string tablename$
        The table containing the field
      string fieldname$
        The field

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    PinmapLayerOpenDatabase
    Open a pinmap layer database

    PinmapLayerOpenDatabase(layer, mode$)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER_PINMAP layer
        The pinmap layer
      string mode$ (オプション)
        Open for (r)eading or (w)riting

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    PinmapLayerSetObject
    Change the object used by a pinmap layer

    PinmapLayerSetObject(layer, filename$, objectname$, tablename$, xfieldname$, yfieldname$)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER_PINMAP layer
        The pin map layer
      string filename$
        File name
      string objectname$
        Object name
      string tablename$
        Table name
      string xfieldname$
        X value field name
      string yfieldname$
        Y value field name

    戻り値

      なし

    作成日時: 26-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    RasterLayerGetObject
    Set a raster variable to point to the raster object from a RasterLayer

    RasterLayerGetObject(layer, Object, component)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER_RASTER layer
        The Raster layer
      Raster Object
        The Raster object
      numeric component (オプション)
        For multiband layers

    戻り値

      なし

    作成日時: 17-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    RasterLayerSetObject
    Change the object used by a raster layer

    RasterLayerSetObject(layer, Object, isElevation)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER_RASTER layer
        The Raster layer
      Raster Object
        The Raster object
      numeric isElevation (オプション)
        Set if surface layer type

    戻り値

      なし

    作成日時: 26-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TINLayerGetObject
    Set a TIN variable to point to the TIN object from a TINLayer

    TINLayerGetObject(layer, TIN)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER_TIN layer
        The TIN layer
      TIN TIN
        A TIN object variable (undefined ok)

    戻り値

      なし

    作成日時: 17-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    TINLayerSetObject
    Change the object used by a TIN layer

    TINLayerSetObject(layer, Object)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER_TIN layer
        The TIN layer
      TIN Object
        The TIN object

    戻り値

      なし

    作成日時: 26-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ToolAddCallback
    Register function to call for tool events

    ToolAddCallback(callback, function, data)

    場所:

      空間データ表示

    パラメータ:

      class CALLBACKLIST callback
        A class member of type XmCallbackList
      proc function
        Function to call for tool event
      class anything data (オプション)
        Data sent to function

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ToolSetGPS
    Set the GPS source of a tool

    ToolSetGPS(tool, gps)

    場所:

      空間データ表示

    パラメータ:

      class TOOL tool
        The tool
      class GPSPORT gps (オプション)
        The source to set - if not supplied turn off

    戻り値

      なし

    作成日時: 28-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    VectorLayerGetObject
    Set a vector variable to point to the vector object from a VectorLayer

    VectorLayerGetObject(layer, Object)

    場所:

      空間データ表示

    パラメータ:

      class GRE_LAYER_VECTOR layer
        The Vector layer
      Vector Object
        The Vector object variable (undefined ok)

    戻り値

      なし

    作成日時: 17-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorLayerSetObject
    Change the object used by a vector layer

    VectorLayerSetObject(layer, Object)

    場所:

      空間データ表示

    パラメータ:

    戻り値

      なし

    作成日時: 26-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    View3DAddSimpleControls
    Add simple viewpoint controls to 3D view

    View3DAddSimpleControls(view)

    場所:

      空間データ表示

    パラメータ:

    戻り値

      なし

    作成日時: 30-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    View3DReadPosIni
    Read 3D view settings from ini file.

    View3DReadPosIni(view, inigroup$, inihandle)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW3D view
        The view to set
      string inigroup$
        The group name to read from
      class INIHANDLE inihandle (オプション)
        If iniHandle is not specified then "tntproc.ini" is used

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/View3d.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    View3DWritePosIni
    Write 3D view settings to ini file.

    View3DWritePosIni(view, inigroup$, inihandle)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW3D view
        The view setting to write
      string inigroup$
        The group name to write to
      class INIHANDLE inihandle (オプション)
        Handle to ini file

    詳細と仮定

      if iniHandle is not specified then "tntproc.ini" is used

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/View3d.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewCreate3DViewPosTool
    Create a 3D view position tool on a view

    ViewCreate3DViewPosTool(view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        View to add 3D tool to

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 03-Feb-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreateExamineRasterTool
    Add Examine Raster tool icon to view.

    ViewCreateExamineRasterTool(view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        View to add examine Raster tool to

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up. none

    戻り値

    作成日時: 03-Feb-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreateHyperIndexTool
    Add HyperIndex tool icon to view.

    ViewCreateHyperIndexTool(view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        View to add hyperindex tool to

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 03-Feb-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreateLineTool
    Add a line drawing tool to a view

    ViewCreateLineTool(view, name$, IconName$, IconGroup$)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        The view to create the tool in
      string name$ (オプション)
        The line tool's name
      string IconName$ (オプション)
        The icon name
      string IconGroup$ (オプション)
        The icon group

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 03-Feb-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/Rastprof.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewCreateMeasureTool
    Add Measurement tool icon to view.

    ViewCreateMeasureTool(view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        View to add measurement tool to

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 03-Feb-1998
    修正日時: 30-Oct-1998
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreateMultiPolygonTool
    Add multiple polygon drawing tool icon to view.

    ViewCreateMultiPolygonTool(view, name$, IconName$, IconGroup$)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        View to add multipolygon tool to
      string name$ (オプション)
        The tool name
      string IconName$ (オプション)
        The icon name
      string IconGroup$ (オプション)
        The icon group

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 03-Feb-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreatePointTool
    Create a point tool for the specified view

    ViewCreatePointTool(view, name$, IconName$, IconGroup$)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        The view to create tool on
      string name$ (オプション)
        The tool name
      string IconName$ (オプション)
        The icon name
      string IconGroup$ (オプション)
        The icon group

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 22-May-1998
    修正日時: 22-May-1998
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewCreatePolygonTool
    Add polygon drawing tool icon to view.

    ViewCreatePolygonTool(view, name$, IconName$, IconGroup$)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        View to add polygon tool to
      string name$ (オプション)
        The tool name
      string IconName$ (オプション)
        The icon name
      string IconGroup$ (オプション)
        The icon group

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 03-Feb-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ViewCreatePolyLineTool
    Create a polyline tool for the specified view

    ViewCreatePolyLineTool(view, name$, IconName$, IconGroup$)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        The view to create the tool for
      string name$ (オプション)
        The tool name
      string IconName$ (オプション)
        The icon name
      string IconGroup$ (オプション)
        The icon group

    戻り値

    作成日時: 15-Jan-2003
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreateRectangleTool
    Create a tool for selecting a rectangle

    ViewCreateRectangleTool(view, name$, IconName$, IconGroup$)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        The view
      string name$ (オプション)
        The tool name
      string IconName$ (オプション)
        The icon name
      string IconGroup$ (オプション)
        The icon group

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 03-Feb-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreateSelectTool
    Create a select tool on a view

    ViewCreateSelectTool(view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        View to add select tool to

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 09-Apr-1998
    修正日時: 30-Oct-1998
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreateSketchTool
    Add sketch tool icon to view.

    ViewCreateSketchTool(view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        View to add sketch tool to

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 03-Feb-1998
    修正日時: 30-Oct-1998
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreateSlideViewTool
    Create tool for sliding a view

    ViewCreateSlideViewTool(view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        The view to create the tool for

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 24-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreateToolBoxTool
    Add the ToolBox tool for a view

    ViewCreateToolBoxTool(view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        The view to add ToolBox tool to

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 30-Oct-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewCreateZoomBoxTool
    Create zoom box tool for a view

    ViewCreateZoomBoxTool(view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW view
        The view to create the tool for

    詳細と仮定

      After adding all the tools you want to a view, you have to call ViewAddToolIcons() to
      get the icons to actually show up.

    戻り値

    作成日時: 24-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    ViewDrawPinmapElement
    Draws a single pinmap element

    ViewDrawPinmapElement(view, layer, elemnum)

    場所:

      空間データ表示

    パラメータ:

    戻り値

      なし

    作成日時: 04-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ViewOpen3DControls
    Open the 3D controls.

    ViewOpen3DControls(view)

    場所:

      空間データ表示

    パラメータ:

      class GRE_VIEW3D view
        The view to open the 3D controls for

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/View3d.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FrameCopy(srcFrame, dstFrame, srcX, srcY, srcW, srcH, dstX, dstY)

    場所:

    パラメータ:

      class FRAME srcFrame
        A valid frame handle
      class FRAME dstFrame
        A valid frame handle
      numeric srcX (オプション)
        Source x coordinate
      numeric srcY (オプション)
        Source y
      numeric srcW (オプション)
        Source w
      numeric srcH (オプション)
        Source h
      numeric dstX (オプション)
        Destination x
      numeric dstY (オプション)
        Destination y

    戻り値

      なし

    作成日時: 04-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/movie.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FrameCopyFromView
    Copy an image from view to frame

    FrameCopyFromView(frame, view, srcX, srcY, srcW, srcH, dstX, dstY)

    場所:

      フレーム

    パラメータ:

      class FRAME frame
        A valid frame handle
      class GRE_VIEW view
        A valid class handle
      numeric srcX (オプション)
        Source x coordinate
      numeric srcY (オプション)
        Source y
      numeric srcW (オプション)
        Source w
      numeric srcH (オプション)
        Source h
      numeric dstX (オプション)
        Destination x
      numeric dstY (オプション)
        Destination y

    戻り値

      なし

    作成日時: 04-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    FrameCreate
    Create frame by width and height (returns handle)

    FrameCreate(width, height)

    場所:

      フレーム

    パラメータ:

      numeric width
        Width of frame
      numeric height
        Height of frame

    戻り値

    作成日時: 04-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    FrameCreateFromView
    Create a frame with width and height settings from a view

    FrameCreateFromView(view)

    場所:

      フレーム

    パラメータ:

    戻り値

    作成日時: 04-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    FrameCreateGC
    Create a Graphics Context (GC) for a Frame class

    FrameCreateGC(frame)

    場所:

      フレーム

    パラメータ:

      class FRAME frame
        A valid frame handle

    戻り値

      class GC

    作成日時: 05-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    FrameDestroy
    Destroy an open frame handle

    FrameDestroy(frame)

    場所:

      フレーム

    パラメータ:

      class FRAME frame
        A valid frame handle

    戻り値

      なし

    作成日時: 04-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/movie.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FrameGetHeight
    Get frame height

    FrameGetHeight(frame)

    場所:

      フレーム

    パラメータ:

      class FRAME frame
        A valid frame handle

    戻り値

      numeric
      The frame height

    作成日時: 04-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/movie.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FrameGetWidth
    Get frame width

    FrameGetWidth(frame)

    場所:

      フレーム

    パラメータ:

      class FRAME frame
        A valid frame handle

    戻り値

      numeric
      The frame width

    作成日時: 04-Apr-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/movie.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GPSAddCallback(callback, function, data)

    場所:

    パラメータ:

      class CALLBACKLIST callback
        CallbackList
      proc function
        Procedure to call
      class anything data (オプション)
        Data to pass to procedure

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class GPSPort gpsport;
    class GPSData gpsdata;
    numeric source=1;
    proc processData(class GPSData d)
    {
           print("Data has changed");
           print(d.numberOfSatellites, "satellites.");
    }
    # open the port
    gpsport = GPSOpen(source);
    GPSAddCallback(gpsport.PollCallback, processData, gpsport.Data);
    


    GPSClose
    Close a GPS Port

    GPSClose(GPSPort)

    場所:

      GPS

    パラメータ:

      class GPSPORT GPSPort
        The port to close

    戻り値

      なし

    作成日時: 29-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # example of GPSOpen()
    # declare class variables
    class GPSPort gpsport;
    class GPSData gpsdata;
    # open the port
    gpsport = GPSOpen("GPS1");
    gpsdata = GPSPortRead(gpsport);
    # close the port
    GPSClose(gpsport);
    


    GPSGetSourceName
    Return the name of a GPS source given its number

    GPSGetSourceName(sourceNumber)

    場所:

      GPS

    パラメータ:

      numeric sourceNumber
        The source number

    戻り値

      string

    作成日時: 29-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # GPS
    clear();
    class GPSPort gpsport;
    class GPSData gpsdata;
    numeric source=1;
    # open the port
    gpsport = GPSOpen(source);
    print(gpsport.Protocol, GPSGetSourceName(source), "of", GPSNumSources());
    while (1) # now read data
    {
           print(gpsport.protocol, gpsport.name, "\n");
           gpsdata = GPSPortRead(gpsport);
           if (gpsdata.positionXYIsValid)
                  print("x y", gpsdata.position.x, gpsdata.position.y);
           if (gpsdata.positionZIsValid)
                  print("z  ", gpsdata.position.z);
           if (gpsdata.velocityXYIsValid)
                  print("vx vy ", gpsdata.velocity.x, gpsdata.velocity.y);
           if (gpsdata.velocityZIsValid)
                  print("vz    ", gpsdata.velocity.z);
           if (gpsdata.headingIsValid)
                  print("heading", gpsdata.heading);
           if (gpsdata.speedIsValid)
                  print("speed", gpsdata.speed);
           if (gpsdata.numberSatellitesIsValid)
                  print("number of satellites", gpsdata.numberOfSatellites);
           print("\n\n");
           sleep(1);
    }
    # close the port
    GPSClose(gpsport);
    


    GPSNumSources
    Return number of GPS sources configured

    GPSNumSources()

    場所:

      GPS

    パラメータ:

    戻り値

      numeric

    作成日時: 29-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # GPS
    clear();
    class GPSPort gpsport;
    class GPSData gpsdata;
    numeric source=1;
    # open the port
    gpsport = GPSOpen(source);
    print(gpsport.Protocol, GPSGetSourceName(source), "of", GPSNumSources());
    while (1) # now read data
    {
           print(gpsport.protocol, gpsport.name, "\n");
           gpsdata = GPSPortRead(gpsport);
           if (gpsdata.positionXYIsValid)
                  print("x y", gpsdata.position.x, gpsdata.position.y);
           if (gpsdata.positionZIsValid)
                  print("z  ", gpsdata.position.z);
           if (gpsdata.velocityXYIsValid)
                  print("vx vy ", gpsdata.velocity.x, gpsdata.velocity.y);
           if (gpsdata.velocityZIsValid)
                  print("vz    ", gpsdata.velocity.z);
           if (gpsdata.headingIsValid)
                  print("heading", gpsdata.heading);
           if (gpsdata.speedIsValid)
                  print("speed", gpsdata.speed);
           if (gpsdata.numberSatellitesIsValid)
                  print("number of satellites", gpsdata.numberOfSatellites);
           print("\n\n");
           sleep(1);
    }
    # close the port
    GPSClose(gpsport);
    


    GPSOpen
    Open a GPS port

    GPSOpen(source)

    場所:

      GPS

    パラメータ:

      any value source
        Source name or number

    戻り値

    作成日時: 29-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # example of GPSOpen()
    # declare class variables
    class GPSPort gpsport;
    class GPSData gpsdata;
    # open the port
    gpsport = GPSOpen("GPS1");
    gpsdata = GPSPortRead(gpsport);
    # close the port
    GPSClose(gpsport);
    


    GPSPortClose
    Obsolete - use GPSClose()

    GPSPortClose(GPSPort)

    場所:

      GPS

    パラメータ:

      class GPSPORT GPSPort
        The GPS port to close

    詳細と仮定

      port was opened with GPSPortOpen

    戻り値

      なし

    作成日時: 10-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # example of GPSPortOpen()
    # declare class variables
    class GPSPort gpsport;
    class GPSData gpsdata;
    # open the port
    gpsport = GPSPortOpen("COM1", "NMEA", ":4800:8:none:1:");
    gpsdata = GPSPortRead(gpsport);
    # close the port
    GPSPortClose(gpsport);
    


    GPSPortOpen
    Obsolete - use GPSOpen()

    GPSPortOpen(name$, protocol$, portParms$)

    場所:

      GPS

    パラメータ:

      string name$ (オプション)
        The port name e.g. COM1
      string protocol$ (オプション)
        The GPS protocal
        可能性のある値:
          "None"
            No device
          "NMEA"
            NMEA protocol
          "TAIP"
            TAIP protocol
      string portParms$ (オプション)
        Port parmameters such as ":4800:8:none:1:"

    戻り値

    作成日時: 10-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # example of GPSPortOpen()
    # declare class variables
    class GPSPort gpsport;
    class GPSData gpsdata;
    # open the port
    gpsport = GPSPortOpen("COM1", "NMEA", ":4800:8:none:1:");
    gpsdata = GPSPortRead(gpsport);
    # close the port
    GPSPortClose(gpsport);
    


    GPSPortRead
    Read data from a GPS port

    GPSPortRead(GPSPort, lastRead)

    場所:

      GPS

    パラメータ:

      class GPSPORT GPSPort
        The GPS port to read from
      numeric lastRead (オプション)
        Pass 1 to retrieve last read values

    詳細と仮定

      port was opened with GPSPortOpen

    戻り値

    作成日時: 13-Apr-1998
    修正日時: 18-Jun-1998
    TNTsml for Windows で使用可能: はい

    例:

    # declare class variables
    class GPSPort gpsport;
    class GPSData gpsdata;
    clear();
    # open the port
    gpsport = GPSPortOpen("COM1", "NMEA", ":4800:8:none:1:");
    print(gpsport.Protocol, gpsport.Name);
    while (1) # now read data
    {
           print(gpsport.protocol, gpsport.name, "\n");
           gpsdata = GPSPortRead(gpsport);
           if (gpsdata.positionXYIsValid)
                  print("x y", gpsdata.position.x, gpsdata.position.y);
           if (gpsdata.positionZIsValid)
                  print("z  ", gpsdata.position.z);
           if (gpsdata.velocityXYIsValid)
                  print("vx vy ", gpsdata.velocity.x, gpsdata.velocity.y);
           if (gpsdata.velocityZIsValid)
                  print("vz    ", gpsdata.velocity.z);
           if (gpsdata.headingIsValid)
                  print("heading", gpsdata.heading);
           if (gpsdata.speedIsValid)
                  print("speed", gpsdata.speed);
           if (gpsdata.numberSatellitesIsValid)
                  print("number of satellites", gpsdata.numberOfSatellites);
           print("\n\n");
           sleep(1);
    }
    # close the port
    GPSPortClose(gpsport);
    


    GPSSourceManagerOpen
    Popup the GPS Source Manager dialog

    GPSSourceManagerOpen()

    場所:

      GPS

    パラメータ:

    戻り値

      なし

    作成日時: 19-Nov-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    GPSSourceManagerOpen(); # opens the manager dialog
    


    NetworkAllocatedCenterGet(allocationHandle, position)

    場所:

    パラメータ:

      class ALLOCATION allocationHandle
        An open allocation handle
      numeric position
        Allocated center position

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkAllocatedCenterGetAverageImpedance
    Get Allocated center average impedance

    NetworkAllocatedCenterGetAverageImpedance(allocationHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        A valid network allocation handle
      numeric position
        Allocated center position

    戻り値

      numeric

    作成日時: 06-Oct- 199
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkAllocatedCenterGetCapacity
    Get Allocated center capacity

    NetworkAllocatedCenterGetCapacity(allocationHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        A valid network allocation handle
      numeric position
        Allocated center position

    戻り値

      numeric

    作成日時: 06-Oct- 199
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkAllocatedCenterGetColor
    Get allocated center color

    NetworkAllocatedCenterGetColor(allocationHandle, position, red, green, blue)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        An open allocation handle
      numeric position
        The allocated center position
      numeric red
        Red value returned
      numeric green
        Green value returned
      numeric blue
        Blue value returned

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkAllocatedCenterGetDemand
    Get Allocated center demand

    NetworkAllocatedCenterGetDemand(allocationHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        A valid network allocation handle
      numeric position
        Allocated center position

    戻り値

      numeric

    作成日時: 06-Oct- 199
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkAllocatedCenterGetImpedanceDelay
    Get Allocated center impedance delay

    NetworkAllocatedCenterGetImpedanceDelay(allocationHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        A valid network allocation handle
      numeric position
        Allocated center position

    戻り値

      numeric

    作成日時: 06-Oct- 199
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    class Center center;
    class Allocation allocIn;
    class Allocation allocOut;
    numeric nodenum = 25;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    center = NetworkInitCenter(net);
    NetworkCenterAddCenter(center, nodenum);
    numeric pos = NetworkCenterGetPosition(center, nodenum);
    NetworkCenterSetColor(center, pos, 255, 0, 0); # make the center red
    NetworkCenterSetCapacity(center, pos, 200);
    NetworkCenterSetImpedanceLimit(center, pos, 500);
    NetworkCenterSetImpedanceDelay(center, pos, 0.0);
    allocIn = NetworkCenterCalculateAllocationIn(center);
    allocOut = NetworkCenterCalculateAllocationOut(center);
    print("Average Impedance:", NetworkAllocatedCenterGetAverageImpedance(allocIn, pos));
    print("Capacity:", NetworkAllocatedCenterGetCapacity(allocIn, pos));
    print("Demand:", NetworkAllocatedCenterGetDemand(allocIn, pos));
    print("Impedance Delay:", NetworkAllocatedCenterGetImpedanceDelay(allocIn, pos));
    print("Impedance Limit:", NetworkAllocatedCenterGetImpedanceLimit(allocIn, pos));
    print("Maximum Impedance:", NetworkAllocatedCenterGetMaximumImpedance(allocIn, pos));
    print("NumLines:", NetworkAllocatedCenterGetNumberLines(allocIn, pos));
    NetworkAllocationClose(allocIn);
    NetworkAllocationClose(allocOut);
    


    NetworkAllocatedCenterGetImpedanceLimit
    Get Allocated center impedance limit

    NetworkAllocatedCenterGetImpedanceLimit(allocationHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        A valid network allocation handle
      numeric position
        Allocated center position

    戻り値

      numeric

    作成日時: 06-Oct- 199
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    class Center center;
    class Allocation allocIn;
    class Allocation allocOut;
    numeric nodenum = 25;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    center = NetworkInitCenter(net);
    NetworkCenterAddCenter(center, nodenum);
    numeric pos = NetworkCenterGetPosition(center, nodenum);
    NetworkCenterSetColor(center, pos, 255, 0, 0); # make the center red
    NetworkCenterSetCapacity(center, pos, 200);
    NetworkCenterSetImpedanceLimit(center, pos, 500);
    NetworkCenterSetImpedanceDelay(center, pos, 0.0);
    allocIn = NetworkCenterCalculateAllocationIn(center);
    allocOut = NetworkCenterCalculateAllocationOut(center);
    print("Average Impedance:", NetworkAllocatedCenterGetAverageImpedance(allocIn, pos));
    print("Capacity:", NetworkAllocatedCenterGetCapacity(allocIn, pos));
    print("Demand:", NetworkAllocatedCenterGetDemand(allocIn, pos));
    print("Impedance Delay:", NetworkAllocatedCenterGetImpedanceDelay(allocIn, pos));
    print("Impedance Limit:", NetworkAllocatedCenterGetImpedanceLimit(allocIn, pos));
    print("Maximum Impedance:", NetworkAllocatedCenterGetMaximumImpedance(allocIn, pos));
    print("NumLines:", NetworkAllocatedCenterGetNumberLines(allocIn, pos));
    NetworkAllocationClose(allocIn);
    NetworkAllocationClose(allocOut);
    


    NetworkAllocatedCenterGetMaximumImpedance
    Get Allocated center maximum impedance

    NetworkAllocatedCenterGetMaximumImpedance(allocationHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        A valid network allocation handle
      numeric position
        Allocated center position

    戻り値

      numeric

    作成日時: 06-Oct- 199
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    class Center center;
    class Allocation allocIn;
    class Allocation allocOut;
    numeric nodenum = 25;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    center = NetworkInitCenter(net);
    NetworkCenterAddCenter(center, nodenum);
    numeric pos = NetworkCenterGetPosition(center, nodenum);
    NetworkCenterSetColor(center, pos, 255, 0, 0); # make the center red
    NetworkCenterSetCapacity(center, pos, 200);
    NetworkCenterSetImpedanceLimit(center, pos, 500);
    NetworkCenterSetImpedanceDelay(center, pos, 0.0);
    allocIn = NetworkCenterCalculateAllocationIn(center);
    allocOut = NetworkCenterCalculateAllocationOut(center);
    print("Average Impedance:", NetworkAllocatedCenterGetAverageImpedance(allocIn, pos));
    print("Capacity:", NetworkAllocatedCenterGetCapacity(allocIn, pos));
    print("Demand:", NetworkAllocatedCenterGetDemand(allocIn, pos));
    print("Impedance Delay:", NetworkAllocatedCenterGetImpedanceDelay(allocIn, pos));
    print("Impedance Limit:", NetworkAllocatedCenterGetImpedanceLimit(allocIn, pos));
    print("Maximum Impedance:", NetworkAllocatedCenterGetMaximumImpedance(allocIn, pos));
    print("NumLines:", NetworkAllocatedCenterGetNumberLines(allocIn, pos));
    NetworkAllocationClose(allocIn);
    NetworkAllocationClose(allocOut);
    


    NetworkAllocatedCenterGetNumber
    Get number of allocated centers

    NetworkAllocatedCenterGetNumber(allocationHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        An open allocation handle

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkAllocatedCenterGetNumberLines
    Get number of lines for an allocated center

    NetworkAllocatedCenterGetNumberLines(allocationHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        A valid network allocation handle
      numeric position
        Allocated center position

    戻り値

      numeric

    作成日時: 06-Oct- 199
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkAllocatedCenterGetPosition
    Get allocated center position given a node

    NetworkAllocatedCenterGetPosition(allocationHandle, line)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        An open allocation handle
      numeric line
        Node number

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkAllocatedLineGetNumber
    Get number of allocated lines

    NetworkAllocatedLineGetNumber(allocationHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        An open allocation handle

    戻り値

      numeric
      number of allocated lines

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkAllocatedLineGetPosition
    Get allocated line position

    NetworkAllocatedLineGetPosition(allocationHandle, node)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        An open allocation handle
      numeric node
        The line

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkAllocationClose
    Close an open allocation handle

    NetworkAllocationClose(allocationHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        An open allocation handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkAllocationGetReport
    Get a text report from an allocation handle

    NetworkAllocationGetReport(allocationHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        A valid allocation handle

    戻り値

      string

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkAllocationGetResultPositionList
    Get allocation position list

    NetworkAllocationGetResultPositionList(allocationHandle, positionList)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        An open allocation handle
      array positionList
        The position list returned

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkAllocationGetType
    Get allocation type (1 = ToFrom, 0 = FromTo)

    NetworkAllocationGetType(allocationHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        A valid allocation handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkAllocationRestoreCenter
    Recover a stop handle from a route handle

    NetworkAllocationRestoreCenter(allocationHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ALLOCATION allocationHandle
        A valid allocation handle

    戻り値

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkAngleApply
    Apply a network angle

    NetworkAngleApply(network)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkAngleGetImpedance
    Get impedance for an angle

    NetworkAngleGetImpedance(network, angle)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric angle
        The angle

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkAngleSetImpedance
    Set impedance for an angle

    NetworkAngleSetImpedance(network, angle, impedance)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric angle
        The angle
      numeric impedance
        The impedance to set

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCalculateMultiRoute
    Calculate a multiroute from source node to destination nodes

    NetworkCalculateMultiRoute(network, source, destinations, number, multiRouteHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        A valid network handle
      numeric source
        Source node
      array destinations
        One dimensional array of destinations nodes
      numeric number
        Number of destination nodes
      class MULTIROUTE multiRouteHandle
        A multiroute handle

    戻り値

      なし

    作成日時: 17-Jan-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/network.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    NetworkCenterAddCenter
    Add a center at a node

    NetworkCenterAddCenter(center, node)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER center
        A valid network center handle
      numeric node
        The node to create the center at

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkCenterCalculateAllocationIn
    Calculate allocation in

    NetworkCenterCalculateAllocationIn(centerHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle

    戻り値

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    class Center center;
    class Allocation allocIn;
    class Allocation allocOut;
    numeric nodenum = 25;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    center = NetworkInitCenter(net);
    NetworkCenterAddCenter(center, nodenum);
    numeric pos = NetworkCenterGetPosition(center, nodenum);
    NetworkCenterSetColor(center, pos, 255, 0, 0); # make the center red
    NetworkCenterSetCapacity(center, pos, 200);
    NetworkCenterSetImpedanceLimit(center, pos, 500);
    NetworkCenterSetImpedanceDelay(center, pos, 0.0);
    allocIn = NetworkCenterCalculateAllocationIn(center);
    allocOut = NetworkCenterCalculateAllocationOut(center);
    print("Average Impedance:", NetworkAllocatedCenterGetAverageImpedance(allocIn, pos));
    print("Capacity:", NetworkAllocatedCenterGetCapacity(allocIn, pos));
    print("Demand:", NetworkAllocatedCenterGetDemand(allocIn, pos));
    print("Impedance Delay:", NetworkAllocatedCenterGetImpedanceDelay(allocIn, pos));
    print("Impedance Limit:", NetworkAllocatedCenterGetImpedanceLimit(allocIn, pos));
    print("Maximum Impedance:", NetworkAllocatedCenterGetMaximumImpedance(allocIn, pos));
    print("NumLines:", NetworkAllocatedCenterGetNumberLines(allocIn, pos));
    NetworkAllocationClose(allocIn);
    NetworkAllocationClose(allocOut);
    


    NetworkCenterCalculateAllocationOut
    Calculate allocation out

    NetworkCenterCalculateAllocationOut(centerHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle

    戻り値

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkCenterCloneHandle
    Duplicate a center handle

    NetworkCenterCloneHandle(centerHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle

    戻り値

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCenterClose
    Close an open center handle

    NetworkCenterClose(centerHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkCenterDeleteAllCenters
    Delete all centers

    NetworkCenterDeleteAllCenters(centerHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCenterDeleteCenters
    Delete specific centers

    NetworkCenterDeleteCenters(centerHandle, centerList, number)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      array centerList
        The array holding center positions to delete
      numeric number
        Number of elements in centerList array

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCenterGet
    Get center node given position

    NetworkCenterGet(centerHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      numeric position
        The center position

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCenterGetCapacity
    Get center capacity

    NetworkCenterGetCapacity(centerHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      numeric position
        The center position

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCenterGetCentersList
    Get list of centers

    NetworkCenterGetCentersList(centerHandle, centerList)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      array centerList
        The center list returned

    戻り値

      numeric
      number of centers

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCenterGetColor
    Get center color

    NetworkCenterGetColor(centerHandle, position, red, green, blue)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      numeric position
        The center position
      numeric red
        Red value returned
      numeric green
        Green value returned
      numeric blue
        Blue value returned

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCenterGetImpedanceDelay
    Get center impedance delay

    NetworkCenterGetImpedanceDelay(centerHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      numeric position
        The center position

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCenterGetImpedanceLimit
    Get center impedance limit

    NetworkCenterGetImpedanceLimit(centerHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      numeric position
        The center position

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCenterGetNumberCenters
    Get number of centers

    NetworkCenterGetNumberCenters(centerHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle

    戻り値

      numeric
      number of centers

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkCenterGetPosition
    Get center position given node

    NetworkCenterGetPosition(centerHandle, node)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      numeric node
        The centers node

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkCenterSetCapacity
    Set center capacity

    NetworkCenterSetCapacity(centerHandle, position, capacity)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      numeric position
        The center position
      numeric capacity
        The capacity value to set

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkCenterSetColor
    Set center color

    NetworkCenterSetColor(centerHandle, position, red, green, blue)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      numeric position
        The center position
      numeric red
        The red value to set
      numeric green
        The green value to set
      numeric blue
        The blue value to set

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    class Center center;
    class Allocation allocIn;
    class Allocation allocOut;
    numeric nodenum = 25;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    center = NetworkInitCenter(net);
    NetworkCenterAddCenter(center, nodenum);
    numeric pos = NetworkCenterGetPosition(center, nodenum);
    NetworkCenterSetColor(center, pos, 255, 0, 0); # make the center red
    NetworkCenterSetCapacity(center, pos, 200);
    NetworkCenterSetImpedanceLimit(center, pos, 500);
    NetworkCenterSetImpedanceDelay(center, pos, 0.0);
    allocIn = NetworkCenterCalculateAllocationIn(center);
    allocOut = NetworkCenterCalculateAllocationOut(center);
    print("Average Impedance:", NetworkAllocatedCenterGetAverageImpedance(allocIn, pos));
    print("Capacity:", NetworkAllocatedCenterGetCapacity(allocIn, pos));
    print("Demand:", NetworkAllocatedCenterGetDemand(allocIn, pos));
    print("Impedance Delay:", NetworkAllocatedCenterGetImpedanceDelay(allocIn, pos));
    print("Impedance Limit:", NetworkAllocatedCenterGetImpedanceLimit(allocIn, pos));
    print("Maximum Impedance:", NetworkAllocatedCenterGetMaximumImpedance(allocIn, pos));
    print("NumLines:", NetworkAllocatedCenterGetNumberLines(allocIn, pos));
    NetworkAllocationClose(allocIn);
    NetworkAllocationClose(allocOut);
    


    NetworkCenterSetImpedanceDelay
    Set center impedance delay

    NetworkCenterSetImpedanceDelay(centerHandle, position, ImpedanceDelay)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      numeric position
        The center position
      numeric ImpedanceDelay
        The impedance delay value to set

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    class Center center;
    class Allocation allocIn;
    class Allocation allocOut;
    numeric nodenum = 25;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    center = NetworkInitCenter(net);
    NetworkCenterAddCenter(center, nodenum);
    numeric pos = NetworkCenterGetPosition(center, nodenum);
    NetworkCenterSetColor(center, pos, 255, 0, 0); # make the center red
    NetworkCenterSetCapacity(center, pos, 200);
    NetworkCenterSetImpedanceLimit(center, pos, 500);
    NetworkCenterSetImpedanceDelay(center, pos, 0.0);
    allocIn = NetworkCenterCalculateAllocationIn(center);
    allocOut = NetworkCenterCalculateAllocationOut(center);
    print("Average Impedance:", NetworkAllocatedCenterGetAverageImpedance(allocIn, pos));
    print("Capacity:", NetworkAllocatedCenterGetCapacity(allocIn, pos));
    print("Demand:", NetworkAllocatedCenterGetDemand(allocIn, pos));
    print("Impedance Delay:", NetworkAllocatedCenterGetImpedanceDelay(allocIn, pos));
    print("Impedance Limit:", NetworkAllocatedCenterGetImpedanceLimit(allocIn, pos));
    print("Maximum Impedance:", NetworkAllocatedCenterGetMaximumImpedance(allocIn, pos));
    print("NumLines:", NetworkAllocatedCenterGetNumberLines(allocIn, pos));
    NetworkAllocationClose(allocIn);
    NetworkAllocationClose(allocOut);
    


    NetworkCenterSetImpedanceLimit
    Set center impedance limit

    NetworkCenterSetImpedanceLimit(centerHandle, position, impedanceLimit)

    場所:

      ベクタネットワーク

    パラメータ:

      class CENTER centerHandle
        An open center handle
      numeric position
        The center position
      numeric impedanceLimit
        The impedance value to set

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    class Center center;
    class Allocation allocIn;
    class Allocation allocOut;
    numeric nodenum = 25;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    center = NetworkInitCenter(net);
    NetworkCenterAddCenter(center, nodenum);
    numeric pos = NetworkCenterGetPosition(center, nodenum);
    NetworkCenterSetColor(center, pos, 255, 0, 0); # make the center red
    NetworkCenterSetCapacity(center, pos, 200);
    NetworkCenterSetImpedanceLimit(center, pos, 500);
    NetworkCenterSetImpedanceDelay(center, pos, 0.0);
    allocIn = NetworkCenterCalculateAllocationIn(center);
    allocOut = NetworkCenterCalculateAllocationOut(center);
    print("Average Impedance:", NetworkAllocatedCenterGetAverageImpedance(allocIn, pos));
    print("Capacity:", NetworkAllocatedCenterGetCapacity(allocIn, pos));
    print("Demand:", NetworkAllocatedCenterGetDemand(allocIn, pos));
    print("Impedance Delay:", NetworkAllocatedCenterGetImpedanceDelay(allocIn, pos));
    print("Impedance Limit:", NetworkAllocatedCenterGetImpedanceLimit(allocIn, pos));
    print("Maximum Impedance:", NetworkAllocatedCenterGetMaximumImpedance(allocIn, pos));
    print("NumLines:", NetworkAllocatedCenterGetNumberLines(allocIn, pos));
    NetworkAllocationClose(allocIn);
    NetworkAllocationClose(allocOut);
    


    NetworkClose
    Close an open network handle

    NetworkClose(network)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkGetNumberOfTables
    Get number of tables of given type

    NetworkGetNumberOfTables(network, typeFlag$)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        A valid network handle
      string typeFlag$
        Table type - possible values
        可能性のある値:
          "Line"
            Get line table
          "Turn"
            Get turn table
          "Barrier"
            Get barrier table
          "Angle"
            Get angle table

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    numeric numLineTables = NetworkGetNumberOfTables(net, "Line");
    numeric numTurnTables = NetworkGetNumberOfTables(net, "Turn");
    numeric numBarrierTables = NetworkGetNumberOfTables(net, "Barrier");
    numeric numAngleTables = NetworkGetNumberOfTables(net, "Angle");
    numeric i;
    for (i=0; iclass NETWORK network
      A valid network handle
    numeric tableNumber
      The table number
    string typeFlag$
      Table type - possible values
      可能性のある値:
        "Line"
          Get line table
        "Turn"
          Get turn table
        "Barrier"
          Get barrier table
        "Angle"
          Get angle table

    戻り値

      string

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    numeric numLineTables = NetworkGetNumberOfTables(net, "Line");
    numeric numTurnTables = NetworkGetNumberOfTables(net, "Turn");
    numeric numBarrierTables = NetworkGetNumberOfTables(net, "Barrier");
    numeric numAngleTables = NetworkGetNumberOfTables(net, "Angle");
    numeric i;
    for (i=0; istring filename$
      RVC filename of vector
    string objname$
      Object name of vector

    戻り値

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkInitCenter
    Create a center handle

    NetworkInitCenter(network)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle

    戻り値

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkInitStop
    Create a stop handle

    NetworkInitStop(network)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle

    戻り値

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkLineGetDemand
    Get demand for a line

    NetworkLineGetDemand(network, line)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric line
        The line number

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkLineGetDirectionState
    Get line direction state

    NetworkLineGetDirectionState(network, line, directionFlag$)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric line
        The line number
      string directionFlag$
        The direction
        可能性のある値:
          "FromTo"
            from-to line direction
          "ToFrom"
            to-from line direction

    戻り値

      numeric
      number (1 = enabled, 0 = disabled)

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkLineGetImpedance
    Get impedance for a line

    NetworkLineGetImpedance(network, line, directionFlag$)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric line
        The line number
      string directionFlag$
        The direction
        可能性のある値:
          "FromTo"
            from-to line direction
          "ToFrom"
            to-from line direction

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkLineGetName
    Get line name

    NetworkLineGetName(Handle, lineNumber)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK Handle
        An open network handle
      numeric lineNumber
        The line number

    戻り値

      string

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # get the first few line and node names
    numeric i;
    for (i=0; i<5; i++)
    {
           string name$ = NetworkLineGetName(net, i);
           print ("Line", i, "=", name$);
    }
    # node names may be more useful
    for (i=0; i<5; i++)
    {
           string name$ = NetworkNodeGetName(net, i);
           print ("Node", i, "=", name$);
    }
    


    NetworkLineGetNodeFrom
    Get the node a line is coming from

    NetworkLineGetNodeFrom(Network, line)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK Network
        An open network handle
      numeric line
        The line number

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkLineGetNodeTo
    Get the node a line is going to

    NetworkLineGetNodeTo(Network, line)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK Network
        An open network handle
      numeric line
        The line number

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkLineGetNumberLines
    Get number of lines

    NetworkLineGetNumberLines(network)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkLineSetDemand
    Set demand for a line

    NetworkLineSetDemand(network, line, demand)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric line
        The line number
      numeric demand
        The demand value to set

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkLineSetDirectionState
    Set line direction state

    NetworkLineSetDirectionState(network, line, directionFlag$, stateFlag$)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric line
        The line number
      string directionFlag$
        The direction
        可能性のある値:
          "FromTo"
            from-to line direction
          "ToFrom"
            to-from line direction
      string stateFlag$
        The direction
        可能性のある値:
          "Enable"
            disable this line direction
          "Disable"
            disable this line direction

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkLineSetImpedance
    Set impedance for a line

    NetworkLineSetImpedance(network, line, impedance, directionFlag$)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric line
        The line number
      numeric impedance
        The impedance value to set
      string directionFlag$
        The direction
        可能性のある値:
          "FromTo"
            from-to line direction
          "ToFrom"
            to-from line direction

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class Network net;
    class Allocation alloc;
    class Center center;
    GetInputVector(V);
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # use line length as impedence value
    numeric i;
    for (i=1; i


    NetworkMultiRouteClose
    Close an open network multiroute handle

    NetworkMultiRouteClose(multiRouteHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class MULTIROUTE multiRouteHandle
        The route handle

    戻り値

      なし

    作成日時: 17-Jan-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/network.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    NetworkMultiRouteGetRoute
    Calculate a route from multiroute to destination node

    NetworkMultiRouteGetRoute(multiRouteHandle, destination, routeHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class MULTIROUTE multiRouteHandle
        A multiroute handle
      numeric destination
        A destination node
      class ROUTE routeHandle
        A route handle

    戻り値

      なし

    作成日時: 17-Jan-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/network.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    NetworkNodeGetBarrierState
    Get barrier state for a node (boolean)

    NetworkNodeGetBarrierState(network, node)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric node
        The node number

    戻り値

      numeric
      number (1 for barrier on, 0 for barrier off)

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkNodeGetName
    Get node name

    NetworkNodeGetName(Handle, nodeNumber)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK Handle
        An open network handle
      numeric nodeNumber
        The node number

    戻り値

      string

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Network net;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    # get the first few line and node names
    numeric i;
    for (i=0; i<5; i++)
    {
           string name$ = NetworkLineGetName(net, i);
           print ("Line", i, "=", name$);
    }
    # node names may be more useful
    for (i=0; i<5; i++)
    {
           string name$ = NetworkNodeGetName(net, i);
           print ("Node", i, "=", name$);
    }
    


    NetworkNodeGetNumberNodes
    Get number of nodes in network

    NetworkNodeGetNumberNodes(network)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkNodeSetBarrierState
    Set barrier state for a node

    NetworkNodeSetBarrierState(network, node, stateFlag$)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric node
        The node number
      string stateFlag$
        State
        可能性のある値:
          "Enable"
            disable this line direction
          "Disable"
            disable this line direction

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkReadAttributeTable
    Read an attribute table

    NetworkReadAttributeTable(network, tableName$, typeFlag$)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      string tableName$
        The table name
      string typeFlag$
        The type of table to get
        可能性のある値:
          "Line"
            Get line table
          "Turn"
            Get turn table
          "Barrier"
            Get barrier table
          "Angle"
            Get angle table
          "Count"
            Get count table

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkRouteClose
    Close an open route handle

    NetworkRouteClose(routeHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkRouteGetLine
    Get a line from a position

    NetworkRouteGetLine(routeHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle
      numeric position
        The line position

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkRouteGetLineDirection
    Get line direction

    NetworkRouteGetLineDirection(routeHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle
      numeric position
        The line position

    戻り値

      numeric
      number (1 = to-from, 0 = from-to)

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkRouteGetNode
    Get a node from a position

    NetworkRouteGetNode(routeHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle
      numeric position
        The node position

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkRouteGetNumberOfLines
    Get number of lines in a route

    NetworkRouteGetNumberOfLines(routeHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle

    戻り値

      numeric
      number of lines

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkRouteGetNumberOfNodes
    Get number of nodes in a route

    NetworkRouteGetNumberOfNodes(routeHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle

    戻り値

      numeric
      number of nodes

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkRouteGetReport
    Get a text report from a route handle

    NetworkRouteGetReport(routeHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        A valid route handle

    戻り値

      string

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkRouteGetResultLineList
    Get route result as line list

    NetworkRouteGetResultLineList(routeHandle, lineList)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle
      array lineList
        The line list returned

    戻り値

      numeric
      number of lines

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkRouteGetResultNodeList
    Get route result as node list

    NetworkRouteGetResultNodeList(routeHandle, nodeList)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle
      array nodeList
        The node list returned

    戻り値

      numeric
      number of nodes

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkRouteGetResultPointList
    Get route result as points

    NetworkRouteGetResultPointList(routeHandle, xPoints, yPoints)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle
      array xPoints
        The x values returned
      array yPoints
        The y values returned

    戻り値

      numeric
      number of points

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkRouteIsNodeStop
    Is a node a stop (boolean)

    NetworkRouteIsNodeStop(routeHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle
      numeric position
        The node position

    戻り値

      numeric
      number (1 = true, 0 = false)

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkRouteIsNodeTurn
    Is a node a turn (boolean)

    NetworkRouteIsNodeTurn(routeHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        An open route handle
      numeric position
        The node position

    戻り値

      numeric
      number (1 = true, 0 = false)

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkRouteRestoreStop
    Recover a stop handle from a route handle

    NetworkRouteRestoreStop(routeHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class ROUTE routeHandle
        A valid route handle

    戻り値

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkSetDefaultAttributes
    Set default attributes for a network

    NetworkSetDefaultAttributes(network)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/network.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    NetworkStopAddStop
    Add a stop

    NetworkStopAddStop(stopHandle, node, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        A valid network stop handle
      numeric node
        The node number of the stop
      numeric position
        Position to add stop at

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkStopCalculateRoute
    Calculate a route from stop handle and route handle

    NetworkStopCalculateRoute(stopHandle, routeHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        An open stop handle
      class ROUTE routeHandle
        An open route handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkStopCloneHandle
    Copy a stop handle

    NetworkStopCloneHandle(stopHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        An open stop handle

    戻り値

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkStopClose
    Close an open stop handle

    NetworkStopClose(stopHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        An open stop handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkStopDeleteAllStops
    Delete all stops

    NetworkStopDeleteAllStops(stopHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        A valid network stop handle

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkStopDeleteStops
    Delete specific stops

    NetworkStopDeleteStops(stopHandle, stopList, number)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        A valid network stop handle
      array stopList
        The list of stop positions to delete
      numeric number
        Number of stops in stopList

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkStopGet
    Get a stop node given its position

    NetworkStopGet(stopHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        A valid network stop handle
      numeric position
        The stop position

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkStopGetDemand
    Get demand for a stop

    NetworkStopGetDemand(stopHandle, position)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        An open stop handle
      numeric position
        The stop position

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkStopGetNumberStops
    Get number of stops

    NetworkStopGetNumberStops(stopHandle)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        A valid network stop handle

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkStopGetStopsList
    Get the stop list for a stop handle

    NetworkStopGetStopsList(stopHandle, stopList)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        An open stop handle
      array stopList
        The stop list returned

    戻り値

      numeric
      number of stops

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkStopMove
    Move a stop (change stop list order)

    NetworkStopMove(stopHandle, oldPosition, newPosition)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        A valid network stop handle
      numeric oldPosition
        The stops current position
      numeric newPosition
        The stops new position

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkStopSetDemand
    Set demand for a stop

    NetworkStopSetDemand(stopHandle, position, demand)

    場所:

      ベクタネットワーク

    パラメータ:

      class STOP stopHandle
        An open stop handle
      numeric position
        The stop position
      numeric demand
        The demand value to set

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Network net;
    class Stop stop;
    class Route route;
    vector V;
    GetInputVector(V);     # c:/data/network/network.rvc
    net = NetworkInit(V.$Info.Filename, V.$Info.Name);
    stop = NetworkInitStop(net);
    # add stops
    NetworkStopAddStop(stop, 14, 0);
    NetworkStopAddStop(stop, 74, 0);
    NetworkStopAddStop(stop, 174, 0);
    NetworkStopAddStop(stop, 199, 0);
    NetworkStopAddStop(stop, 159, 0);
    NetworkStopAddStop(stop, 100, 1);
    NetworkStopSetDemand(stop, 1, 911.0);
    NetworkStopMove(stop, 1, 4);
    print(NetworkStopGet(stop, 4));
    print(NetworkStopGetDemand(stop, 4));
    print(NetworkStopGetNumberStops(stop));
    # remove a stop
    array numeric positions[10];
    numeric numPos = 1;
    positions[0] = 4;
    NetworkStopDeleteStops(stop, positions, numPos);
    print(NetworkStopGetNumberStops(stop));
    # get the stoplist
    array numeric stoplist[10];
    print(NetworkStopGetStopsList(stop, stoplist));
    # calculate a route
    NetworkStopCalculateRoute(stop, route);
    NetworkStopClose(stop);
    # now use the route result
    array numeric linelist[10], nodelist[10], xpointlist[10], ypointlist[10];
    numeric numlines, numnodes, numpoints;
    numlines = NetworkRouteGetResultLineList(route, linelist);
    numnodes = NetworkRouteGetResultNodeList(route, nodelist);
    numpoints = NetworkRouteGetResultPointList(route, xpointlist, ypointlist);
    if (NetworkRouteGetNumberOfLines(route) != numlines) print("Error in lines!");
    if (NetworkRouteGetNumberOfNodes(route) != numnodes) print("Error in nodes!");
    print(NetworkRouteGetReport(route));
    NetworkRouteClose(route);
    


    NetworkTableIsTable
    Is a table of given type and name part of network (boolean)

    NetworkTableIsTable(network, tableName$, typeFlag$)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      string tableName$
        The table name
      string typeFlag$
        The type of table to get
        可能性のある値:
          "Line"
            Get line table
          "Turn"
            Get turn table
          "Barrier"
            Get barrier table
          "Angle"
            Get angle table
          "Count"
            Get count table

    戻り値

      numeric
      number (1 if true, 0 if false)

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkTableSetLineNameAsTableAndField
    Use table to set line names

    NetworkTableSetLineNameAsTableAndField(network, tableName$, fieldName$)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      string tableName$
        The table name
      string fieldName$
        The field name
        可能性のある値:
          "Line"
            Get line table
          "Turn"
            Get turn table
          "Barrier"
            Get barrier table
          "Angle"
            Get angle table
          "Count"
            Get count table

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkTurnGetAngle
    Get turn angle

    NetworkTurnGetAngle(network, node, inAngle, outAngle)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric node
        The node number
      numeric inAngle
        Input angle (0 to 360)
      numeric outAngle
        Output angle (0 to 360)

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkTurnGetImpedance
    Get turn impedance

    NetworkTurnGetImpedance(network, node, inAngle, outAngle)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric node
        The node number
      numeric inAngle
        Input angle (0 to 360)
      numeric outAngle
        Output angle (0 to 360)

    戻り値

      numeric

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkTurnSetImpedance
    Set turn impedance

    NetworkTurnSetImpedance(network, node, inAngle, outAngle, impedance)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      numeric node
        The node number
      numeric inAngle
        Input angle (0 to 360)
      numeric outAngle
        Output angle (0 to 360)
      numeric impedance
        The impedance to set

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    NetworkWriteAttributeTable
    Write an attribute table

    NetworkWriteAttributeTable(network, tableName$, typeFlag$)

    場所:

      ベクタネットワーク

    パラメータ:

      class NETWORK network
        An open network handle
      string tableName$
        The table name
      string typeFlag$
        The type of table to get
        可能性のある値:
          "Line"
            Get line table
          "Turn"
            Get turn table
          "Barrier"
            Get barrier table
          "Angle"
            Get angle table
          "Count"
            Get count table

    戻り値

      なし

    作成日時: 17-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DBEditorCloseTable(dbeditor, tablename$)

    場所:

    パラメータ:

      class DBEDITOR dbeditor
        The data base editor
      string tablename$
        The table to close

    戻り値

      なし

    作成日時: 15-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # DBEditorCloseTable() and DBEditorDestroy() can be used
    # in a callback function when the DBEditor is no longer needed.
    #
    # Generally these are not necessary to call as it will kill
    # any open dialog windows created with the DBEditor.
    # In this case, the cleanup will be handled by SML.
    


    DBEditorCreate
    Creates a DBEDITOR handle for a given database.

    DBEditorCreate(database)

    場所:

      データベースエディタ

    パラメータ:

      class DATABASE database
        Handle to an open database.

    戻り値

    作成日時: 24-May-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    class DATABASE db;
    class DBEDITOR dbedit;
    class DBEDITORTABLE tabview;
    string tableName$;
    # Select the vector
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    numeric err = PopupSelectTable(db, tableName$);
    if (err>0)
    {
           dbedit = DBEditorCreate(db);
           tabview = DBEditorOpenTabularView(dbedit, tableName$);
    }
    


    DBEditorDestroy
    Destroy a DBEDITOR handle created by DBEditorCreate().

    DBEditorDestroy(dbeditor)

    場所:

      データベースエディタ

    パラメータ:

      class DBEDITOR dbeditor
        The DBEDITOR to destroy

    戻り値

      なし

    作成日時: 24-May-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # DBEditorCloseTable() and DBEditorDestroy() can be used
    # in a callback function when the DBEditor is no longer needed.
    #
    # Generally these are not necessary to call as it will kill
    # any open dialog windows created with the DBEditor.
    # In this case, the cleanup will be handled by SML.
    


    DBEditorModalSingleRecordView
    Pops up a modal dialog to edit a database record

    DBEditorModalSingleRecordView(dbeditor, tablename$, record, parent, fieldname$, value, ...)

    場所:

      データベースエディタ

    パラメータ:

      class DBEDITOR dbeditor
        For example: vectlayer.Poly.LayerManager.DBEditor
      string tablename$
        The table name
      numeric record
        Record number to edit (0 for new record)
      class Widget parent
        Parent widget or dialog
      string fieldname$ (オプション)
        Field to preinitialize
      any value value (オプション)
        Value to preinitialize field with
      any value ... (オプション)
        Additional fieldname/value pairs

    戻り値

      numeric

    作成日時: 22-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DBEditorOpenSingleRecordView
    Open single record view of a table

    DBEditorOpenSingleRecordView(dbeditor, tablename$)

    場所:

      データベースエディタ

    パラメータ:

      class DBEDITOR dbeditor
        The data base editor to show the view in
      string tablename$
        The table to view

    戻り値

    作成日時: 15-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    class DATABASE db;
    class DBEDITOR dbedit;
    class DBEDITORTABLE tabview;
    string tableName$;
    # Select the vector
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    numeric err = PopupSelectTable(db, tableName$);
    if (err>0)
    {
           dbedit = DBEditorCreate(db);
           tabview = DBEditorOpenSingleRecordView(dbedit, tableName$);
    }
    


    DBEditorOpenTabularView
    Open a tabular view form of a table

    DBEditorOpenTabularView(dbeditor, tablename$)

    場所:

      データベースエディタ

    パラメータ:

      class DBEDITOR dbeditor
        The data base editor to show the view in
      string tablename$
        The table to view

    戻り値

    作成日時: 15-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    class DATABASE db;
    class DBEDITOR dbedit;
    class DBEDITORTABLE tabview;
    string tableName$;
    # Select the vector
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    numeric err = PopupSelectTable(db, tableName$);
    if (err>0)
    {
           dbedit = DBEditorCreate(db);
           tabview = DBEditorOpenTabularView(dbedit, tableName$);
    }
    


    DBEditorSingleRecordWidgetCreate
    Create XmForm with controls to edit a database record

    DBEditorSingleRecordWidgetCreate(dbeditor, tablename$, parent)

    場所:

      データベースエディタ

    パラメータ:

      class DBEDITOR dbeditor
        For example: vectlayer.Poly.LayerManager.DBEditor
      string tablename$
        The table name
      class Widget parent
        Parent widget

    戻り値

    作成日時: 23-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DBEditorSingleRecordWidgetGetFieldNum
    Get a field value (numeric) from a Single Record Widget

    DBEditorSingleRecordWidgetGetFieldNum(srvwidget, fieldName$)

    場所:

      データベースエディタ

    パラメータ:

      class DBEDITOR_SINGLERECORDWIDGET srvwidget
        From DBEditorSingleRecordWidgetCreate()
      any value fieldName$
        Can pass field name or field number

    戻り値

      numeric
      the field value

    作成日時: 25-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DBEditorSingleRecordWidgetGetFieldStr
    Get a field value (string) from a Sincle Record Widget

    DBEditorSingleRecordWidgetGetFieldStr(srvwidget, fieldName$)

    場所:

      データベースエディタ

    パラメータ:

      class DBEDITOR_SINGLERECORDWIDGET srvwidget
        From DBEditorSingleRecordWidgetCreate()
      any value fieldName$
        Can pass field name or field number

    戻り値

      string

    作成日時: 25-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DBEditorSingleRecordWidgetSaveChanges
    Save changes to a record in a SingleRecordWidget (returns record number)

    DBEditorSingleRecordWidgetSaveChanges(srvwidget)

    場所:

      データベースエディタ

    パラメータ:

    戻り値

      numeric
      the record number

    作成日時: 23-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DBEditorSingleRecordWidgetSetField
    Set the value of a field in a Single Record Widget

    DBEditorSingleRecordWidgetSetField(srvwidget, fieldName$, value)

    場所:

      データベースエディタ

    パラメータ:

      class DBEDITOR_SINGLERECORDWIDGET srvwidget
        From DBEditorSingleRecordWidgetCreate()
      any value fieldName$
        Field Name
      any value value
        Value to set field to (numeric or string)

    戻り値

      なし

    作成日時: 23-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DBEditorSingleRecordWidgetSetRecord
    Load a record into a SingleRecordWidget

    DBEditorSingleRecordWidgetSetRecord(srvwidget, record)

    場所:

      データベースエディタ

    パラメータ:

      class DBEDITOR_SINGLERECORDWIDGET srvwidget
        From DBEditorSingleRecordWidgetCreate()
      numeric record
        Record number to read (0 for new record)

    戻り値

      なし

    作成日時: 23-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ExportCAD(mieHandle, outputFile$, rvcFile$, objectName$)

    場所:

    パラメータ:

      class MieCAD mieHandle
        A class derived from MieCAD
      string outputFile$
        File to export to
      string rvcFile$
        RVC file
      string objectName$
        Object name

    詳細と仮定

      Export functions are disabled under TNTlite

    戻り値

      なし

    作成日時: 16-Mar-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of ExportCAD()
    class MieMIFCAD mifHandle;
    string mifFile$ = "c:/SML_ExpCAD.mif";
    string inputRVCFile$ = "c:/ImpExp.rvc";
    string inputObjectName$ = "FOOTPRNT";
    mifHandle.TableType = "CAD";
    ExportCAD(mifHandle, mifFile$, inputRVCFile$, inputObjectName$);
    


    ExportDatabase
    Export a database. This function is being deprecated, but will continue to work for legacy purposes. Please use the ExportObject(s) method on the class MieHANDLE.

    ExportDatabase(mieHandle, outputFile$, rvcFile$, objectName$, databaseType$, tableName$)

    場所:

      インポート(入力)/エクスポート(出力)

    パラメータ:

      class MieDATABASE mieHandle
        Any class derived from MieDATABASE
      string outputFile$
        File to export to
      string rvcFile$
        RVC File
      string objectName$
        Object name
      string databaseType$
        Type of database to export
      string tableName$
        Name of table to export

    詳細と仮定

      Export functions are disabled under TNTlite

    戻り値

      なし

    作成日時: 16-Mar-1999
    修正日時: 06-Sep-2005
    TNTsml for Windows で使用可能: はい

    例:

    class MieMIPS_EXTERNAL db;
    vector V;
    GetInputVector(V);
    # export polystats table
    string outputfile$ = "C:/temp";
    string rvc$ = V.$Info.Filename;
    string obj$ = V.$Info.Name;
    string type$ = "PolygonDatabase";
    string table$ = "CLASS";
    ExportDatabase(db, outputfile$, rvc$, obj$, type$, table$);
    


    ExportRaster
    Export a Raster using class derived from MieRASTER class. This function is being deprecated, but will continue to work for legacy purposes. Please use the ExportObject(s) method on the class MieHANDLE.

    ExportRaster(mieHandle, outputFile$, rvcFile$, objectName$)

    場所:

      インポート(入力)/エクスポート(出力)

    パラメータ:

      class MieRASTER mieHandle
        A class derived from MieRASTER
      string outputFile$
        File to export to
      string rvcFile$
        RVC file
      string objectName$
        Object name

    詳細と仮定

      Export functions are disabled under TNTlite

    戻り値

      なし

    作成日時: 16-Mar-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of ExportRaster()
    class MieTIFF tiffHandle;
    string tiffFile$ = "c:/import/smlexp.tif";
    string inputRVCFile$ = "c:/import/temp_imp.rvc";
    string inputObjectName$ = "imptiff";
    # set optional parms
    tiffHandle.RVCCompressionType = "NONE";
    ExportRaster(tiffHandle, tiffFile$, inputRVCFile$, inputObjectName$);
    


    ExportTIN
    Export a TIN object. This function is being deprecated, but will continue to work for legacy purposes. Please use the ExportObject(s) method on the class MieHANDLE.

    ExportTIN(mieHandle, outputFile$, rvcFile$, objectName$)

    場所:

      インポート(入力)/エクスポート(出力)

    パラメータ:

      class MieTIN mieHandle
        TIN Export parameters (must be filled in already)
      string outputFile$
        File to export to
      string rvcFile$
        RVC File
      string objectName$
        TIN Object to export

    詳細と仮定

      Export functions are disabled under TNTlite

    戻り値

      なし

    作成日時: 16-Mar-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    TIN T;
    class MieARC_SHAPEFILETIN shapetin;
    string outputfile$ = "C:/shapetin.shp";
    string rvc$, obj$;
    shapetin.ElementType = "Polygon";
    shapetin.TableName = "ThisTable";
    GetInputTIN(T);
    rvc$ = T.$Info.Filename;
    obj$ = T.$Info.Name;
    ExportTIN(shapetin, outputfile$, rvc$, obj$);
    


    ExportVector
    Export a Vector using class derived from MieVECTOR class. This function is obsolete. Please use the ExportObject(s) method on the class MieHANDLE.

    ExportVector(mieHandle, outputFile$, rvcFile$, objectName$)

    場所:

      インポート(入力)/エクスポート(出力)

    パラメータ:

      class MieVECTOR mieHandle
        A class derived from MieVECTOR
      string outputFile$
        File to export to
      string rvcFile$
        RVC file
      string objectName$
        Object name

    詳細と仮定

      Export functions are disabled under TNTlite

    戻り値

      なし

    作成日時: 16-Mar-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of ExportVector()
    class MieMOSSVECTOR vHandle;
    string mossFile$ = "c:/SML_Exp.ddf";
    string inputRVCFile$ = "c:/test.rvc";
    string inputObjectName$ = "VECTORS";
    ExportVector(vHandle, mossFile$, inputRVCFile$, inputObjectName$);
    


    ImportCAD
    Import a CAD using class derived from MieCAD class. This function is being deprecated, but will continue to work for legacy purposes. Please use the ImportObject(s) method on the class MieHANDLE.

    ImportCAD(mieHandle, inputFilename$, rvcFile$, objectName$, objectDescription$)

    場所:

      インポート(入力)/エクスポート(出力)

    パラメータ:

      class MieCAD mieHandle
        A class derived from MieCAD
      string inputFilename$
        File to import
      string rvcFile$
        Output RVC filename
      string objectName$
        Output object name
      string objectDescription$ (オプション)
        Output object description

    戻り値

      なし

    作成日時: 17-Mar-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of ImportCAD()
    class MieMIFCAD mifHandle;
    string mifFile$ = "c:/contours.mif";
    string destRVCFile$ = "c:/ImpExp.rvc";
    string destObjectName$ = "impMIF";
    string destObjectDesc$ = "imported via SML";
    mifHandle.TableType = "CAD";
    ImportCAD(mifHandle, mifFile$, destRVCFile$, destObjectName$, destObjectDesc$);
    


    ImportRaster
    Import a Raster using class derived from MieRASTER class. This function is being deprecated, but will continue to work for legacy purposes. Please use the ImportObject(s) method on the class MieHANDLE.

    ImportRaster(mieHandle, inputFilename$, rvcFile$, objectName$, objectDescription$)

    場所:

      インポート(入力)/エクスポート(出力)

    パラメータ:

      class MieRASTER mieHandle
        A class derived from MieRASTER
      string inputFilename$
        File to import
      string rvcFile$
        RVC filename
      string objectName$
        Object name
      string objectDescription$ (オプション)
        Object description

    戻り値

      なし

    作成日時: 16-Feb-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    #####################
    # Import a tiff file
    #####################
    class MieTIFF tiffHandle;
    string tiffFile$ = "c:/import/m_ulu_tm.tif";
    string rvcFile$ = "c:/import/temp_imp.rvc";
    string objectName$ = "imptiff";
    string objectDesc$ = "imported via SML";
    # set any optional parms
    tiffHandle.DoLink = 1;
    ImportRaster(tiffHandle, tiffFile$, rvcFile$, objectName$, objectDesc$);
    ###########################
    # Import an srtm *.hgt file
    ###########################
    class MieUSERDEFINEDRASTER srtm;
    # set filenames
    string importFile$ = "c:/import/N00W050.hgt";
    string rvcFile$ = "c:/import/temp_imp.rvc";
    string objectName$ = "srtmRaster";
    string objectDesc$ = "imported via SML";
    # set import parameters according to srtm specs
    srtm.NumLins = 1201;
    srtm.NumCols = 1201;
    srtm.DataType = "16-bit signed";
    srtm.ByteOrder = "High-Low";
    srtm.UseFile = 0;
    srtm.DoPyramid = 1;
    srtm.DoCompress = 1;
    ImportRaster(srtm, importFile$, rvcFile$, objectName$, objectDesc$);
    


    ImportTIN
    Import a TIN object. This function is being deprecated, but will continue to work for legacy purposes. Please use the ImportObject(s) method on the class MieHANDLE.

    ImportTIN(mieHandle, inputFilename$, rvcFile$, objectName$, objectDescription$)

    場所:

      インポート(入力)/エクスポート(出力)

    パラメータ:

      class MieTIN mieHandle
        TIN import parameters (must be filled in already)
      string inputFilename$
        File to import
      string rvcFile$
        RVC File to import into
      string objectName$
        Name of new TIN object
      string objectDescription$ (オプション)
        Description of new TIN object

    戻り値

      なし

    作成日時: 17-Mar-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Currently there are no TIN formats defined that TNTmips and SML
    # are able to import.  Thus there is no example for ImportTIN().
    


    ImportVector
    Import a Vector using class derived from MieVECTOR class. This function is being deprecated, but will continue to work for legacy purposes. Please use the ImportObject(s) method on the class MieHANDLE.

    ImportVector(mieHandle, inputFilename$, rvcFile$, objectName$, objectDescription$)

    場所:

      インポート(入力)/エクスポート(出力)

    パラメータ:

      class MieVECTOR mieHandle
        A class derived from MieVECTOR
      string inputFilename$
        File to import
      string rvcFile$
        RVC filename
      string objectName$
        Object name
      string objectDescription$ (オプション)
        Object description

    戻り値

      なし

    作成日時: 16-Mar-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of ImportVector()
    class MieMIFVector vHandle;
    string mifFile$ = "c:/contours.mif";
    string destRVCFile$ = "c:/test.rvc";
    string destObjectName$ = "ImpVectMIFF";
    string destObjectDesc$ = "imported via SML";
    # set vector parms
    vHandle.TableType = "Polygon";
    vHandle.ElementType = "Polygon";
    ImportVector(vHandle, mifFile$, destRVCFile$, destObjectName$, destObjectDesc$);
    


    BinaryRasterToRegion(Raster, georef)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Raster R;
    region reg;
    class REGION2D resultReg;
    GetInputRaster(R, 0, 0, "binary");
    resultReg = BinaryRasterToRegion(R);
    reg.Write(resultReg);
    


    ConvertCADToVector
    Convert a CAD object to vector

    ConvertCADToVector(CAD, Vector)

    場所:

      オブジェクトの変換

    パラメータ:

      CAD CAD
        The input CAD object
      Vector Vector
        The output vector object

    戻り値

      numeric
      An error value <0 if failed, 0 otherwise

    作成日時: 04-Jun-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    cad c;
    vector v;
    GetInputCAD(c);
    GetOutputVector(v);
    numeric err = ConvertCADToVector(c, v);
    print(err);
    


    ConvertRegionToVect
    Converts a Region to a Vector.

    ConvertRegionToVect(Region)

    場所:

      オブジェクトの変換

    パラメータ:

    戻り値

      Vector

    作成日時: 23-Jun-1999
    修正日時: 12-May-2004
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    region reg;
    vector V;
    GetInputRegion(reg);
    GetOutputVector(V);
    V = ConvertRegionToVect(reg.$Data);
    


    ConvertTINToVector
    Convert a TIN object to a Vector object

    ConvertTINToVector(InputTin, OutputVector)

    場所:

      オブジェクトの変換

    パラメータ:

      TIN InputTin
        The input TIN object to convert
      Vector OutputVector
        The output vector object

    戻り値

      numeric
      An error value <0 if failed, 0 otherwise

    作成日時: 12-May-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    tin TinIn;
    vector Vout1;
    GetInputTIN(TinIn);
    GetOutputVector(Vout1);
    numeric err = ConvertTINToVector(TinIn, Vout1);
    print (err);
    


    ConvertVectorPolysToRegion
    Converts selected Vector elements to a region.

    ConvertVectorPolysToRegion(Vector, georef, elementList, numberElements)

    場所:

      オブジェクトの変換

    パラメータ:

      Vector Vector
        A Vector object
      class GEOREF georef
        A georef object
      array elementList (オプション)
        A list of polygons to convert
      numeric numberElements (オプション)
        The number of elements in elementlist

    詳細と仮定

      If elementlist and numelements is not used then all polygons will be converted

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector Vin;
    class Georef georef;
    class REGION RegionOut;
    array numeric polygonList[10];
    polygonList[1] = 2;
    polygonList[2] = 4;
    numeric numberPolygons = 2;
    GetInputVector(Vin);
    georef = GetLastUsedGeorefObject(Vin);
    GetOutputRegion(RegionOut);
    RegionOut = ConvertVectorPolysToRegion(Vin, georef, polygonList, numberPolygons);
    


    ConvertVectorPolyToRegion
    Converts single polygon to a region.

    ConvertVectorPolyToRegion(Vector, polygonNumber, georef)

    場所:

      オブジェクトの変換

    パラメータ:

      Vector Vector
        Vector object
      numeric polygonNumber
        The polygon to convert
      class GEOREF georef (オプション)
        Georef object

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # convert single polygon to a region
    vector Vin;
    class REGION RegionOut;
    GetInputVector(Vin);
    GetOutputRegion(RegionOut);
    # convert first polygon
    RegionOut = ConvertVectorPolyToRegion(Vin, 1);
    


    ConvertVectToRegion
    Converts a Vector to a Region.

    ConvertVectToRegion(Vector)

    場所:

      オブジェクトの変換

    パラメータ:

      Vector Vector
        Vector object

    戻り値

    作成日時: 23-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector Vin;
    class Georef georef;
    class REGION RegionOut;
    GetInputVector(Vin);
    georef = GetLastUsedGeorefObject(Vin);
    GetOutputRegion(RegionOut);
    RegionOut = ConvertVectToRegion(Vin);
    


    RasterCompositeToHIS
    Convert a composite raster to Hue, Intensity, Saturation rasters.

    RasterCompositeToHIS(CompositeRaster, HueRaster, IntensityRaster, SaturationRaster, rvcFilename$, rgbDescription$)

    場所:

      オブジェクトの変換

    パラメータ:

      Raster CompositeRaster
        The input composite raster
      Raster HueRaster
        The output hue raster
      Raster IntensityRaster
        The output intensity raster
      Raster SaturationRaster
        The output saturation raster
      string rvcFilename$
        The output rvc filename
      string rgbDescription$
        The description for the HIS rasters

    戻り値

      なし

    作成日時: 14-Nov-2002
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Cin, H, I, S;
    GetInputRaster(Cin, 0, 0, "24-bit color RGB");
    string filename$ = Cin.$Info.Filename;
    RasterCompositeToHIS(Cin, H, I, S, filename$, "from _24BIT_RGB");
    


    RasterCompositeToRGB
    Convert 24 bit composite Raster to RGB

    RasterCompositeToRGB(CompositeRaster, RedRaster, GreenRaster, BlueRaster, rvcFilename$, rgbDescription$)

    場所:

      オブジェクトの変換

    パラメータ:

      Raster CompositeRaster
        Input Raster
      Raster RedRaster
        Red Raster created
      Raster GreenRaster
        Green Raster created
      Raster BlueRaster
        Blue Raster created
      string rvcFilename$
        RVC filename
      string rgbDescription$
        Descriptions for RGB Rasters

    戻り値

      なし

    作成日時: 13-May-1998
    修正日時: 19-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    RasterRGBToComposite
    Convert RGB Rasters to 24 bit composite

    RasterRGBToComposite(RedRaster, GreenRaster, BlueRaster, CompositeRaster, rvcFilename$, compositeName$, compositeDescription$, numberOfBits, useContrast)

    場所:

      オブジェクトの変換

    パラメータ:

      Raster RedRaster
        Red input Raster
      Raster GreenRaster
        Green input Raster
      Raster BlueRaster
        Blue input Raster
      Raster CompositeRaster
        Composite Raster created
      string rvcFilename$
        Output RVC file name
      string compositeName$
        Composite Raster file name
      string compositeDescription$
        Composite Raster description
      numeric numberOfBits (オプション)
        Number of bits in output Raster (defaults to 24)
      numeric useContrast (オプション)
        Use the contrast tables when creating the composite raster

    戻り値

      なし

    作成日時: 13-May-1998
    修正日時: 17-Jun-2004
    TNTsml for Windows で使用可能: はい

    例:

    raster RED, GREEN, BLUE;
    raster R, G, B, comp;
    GetInputRasters(RED, GREEN, BLUE);
    CreateTempRaster(R, NumLins(RED), NumCols(RED), "8-bit unsigned", 0);
    CreateTempRaster(G, NumLins(GREEN), NumCols(GREEN), "8-bit unsigned", 0);
    CreateTempRaster(B, NumLins(BLUE), NumCols(BLUE), "8-bit unsigned", 0);
    RasterApplyContrast2(RED,R,"Normalize");
    RasterApplyContrast2(GREEN,G,"Normalize");
    RasterApplyContrast2(BLUE,B,"Normalize");
    # create composite
    RasterRGBToComposite(R, G, B, comp, "c:\\temp\\output.rvc", "comp", "Composite 24-bit raster");
    CopySubobjects(RED, comp, "GEOREF");
    


    RasterToCADBound
    Convert Raster to Vector boundary.

    RasterToCADBound(RasterVar)

    場所:

      オブジェクトの変換

    パラメータ:

      Raster RasterVar
        Raster object

    戻り値

      CAD

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rin;
    cad Cout;
    GetInputRaster(Rin);
    GetOutputCAD(Cout);
    Cout = RasterToCADBound(Rin);
    


    RasterToCADLine
    Convert Raster to CAD lines.

    RasterToCADLine(RasterVar, thinfactor, flags)

    場所:

      オブジェクトの変換

    パラメータ:

      Raster RasterVar
        Raster object
      numeric thinfactor (オプション)
        Line thinning factor
      numeric flags (オプション)
        Set function to trace around 0 values or 1 values - defaults to 1

    戻り値

      CAD

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # example of RasterToCADLine()
    raster Rin;
    cad Cout;
    GetInputRaster(Rin);
    GetOutputCAD(Cout);
    numeric thinFactor = 1;
    numeric traceValue = 1;
    Cout = RasterToCADLine(Rin, thinFactor, traceValue);
    


    RasterToTINIterative
    Converts elevation raster to TIN object as contour lines

    RasterToTINIterative(inputRaster, zTolerance, maxNodes, zDelta, shortEdge, longEdge, flags$)

    場所:

      オブジェクトの変換

    パラメータ:

      Raster inputRaster
        The raster to convert
      numeric zTolerance
        Approximation accuracy
      numeric maxNodes
        Maximum number of nodes in output TIN
      numeric zDelta
        TIN optimization - elevation tolarance
      numeric shortEdge
        TIN optimization - min. edge length between two nodes that have elevation difference less than zDelta
      numeric longEdge
        TIN optimization - maximum allowed edge length
      string flags$ (オプション)
        Optional - any combination of the following are valid:
        0 default - no statistics or optimization
        1 ComputeStatistics - Computes standard statistics for triangles and edges
        2 Optimize - Does TIN optimization, (zDelta, shortEdge, longEdge values are used).
        可能性のある値:
          "ComputeStatistice"
            Compute standard statistics for triangles and edges
          "Optimize"
            Do TIN optimization

    詳細と仮定

      The flags may be set in combination - simply set flags to the sum of the values desired.

    戻り値

      TIN
      TIN object

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rin;
    tin Tout;
    # set up variables to hold flag values
    numeric flagDefault = 0, flagComputeStatistics = 1, flagDoTINOptimize = 2;
    GetInputRaster(Rin);
    GetOutputTIN(Tout);
    numeric range = GlobalMax(Rin) - GlobalMin(Rin);
    numeric zTolerance = range / 100, maxNodes = 1000, zDelta = 0;
    numeric shortEdge = 0, longEdge = 0;
    string flags = "";
    Tout = RasterToTINIterative(Rin, zTolerance, maxNodes, zDelta, shortEdge, longEdge, flags);
    CloseRaster(Rin);
    


    RasterToTINIterative2
    Converts elevation raster to TIN object as contour lines

    RasterToTINIterative2(destTIN, inputRaster, zTolerance, maxNodes, zDelta, shortEdge, longEdge, flags$)

    場所:

      オブジェクトの変換

    パラメータ:

      TIN destTIN
        The destination TIN variable
      Raster inputRaster
        The raster to convert
      numeric zTolerance
        Approximation accuracy
      numeric maxNodes
        Maximum number of nodes in output TIN
      numeric zDelta
        TIN optimization - elevation tolarance
      numeric shortEdge
        TIN optimization - min. edge length between two nodes that have elevation difference less than zDelta
      numeric longEdge
        TIN optimization - maximum allowed edge length
      string flags$ (オプション)
        Optional - any combination of the following are valid:
        0 default - no statistics or optimization
        1 ComputeStatistics - Computes standard statistics for triangles and edges
        2 Optimize - Does TIN optimization, (zDelta, shortEdge, longEdge values are used).
        可能性のある値:
          "ComputeStatistice"
            Compute standard statistics for triangles and edges
          "Optimize"
            Do TIN optimization

    詳細と仮定

      The flags may be set in combination - simply set flags to the sum of the values desired.

    戻り値

      numeric

    作成日時: 14-Jul-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    RasterToVectorBound
    Convert Raster to Vector boundary.

    RasterToVectorBound(RasterVar, flags$)

    場所:

      オブジェクトの変換

    パラメータ:

      Raster RasterVar
        Raster object
      string flags$ (オプション)
        Additional Flags
        可能性のある値:
          "ComputeStdAttrib"
            Compute standard attributes
          "NoCreateTable"
            Don't create cellvalue table
          "DoImpliedGeoref"
            Create implied georeference

    戻り値

      Vector

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterToVectorBound();
    raster Rin;
    vector Vout;
    GetInputRaster(Rin);
    GetOutputVector(Vout);
    string flag = "";
    Vout = RasterToVectorBound(Rin, flag);
    


    RasterToVectorContour
    Converts elevation raster to vector object as contour lines

    RasterToVectorContour(inputRaster, zInterval, zStart, zEnd, zScale, zOffset, sampleRate, resolution, filterSize, flags)

    場所:

      オブジェクトの変換

    パラメータ:

      Raster inputRaster
        The raster to convert
      numeric zInterval
        Z-interval between contour lines
      numeric zStart (オプション)
        Optional - start z-level for contouring default is read from input raster
      numeric zEnd (オプション)
        Optional - end z-level for contouring default is read from input raster
      numeric zScale (オプション)
        Optional - z-scale for output vector object default = 1.0
      numeric zOffset (オプション)
        Optional - z-offset for output vector object default = 0.0
      numeric sampleRate (オプション)
        Optional - raster sampling rate default = 1
      numeric resolution (オプション)
        Optional - resolution for bicubic interpolation, 2 <= resolution, real resolution in pixels = sampleRate/resolution default = 2
      numeric filterSize (オプション)
        Optional - size of smoothing filter, 1 or larger, used only if smoothing (4) flag is used default = 1
      any value flags (オプション)
        Optional - any of the following values are valid:
        0 default - linear scale, linear interpolation, no smoothing
        1 natural log scale for contours - else linear
        2 bicubic interpolation - else linear
        4 use smoothing - else no smoothing (used with filterSize)
        64 create a range elevation table
        可能性のある値:
          "LogScale"
            Use natural logarithmic scale
          "BiCubic"
            Use bicubic interpolation
          "ElevationRange"
            Create table with elevation ranges for each polygon
          "SmoothAverage"
            Use average smoothing

    詳細と仮定

      The flags may be set in combination - simply set flags to the sum of the values desired. Filter size is only used if smoothing flag is set.

    戻り値

      Vector
      Vector object.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # declare R and V variables
    raster Rin;
    vector Vout;
    # set up variables to hold flag values
    numeric flagDefault = 0, flagLogScale = 1;
    numeric flagBicubicInterpolate = 2, flagUseSmoothing = 4;
    GetInputRaster(Rin);
    GetOutputVector(Vout);
    numeric zStart, zEnd, range;
    zStart = GlobalMin(Rin); # set range to raster limits
    zEnd = GlobalMax(Rin);
    range = zEnd - zStart;
    numeric zInterval, zScale, zOffset;
    zInterval = range / 40; # set 40 contours
    zScale = 1;
    zOffset = 0;
    numeric sampleRate, resolution, filterSize;
    sampleRate = 1;
    resolution = 2;
    filterSize = 1;
    numeric flags = flagLogScale + flagUseSmoothing;
    clear();
    print(zStart, zEnd, zInterval, zScale, zOffset, sampleRate, resolution, filterSize, flags);
    Vout = RasterToVectorContour(Rin, zInterval, zStart, zEnd, zScale,
    zOffset, sampleRate, resolution, filterSize, flags);
    # alternate form - use defaults
    # Vout = RasterToVectorContour(Rin, zInterval);
    CloseRaster(Rin);
    


    RasterToVectorContour2
    Converts elevation raster to vector object as contour lines

    RasterToVectorContour2(destVect, inputRaster, zInterval, zStart, zEnd, zScale, zOffset, sampleRate, resolution, filterSize, flags$)

    場所:

      オブジェクトの変換

    パラメータ:

      Vector destVect
        The destination vector variable
      Raster inputRaster
        The raster to convert
      numeric zInterval
        Z-interval between contour lines
      numeric zStart (オプション)
        Optional - start z-level for contouring default is read from input raster
      numeric zEnd (オプション)
        Optional - end z-level for contouring default is read from input raster
      numeric zScale (オプション)
        Optional - z-scale for output vector object default = 1.0
      numeric zOffset (オプション)
        Optional - z-offset for output vector object default = 0.0
      numeric sampleRate (オプション)
        Optional - raster sampling rate default = 1
      numeric resolution (オプション)
        Optional - resolution for bicubic interpolation, 2 <= resolution, real resolution in pixels = sampleRate/resolution default = 2
      numeric filterSize (オプション)
        Optional - size of smoothing filter, 1 or larger, used only if smoothing (4) flag is used default = 1
      string flags$ (オプション)
        Optional - any of the following values are valid:
        0 default - linear scale, linear interpolation, no smoothing
        1 natural log scale for contours - else linear
        2 bicubic interpolation - else linear
        4 use smoothing - else no smoothing (used with filterSize)
        64 create a range elevation table
        可能性のある値:
          "LogScale"
            Use natural logarithmic scale
          "BiCubic"
            Use bicubic interpolation
          "ElevationRange"
            Create table with elevation ranges for each polygon
          "SmoothAverage"
            Use average smoothing

    詳細と仮定

      The flags may be set in combination - simply set flags to the sum of the values desired. Filter size is only used if smoothing flag is set.

    戻り値

      numeric

    作成日時: 14-Jul-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    RasterToVectorLine
    Convert Raster to Vector lines.

    RasterToVectorLine(RasterVar, thinfactor, flags)

    場所:

      オブジェクトの変換

    パラメータ:

      Raster RasterVar
        Raster object
      numeric thinfactor (オプション)
        Line thinning factor
      numeric flags (オプション)
        Set function to trace around 0 values or 1 values - defaults to 1

    戻り値

      Vector

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterToVectorLine()
    raster Rin;
    Vector Vout;
    GetInputRaster(Rin);
    GetOutputVector(Vout);
    numeric thinFactor = 1;
    numeric traceValue = 1;
    Vout = RasterToVectorLine(Rin, thinFactor, traceValue);
    


    TINToRaster
    Converts TIN object to Raster object

    TINToRaster(inTIN, outRaster, method, flags)

    場所:

      オブジェクトの変換

    パラメータ:

      TIN inTIN
        The TIN object to convert
      Raster outRaster
        The output Raster object created
      numeric method (オプション)
        Optional - conversion method, any of the following are valid:
        0 Linear (default)
        1 Quintic
      numeric flags (オプション)
        Optional - any combination of the following are valid:
        0 default
        1 Copy Georeference to Raster
        2 AutoScale Raster

    詳細と仮定

      The method and flags parameters are optional, but to use flags you must use method. The flags may be set in combination - simply set flags to the sum of the options desired. The method should be either 0 or 1.

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # set up variables to use for method and flags
    tin TinIn;
    raster Rout;
    numeric methodLinear = 0, methodQuintic = 1;
    numeric flagDefault = 0, flagCopyGeoref = 1, flagAutoscale = 2;
    # get the input and output objects
    GetInputTIN(TinIn);
    GetOutputRaster(Rout);
    numeric method = methodQuintic;
    numeric flags = flagCopyGeoref + flagAutoscale; # to do both
    TINToRaster(TinIn, Rout, method, flags);
    # other optional function calls
    # to use default method and flags
    # TINToRaster(TinIn, Rout)
    # to use default flags but set method
    # TINToRaster(TinIn, Rout, method)
    CloseRaster(Rout);
    


    TINToVectorContour
    Converts TIN object to vector object as contour lines

    TINToVectorContour(inTIN, zInterval, flags, zStart, zEnd, zScale, zOffset)

    場所:

      オブジェクトの変換

    パラメータ:

      TIN inTIN
        The raster to convert
      numeric zInterval
        Z-interval between contour lines
      numeric flags (オプション)
        Optional - flags - any of the following are valid
        0 default - linear scale
        1 natural log scale contour spacing - else linear
      numeric zStart (オプション)
        Optional - start z-level for contouring default - value read from the TIN object
      numeric zEnd (オプション)
        Optional - end z-level for contouring default - value read from the TIN object
      numeric zScale (オプション)
        Optional - z-scale for output vector object default - value read from the TIN object
      numeric zOffset (オプション)
        Optional - z-offset for output vector object default - value read from the TIN object

    詳細と仮定

      You may use the flags parameter without using zStart, zEnd, zScale, and zOffset. To use any of zStart, zEnd, zScale, or zOffset, you must include all of them. If not supplied, the values of zStart, zEnd, zScale, and zOffset will be read from the TIN object. Note that zStart will be adjusted so that the contour lines will be even multiples of zInterval. For example if zStart is 133 and zInterval is 20 then the contour lines will be adjusted to 140, 160, ... .

    戻り値

      Vector
      Vector object

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # set up variables to hold flag values
    tin TinIn;
    vector Vout1, Vout2, Vout3;
    numeric flagDefault = 0, flagLogScale = 1;
    GetInputTIN(TinIn);
    GetOutputVector(Vout1);
    print("calling TinToVectorContour for Vout1");
    numeric zInterval = 20;
    Vout1 = TINToVectorContour(TinIn, zInterval);
    print("Done with Vout1");
    GetOutputVector(Vout2);
    print("calling TinToVectorContour for Vout2");
    zInterval = 40;
    Vout2 = TINToVectorContour(TinIn, zInterval, flagDefault);
    print("Done with Vout1");
    GetOutputVector(Vout3);
    print("calling TinToVectorContour for Vout3");
    zInterval = 40;
    # set values that work for CB_ELEV/TIN_16
    numeric zStart = 1060, zEnd = 1360, zScale = 1, zOffset = 0;
    Vout3 = TINToVectorContour(TinIn, zInterval, flagLogScale, zInterval, zStart, zEnd, zScale);
    print("Done with Vout3");
    


    VectorElementToRaster
    Convert Vector element to a raster

    VectorElementToRaster(Vector, Raster, elementType$, elementNumber, rasterValue, VectorGeo, RasterGeo)

    場所:

      オブジェクトの変換

    パラメータ:

      Vector Vector
        Source Vector
      Raster Raster
        Destination Raster
      string elementType$
        Element type - point, line, polygon
        可能性のある値:
          "point"
            the element is a point
          "line"
            the element is a line
          "polygon"
            the element is an polygon
      numeric elementNumber
        The element to convert
      numeric rasterValue
        The Raster value to use
      class GEOREF VectorGeo
        Vector georeference
      class GEOREF RasterGeo
        Raster georeference

    戻り値

      なし

    作成日時: 29-Apr-1998
    修正日時: 10-Jun-1998
    TNTsml for Windows で使用可能: はい

    例:

    # example of VectorElementToRaster()
    vector V;
    raster R;
    class Georef vGeo, rGeo;
    GetInputVector(V);
    GetInputRaster(R);
    vGeo = GetLastUsedGeorefObject(V);
    rGeo = GetLastUsedGeorefObject(R);
    VectorElementToRaster(V, R, "polygon", 22,   0, vGeo, rGeo);
    VectorElementToRaster(V, R,    "line", 10, 128, vGeo, rGeo);
    CloseRaster(R);
    CloseVector(V);
    print("done");
    


    VectorToBufferZone
    Create buffer zone Vector from selected Vector elements of a given type, (or all elements of a given type).

    VectorToBufferZone(VectIn, elementtype$, distance, unit$, polyside$, elementlist, numelements)

    場所:

      オブジェクトの変換

    パラメータ:

      Vector VectIn
        The input Vector object
      string elementtype$
        Specifies the element type for the bufferzone operation
        可能性のある値:
          "point"
            Create buffer zone around points
          "line"
            Create buffer zone around lines
          "polygon"
            Create buffer zone around polygons
      numeric distance
        The distance to buffer
      string unit$ (オプション)
        The buffer distance units
      string polyside$ (オプション)
        Specifies how to handle buffering of polygons
        可能性のある値:
          "inside"
            Create buffer zone around inside of polygon (default)
          "outside"
            Create buffer zone around outside of polygon
      array elementlist (オプション)
        List of elements to operate on
      numeric numelements (オプション)
        Number of items in elementlist

    詳細と仮定

      If elementlist is not used the will buffer around all elements

    戻り値

      Vector

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector Vin, Vout;
    array numeric elementList[1000];
    GetInputVector(Vin);
    GetOutputVector(Vout);
    numeric numberLines = NumVectorLines(Vin);
    numeric i;
    for i = 1 to numberLines / 2 {
           elementList[i] = i;
           }
    Vout = VectorToBufferZone(Vin, "line", 50, "meters", "outside", elementList, numberLines / 2);
    


    VectorToBufferZoneExt
    Create buffer zone Vector from selected Vector elements of a given type, (or all elements of a given type) dumping the result to the output vector.

    VectorToBufferZoneExt(VectIn, VectOut, elementtype$, distance, unit$, polyside$, elementlist, numelements)

    場所:

      オブジェクトの変換

    パラメータ:

      Vector VectIn
        The input Vector object
      Vector VectOut
        The output Vector object
      string elementtype$
        Specifies the element type for the bufferzone operation
        可能性のある値:
          "point"
            Create buffer zone around points
          "line"
            Create buffer zone around lines
          "polygon"
            Create buffer zone around polygons
      numeric distance
        The distance to buffer
      string unit$ (オプション)
        The buffer distance units
      string polyside$ (オプション)
        Specifies how to handle buffering of polygons
        可能性のある値:
          "inside"
            Create buffer zone around inside of polygon
          "outside"
            Create buffer zone around outside of polygon
      array elementlist (オプション)
        List of elements to operate on
      numeric numelements (オプション)
        Number of items in elementlist

    戻り値

      numeric

    作成日時: 25-Feb-2002
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector Vin, Vout;
    array numeric elementList[1000];
    GetInputVector(Vin);
    GetOutputVector(Vout);
    numeric numberLines = NumVectorLines(Vin);
    numeric i;
    for i = 1 to numberLines / 2 {
           elementList[i] = i;
           }
    VectorToBufferZoneExt(Vin, Vout, "line", 50, "meters", "outside", elementList, numberLines / 2);
    


    MorphCompliment(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    場所:

    パラメータ:

      Raster Input
        Description
      Raster Output
        Description
      array element
        Description
      numeric rows
        Description
      numeric columns
        Description
      numeric upper_threshold (オプション)
        Description
      numeric lower_threshold (オプション)
        Description

    戻り値

      numeric

    作成日時: 21-Apr-1995
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    MorphCopy
    Morphological copy

    MorphCopy(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    場所:

      ラスタ地形学的処理

    パラメータ:

      Raster Input
        Description
      Raster Output
        Description
      array element
        Description
      numeric rows
        Description
      numeric columns
        Description
      numeric upper_threshold (オプション)
        Description
      numeric lower_threshold (オプション)
        Description

    戻り値

      numeric

    作成日時: 21-Apr-1995
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    MorphDifference
    Morphological difference

    MorphDifference(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    場所:

      ラスタ地形学的処理

    パラメータ:

      Raster Input
        Description
      Raster Output
        Description
      array element
        Description
      numeric rows
        Description
      numeric columns
        Description
      numeric upper_threshold (オプション)
        Description
      numeric lower_threshold (オプション)
        Description

    戻り値

      numeric

    作成日時: 21-Apr-1995
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    MorphDilation
    Enlarges shapes by expanding their boundaries, opposite of MorphErosion()

    MorphDilation(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    場所:

      ラスタ地形学的処理

    パラメータ:

      Raster Input
        Any valid raster variable, (8-bit or binary)
      Raster Output
        Any valid raster variable, (same type and
        dimensions as input)
      array element
        A numeric array that functions as the
        control structure
      numeric rows
        A number indicating number of rows in element
      numeric columns
        A number indicating number of columns in element
      numeric upper_threshold (オプション)
        Optional - a number indicating the maximum cell
        value, (gray scale only), that the morph function
        should be applied to
      numeric lower_threshold (オプション)
        Optional - a number indicating the minimum cell
        value, (gray scale only), that the morph function
        should be applied to

    詳細と仮定

      The element array must be defined elsewhere, see the
      Interpret volume for details on creating the morphological
      control array. The upper_limit and lower_limit variables only
      apply to grayscale rasters.
      The morphology functions are not fully implemented in this version
      of SML. This information is for future reference only.

    戻り値

      numeric

    作成日時: 21-Apr-1995
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    MorphErosion
    Shrinks shapes by expanding their boundaries, opposite of MorphDilation()

    MorphErosion(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    場所:

      ラスタ地形学的処理

    パラメータ:

      Raster Input
        Any valid raster variable, (8-bit or binary)
      Raster Output
        Any valid raster variable, (same type and
        dimensions as input)
      array element
        A numeric array that functions as the
        control structure
      numeric rows
        A number indicating number of rows in element
      numeric columns
        A number indicating number of columns in element
      numeric upper_threshold (オプション)
        Optional - a number indicating the maximum
        cell value, (grayscale only), that the
        morph function should be applied to
      numeric lower_threshold (オプション)
        Optional - a number indicating the minimum
        cell value, (grayscale only), that the
        morph function should be applied to

    詳細と仮定

      The element array must be defined elsewhere, see the
      Interpret volume for details on creating the morphological
      control array. The upper_limit and lower_limit variables only
      apply to gray scale rasters.
      The morphology functions are not fully implemented in this version
      of SML. This information is for future reference only.

    戻り値

      numeric

    作成日時: 21-Apr-1995
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    MorphIntersection
    Morphological intersection

    MorphIntersection(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    場所:

      ラスタ地形学的処理

    パラメータ:

      Raster Input
        Description
      Raster Output
        Description
      array element
        Description
      numeric rows
        Description
      numeric columns
        Description
      numeric upper_threshold (オプション)
        Description
      numeric lower_threshold (オプション)
        Description

    戻り値

      numeric

    作成日時: 21-Apr-1995
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    MorphTest
    Morphological test

    MorphTest(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    場所:

      ラスタ地形学的処理

    パラメータ:

      Raster Input
        Description
      Raster Output
        Description
      array element
        Description
      numeric rows
        Description
      numeric columns
        Description
      numeric upper_threshold (オプション)
        Description
      numeric lower_threshold (オプション)
        Description

    戻り値

      numeric

    作成日時: 21-Apr-1995
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    FocalFilter(Raster, filter, lin, col, scale)

    場所:

    パラメータ:

      Raster Raster
        A valid raster object to be filtered
      array filter
        An array holding a filter kernel (spatial filter coefficients)
      numeric lin (オプション)
        The center of the filter kernel (its focus) in the vertical direction
      numeric col (オプション)
        The center of the filter kernel in the horizontal direction
      numeric scale (オプション)
        A scale value applied to the result of the filter

    詳細と仮定

      If lin and col are used (specifying the kernel center), they must be used together.
      If they are not used, then the kernel must have an odd number of lines and columns
      so that there exists a true center for SML to assume.

    戻り値

      numeric
      a filtered raster of the same size and type as the source raster

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rin, Rout;
    GetInputRaster(Rin);
    numeric lines = NumLins(Rin);
    numeric columns = NumCols(Rin);
    string type$ = RastType(Rin);
    GetOutputRaster(Rout, lines, columns, type$);
    # create 3x3 low pass average filter
    numeric dim=3;
    array numeric f[dim,dim]; # all values are 0
    numeric r,c;
    for(r=1; r<=dim; r++)
    {
           for(c=1; c<=dim; c++)
           {
                  f[r,c] = 1;
           }
    }
    # 3x3 low pass ave filter
    # 1 1 1
    # 1 1 1
    # 1 1 1
    Rout=FocalFilter(Rin, f);
    CloseRaster(Rin);
    CloseRaster(Rout);
    


    FocalMajority
    Most frequently occurring value in focal area

    FocalMajority(Rast, numlins, numcols, lin, col, sample_size)

    場所:

      空間フィルタ

    パラメータ:

      Raster Rast
        A valid raster variable
      numeric numlins
        Number of lines in the focal area
      numeric numcols
        Number of columns in the focal area
      numeric lin (オプション)
        The line in Rast where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Rast where the focus of the focal area will be placed
      numeric sample_size (オプション)
        Optional - the (integer) sampling rate for the
        operation. The default is 1. Higher rates
        decrease the accuracy of the results, as they
        check only every nth raster element in each row.

    詳細と仮定

      The variables lines and columns must both be odd numbers to
      create a true center point. If centerLine and centerColumn
      are used, they must be used together, if not used, then
      the current raster cell is used. If rate is used, it
      must be preceded by centerLine and centerColumn. You may
      set centerLine and centerColumn to zero if not using them

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric lines = 5, columns = 7, ctrlin = 100, ctrcol = 100;
    # find majority when including every element in Rast
    # that is in the focal area, assuming that the center
    # of the focal area will be used as the focus of Rvar.
    numeric fm1 = FocalMajority(Rvar, lines, columns, ctrlin, ctrcol);
    # find majority when including the first, third, fifth,
    # etc. elements in each row of Rvar that are also in
    # the focal area.
    numeric fm2 = FocalMajority(Rvar, lines, columns, ctrlin, ctrcol, 2);
    print(fm1, fm2);
    CloseRaster(Rvar);
    


    FocalMax
    Largest value in focal area

    FocalMax(Rast, numlins, numcols, lin, col, sample_size)

    場所:

      空間フィルタ

    パラメータ:

      Raster Rast
        A valid raster variable
      numeric numlins
        Number of lines in the focal area
      numeric numcols
        Number of columns in the focal area
      numeric lin (オプション)
        The line in Rast where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Rast where the focus of the focal area will be placed
      numeric sample_size (オプション)
        Optional - the (integer) sampling rate for the
        operation. The default is 1. Higher rates
        decrease the accuracy of the results, as they
        check only every nth raster element in each row.

    詳細と仮定

      The variables lines and columns must both be odd numbers to
      create a true center point. If centerLine and centerColumn
      are used, they must be used together, if not used, then
      the current raster cell is used. If rate is used, it
      must be preceded by centerLine and centerColumn. You may
      set centerLine and centerColumn to zero if not using them

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric lines = 5, columns = 7, ctrlin = 100, ctrcol = 100;
    # find maximum when including every element in Rast
    # that is in the focal area, assuming that the center
    # of the focal area will be used as the focus of Rvar.
    numeric fm1 = FocalMax(Rvar, lines, columns, ctrlin, ctrcol);
    # find maximum when including the first, third, fifth,
    # etc. elements in each row of Rvar that are also in
    # the focal area.
    numeric fm2 = FocalMax(Rvar, lines, columns, ctrlin, ctrcol, 2);
    print(fm1, fm2);
    


    FocalMean
    Average of cell values in focal area

    FocalMean(Rast, numlins, numcols, lin, col, sample_size)

    場所:

      空間フィルタ

    パラメータ:

      Raster Rast
        A valid raster variable
      numeric numlins
        Number of lines in the focal area
      numeric numcols
        Number of columns in the focal area
      numeric lin (オプション)
        The line in Rast where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Rast where the focus of the focal area will be placed
      numeric sample_size (オプション)
        Optional - the (integer) sampling rate for the
        operation. The default is 1. Higher rates
        decrease the accuracy of the results, as they
        check only every nth raster element in each row.

    詳細と仮定

      The variables lines and columns must both be odd numbers to
      create a true center point. If centerLine and centerColumn
      are used, they must be used together, if not used, then
      the current raster cell is used. If rate is used, it
      must be preceded by centerLine and centerColumn. You may
      set centerLine and centerColumn to zero if not using them

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric lines = 5, columns = 7, ctrlin = 100, ctrcol = 100;
    # find average when including every element in Rast
    # that is in the focal area, assuming that the center of the focal
    # area will be used as the focus of Rvar.
    numeric fm1 = FocalMean(Rvar, lines, columns, ctrlin, ctrcol);
    # find average when including the first, third, fifth,
    # etc. elements in each row of Rvar that are also in
    # the focal area.
    numeric fm2 = FocalMean(Rvar, lines, columns, ctrlin, ctrcol, 2);
    print(fm1, fm2);
    


    FocalMedian
    Median - (middle element of sorted list) of values in focal area

    FocalMedian(Rast, numlins, numcols, lin, col, sample_size)

    場所:

      空間フィルタ

    パラメータ:

      Raster Rast
        A valid raster variable
      numeric numlins
        Of lines in the focal area
      numeric numcols
        Number of columns in the focal area
      numeric lin (オプション)
        The line in Rast where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Rast where the focus of the focal area will be placed
      numeric sample_size (オプション)
        Optional - the (integer) sampling rate for the
        operation. The default is 1. Higher rates
        decrease the accuracy of the results, as they
        check only every nth raster element in each row.

    詳細と仮定

      The variables lines and columns must both be odd numbers to
      create a true center point. If centerLine and centerColumn
      are used, they must be used together, if not used, then
      the current raster cell is used. If rate is used, it
      must be preceded by centerLine and centerColumn. You may
      set centerLine and centerColumn to zero if not using them

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric lines = 5, columns = 7, ctrlin = 100, ctrcol = 100;
    # find median when including every element in Rast that
    # is in the focal area, assuming that the center of the
    # focal area will be used as the focus of Rvar.
    numeric fm1 = FocalMedian(Rvar, lines, columns, ctrlin, ctrcol);
    # find median when including the first, third, fifth,
    # etc. elements in each row of Rvar that are also in
    # the focal area.
    numeric fm2 = FocalMedian(Rvar, lines, columns, ctrlin, ctrcol, 2);
    print(fm1, fm2);
    CloseRaster(Rvar);
    


    FocalMin
    Smallest value in focal area

    FocalMin(Rast, numlins, numcols, lin, col, sample_size)

    場所:

      空間フィルタ

    パラメータ:

      Raster Rast
        A valid raster variable
      numeric numlins
        Number of lines in the focal area
      numeric numcols
        Number of columns in the focal area
      numeric lin (オプション)
        The line in Rast where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Rast where the focus of the focal area will be placed
      numeric sample_size (オプション)
        Optional - the (integer) sampling rate for the
        operation. The default is 1. Higher rates
        decrease the accuracy of the results, as they
        check only every nth raster element in each row.

    詳細と仮定

      The variables lines and columns must both be odd numbers to
      create a true center point. If centerLine and centerColumn
      are used, they must be used together, if not used, then
      the current raster cell is used. If rate is used, it
      must be preceded by centerLine and centerColumn. You may
      set centerLine and centerColumn to zero if not using them

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric lines = 5, columns = 7, ctrlin = 100, ctrcol = 100;
    # find minimum when including every element in Rast
    # that is in the focal area, assuming that the center
    # of the focal area will be used as the focus of Rvar.
    numeric fm1 = FocalMin(Rvar, lines, columns, ctrlin, ctrcol);
    # find minimum when including the first, third, fifth,
    # etc. elements in each row of Rvar that are also in
    # the focal area.
    numeric fm2 = FocalMin(Rvar, lines, columns, ctrlin, ctrcol, 2);
    print(fm1, fm2);
    CloseRaster(Rvar);
    


    FocalMinority
    Least frequently occurring cell value in focal area

    FocalMinority(Rast, numlins, numcols, lin, col, sample_size)

    場所:

      空間フィルタ

    パラメータ:

      Raster Rast
        A valid raster variable
      numeric numlins
        Number of lines in the focal area
      numeric numcols
        Number of columns in the focal area
      numeric lin (オプション)
        The line in Rast where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Rast where the focus of the focal area will be placed
      numeric sample_size (オプション)
        Optional - the (integer) sampling rate for the
        operation. The default is 1. Higher rates
        decrease the accuracy of the results, as they
        check only every nth raster element in each row.

    詳細と仮定

      The variables lines and columns must both be odd numbers to
      create a true center point. If centerLine and centerColumn
      are used, they must be used together; if not used, then
      the current raster cell is used. If rate is used, it
      must be preceded by centerLine and centerColumn. You may
      set centerLine and centerColumn to zero if not using them

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric lines = 5, columns = 7, ctrlin = 100, ctrcol = 100;
    # find minority when including every element in Rast
    # that is in the focal area, assuming that the center
    # of the focal area will be used as the focus of Rvar.
    numeric fm1 = FocalMinority(Rvar, lines, columns, ctrlin, ctrcol);
    # find minority when including the first, third, fifth,
    # etc. elements in each row of Rvar that are also in
    # the focal area.
    numeric fm2 = FocalMinority(Rvar, lines, columns, ctrlin, ctrcol, 2);
    print(fm1, fm2);
    CloseRaster(Rvar);
    


    FocalSD
    Standard deviation of values in focal area

    FocalSD(Rast, numlins, numcols, lin, col, sample_size)

    場所:

      空間フィルタ

    パラメータ:

      Raster Rast
        A valid raster variable
      numeric numlins
        Number of lines in the focal area
      numeric numcols
        Number of columns in the focal area
      numeric lin (オプション)
        The line in Rast where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Rast where the focus of the focal area will be placed
      numeric sample_size (オプション)
        Optional - the (integer) sampling rate for the
        operation. The default is 1. Higher rates
        decrease the accuracy of the results, as they
        check only every nth raster element in each row.

    詳細と仮定

      The variables lines and columns must both be odd numbers to
      create a true center point. If centerLine and centerColumn
      are used, they must be used together, if not used, then
      the current raster cell is used. If rate is used, it
      must be preceded by centerLine and centerColumn. You may
      set centerLine and centerColumn to zero if not using them

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric lines = 5, columns = 7, ctrlin = 100, ctrcol = 100;
    # find Standard Deviation when including every element in Rast
    # that is in the focal area, assuming that the center # of the
    # focal area will be used as the focus of Rvar.
    numeric fm1 = FocalSD(Rvar, lines, columns, ctrlin, ctrcol);
    # find Standard Deviation when including the first,
    # third, fifth, etc., elements in each row of Rvar that
    # are also in the focal area.
    numeric fm2 = FocalSD(Rvar, lines, columns, ctrlin, ctrcol, 2);
    print(fm1, fm2);
    CloseRaster(Rvar);
    


    FocalSlope
    Slope of elevation surface at focus of focal area

    FocalSlope(Raster, lin, col)

    場所:

      空間フィルタ

    パラメータ:

      Raster Raster
        A valid raster variable
      numeric lin (オプション)
        The line in Raster where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Raster where the focus of the focal area will be placed

    戻り値

      numeric
      atan(sqrt(dx^2 + dy^2))
      where dx and dy are average change in elevation over a two

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric ctrlin = 100, ctrcol = 100;
    # find slope when including every element in Raster that
    # is in the focal area, assuming that the center of the
    # focal area will be used as the focus of Rvar.
    numeric slope = FocalSlope(Rvar, ctrlin, ctrcol);
    


    FocalSum
    Sum of values in focal area

    FocalSum(Rast, numlins, numcols, lin, col, sample_size)

    場所:

      空間フィルタ

    パラメータ:

      Raster Rast
        A valid raster variable
      numeric numlins
        Number of lines in the focal area
      numeric numcols
        Number of columns in the focal area
      numeric lin (オプション)
        The line in Rast where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Rast where the focus of the focal area will be placed
      numeric sample_size (オプション)
        Optional - the (integer) sampling rate for the
        operation. The default is 1. Higher rates
        decrease the accuracy of the results, as they
        check only every nth raster element in each row.

    詳細と仮定

      The variables lines and columns must both be odd numbers to
      create a true center point. If centerLine and centerColumn
      are used, they must be used together, if not used, then
      the current raster cell is used. If rate is used, it
      must be preceded by centerLine and centerColumn. You may
      set centerLine and centerColumn to zero if not using them

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric lines = 5, columns = 7, ctrlin = 100, ctrcol = 100;
    # find SUM when including every element in Rast that is
    # in the focal area, assuming that the center of the
    # focal area will be used as the focus of Rvar.
    numeric fm1 = FocalSum(Rvar, lines, columns, ctrlin, ctrcol);
    # find SUM when including the first, third, fifth, etc.
    # elements in each row of Rvar that are also in the focal area.
    numeric fm2 = FocalSum(Rvar, lines, columns, ctrlin, ctrcol, 2);
    print(fm1, fm2);
    CloseRaster(Rvar);
    


    FocalVariance
    Statistical variance of cell values in focal area

    FocalVariance(Rast, numlins, numcols, lin, col, sample_size)

    場所:

      空間フィルタ

    パラメータ:

      Raster Rast
        A valid raster variable
      numeric numlins
        Number of lines in the focal area
      numeric numcols
        Number of columns in the focal area
      numeric lin (オプション)
        The line in Rast where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Rast where the focus of the focal area will be placed
      numeric sample_size (オプション)
        Optional - the (integer) sampling rate for the
        operation. The default is 1. Higher rates
        decrease the accuracy of the results, as they
        check only every nth raster element in each row.

    詳細と仮定

      The variables lines and columns must both be odd numbers to
      create a true center point. If centerLine and centerColumn
      are used, they must be used together, if not used, then
      the current raster cell is used. If rate is used, it
      must be preceded by centerLine and centerColumn. You may
      set centerLine and centerColumn to zero if not using them

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric lines = 5, columns = 7, ctrlin = 100, ctrcol = 100;
    # find variance when including every element in Rast
    # that is in the focal area, assuming that the center
    # of the focal area will be used as the focus of Rvar.
    numeric fm1 = FocalVariance(Rvar, lines, columns, ctrlin, ctrcol);
    # find variance when including the first, third, fifth,
    # etc. elements in each row of Rvar that are also in
    # the focal area.
    numeric fm2 = FocalVariance(Rvar, lines, columns, ctrlin, ctrcol, 2);
    print(fm1, fm2);
    CloseRaster(Rvar);
    


    FocalVariety
    Number of different cell values in focal area

    FocalVariety(Rast, numlins, numcols, lin, col, sample_size)

    場所:

      空間フィルタ

    パラメータ:

      Raster Rast
        A valid raster variable
      numeric numlins
        Number of lines in the focal area
      numeric numcols
        Number of columns in the focal area
      numeric lin (オプション)
        The line in Rast where the focus of the focal area will be placed
      numeric col (オプション)
        The column in Rast where the focus of the focal area will be placed
      numeric sample_size (オプション)
        Optional - the (integer) sampling rate for the
        operation. The default is 1. Higher rates
        decrease the accuracy of the results, as they
        check only every nth raster element in each row.

    詳細と仮定

      The variables lines and columns must both be odd numbers to
      create a true center point. If centerLine and centerColumn
      are used, they must be used together, if not used, then
      the current raster cell is used. If rate is used, it
      must be preceded by centerLine and centerColumn. You may
      set centerLine and centerColumn to zero if not using them

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rvar;
    GetInputRaster(Rvar);
    numeric lines = 5, columns = 7, ctrlin = 100, ctrcol = 100;
    # find variety when including every element in Rast
    # that is in the focal area, assuming that the center
    # of the focal area will be used as the focus of Rvar.
    numeric fm1 = FocalVariety(Rvar, lines, columns, ctrlin, ctrcol);
    # find variety when including the first, third, fifth,
    # etc. elements in each row of Rvar that are also in
    # the focal area.
    numeric fm2 = FocalVariety(Rvar, lines, columns, ctrlin, ctrcol, 2);
    print(fm1, fm2);
    CloseRaster(Rvar);
    


    GlobalMax(Raster)

    場所:

    パラメータ:

      Raster Raster
        A valid raster object

    戻り値

      numeric
      a number of the same type that the raster uses

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric gmax=GlobalMax(R);
    print(gmax);
    CloseRaster(R);
    


    GlobalMean
    Average of cell values in raster object

    GlobalMean(Raster)

    場所:

      ラスタグローバル

    パラメータ:

      Raster Raster
        A valid raster object

    戻り値

      numeric
      a number of the same type that the raster uses

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric gmean=GlobalMean(R);
    print(gmean);
    CloseRaster(R);
    


    GlobalMedian
    The median cell value in the raster object

    GlobalMedian(Raster)

    場所:

      ラスタグローバル

    パラメータ:

      Raster Raster
        A valid raster object

    戻り値

      numeric
      a number of the same type that the raster uses

    作成日時: 09-Feb-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric gmedian=GlobalMedian(R);
    print(gmedian);
    CloseRaster(R);
    


    GlobalMin
    Smallest value in entire raster

    GlobalMin(Raster)

    場所:

      ラスタグローバル

    パラメータ:

      Raster Raster
        A valid raster object

    戻り値

      numeric
      a number of the same type that the raster uses

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric gmin=GlobalMin(R);
    print(gmin);
    CloseRaster(R);
    


    GlobalMode
    The cell value occurring most often in the raster object

    GlobalMode(Raster)

    場所:

      ラスタグローバル

    パラメータ:

      Raster Raster
        A valid raster object

    戻り値

      numeric
      a number of the same type that the raster uses

    作成日時: 09-Feb-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric gmode=GlobalMode(R);
    print(gmode);
    CloseRaster(R);
    


    GlobalMost
    The number of times the GlobalMode value occurs in the raster

    GlobalMost(Raster)

    場所:

      ラスタグローバル

    パラメータ:

      Raster Raster
        A valid raster object

    戻り値

      numeric
      an integer (0-2^numbits)

    作成日時: 09-Feb-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric gmost=GlobalMost(R);
    print(gmost);
    CloseRaster(R);
    


    GlobalSD
    Standard deviation of values in raster object

    GlobalSD(Raster)

    場所:

      ラスタグローバル

    パラメータ:

      Raster Raster
        A valid raster object

    戻り値

      numeric
      a number of the same type that the raster uses

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric gsd=GlobalSD(R);
    print(gsd);
    CloseRaster(R);
    


    GlobalSum
    Sum of values in raster object

    GlobalSum(Raster)

    場所:

      ラスタグローバル

    パラメータ:

      Raster Raster
        A valid raster object

    戻り値

      numeric
      a number of the same type that the raster uses

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric gsum=GlobalSum(R);
    print(gsum);
    CloseRaster(R);
    


    GlobalVariance
    Statistical variance of cell values in raster object

    GlobalVariance(Raster)

    場所:

      ラスタグローバル

    パラメータ:

      Raster Raster
        A valid raster object

    戻り値

      numeric
      a number of the same type that the raster uses

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    GetInputRaster(R);
    numeric gvar=GlobalVariance(R);
    print(gvar);
    CloseRaster(R);
    


    ClosestPointOnLine(Vector, linenumber, x, y, x return, y return)

    場所:

    パラメータ:

      Vector Vector
        Vector containing the line.
      numeric linenumber
        The line number.
      numeric x
        X coordinate of the point.
      numeric y
        Y coordinate of the point.
      numeric variable x return
        X coordinate of returned point
      numeric variable y return
        Y coordinate of returned point

    戻り値

      なし
      an x and y coordinate

    作成日時: 07-Jul-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/network.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorAddLabel
    Add a label to a vector object

    VectorAddLabel(Vector, labeltext$, height, basex1, basey1, basex2, basey2, basez1, basez2)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      string labeltext$
        Text of the label
      numeric height
        Height of the text
      numeric basex1
        X coordinate of first baseline point
      numeric basey1
        Y coordinate of first baseline point
      numeric basex2
        X coordinate of second baseline point
      numeric basey2
        Y coordinate of second baseline point
      numeric basez1 (オプション)
        Z coordinate of first baseline point
      numeric basez2 (オプション)
        Z coordinate of second baseline point

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric labelList[10];
    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    string label$ = "abcdEFG";
    numeric height = 20, x1 = 20, y1 = 10, x2 = 40, y2 = 10;
    numeric numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    # add 4 labels
    numeric i;
    for i = 1 to 4 {
           VectorAddLabel(V, label$, height, x1, y1, x2, y2);
           y1 += 25;
           y2 += 25;
           height /= 2;
           }
    numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    VectorDeleteLabel(V, 1);
    numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    labelList[1] = 1;
    labelList[2] = 2;
    VectorDeleteLabels(V, labelList, 2);
    numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    


    VectorAddLine
    Adds a multiple vertex line to a vector object

    VectorAddLine(Vector, numPoints, xPoints, yPoints, zPoints)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric numPoints
        Number of points in the line
      array xPoints
        One dimensional array of x coordinates
      array yPoints
        One dimensional array of y coordinates
      array zPoints (オプション)
        Optional - one dimensional array of z coordinates

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric xPoints[10], yPoints[10], lineList[10];
    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    #initialize some points for our line
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 50;
    yPoints[2] = 45;
    xPoints[3] = 75;
    yPoints[3] = 80;
    xPoints[4] = 100;
    yPoints[4] = 100;
    # add 4 lines - each with four points
    numeric i, j;
    for i = 1 to 4 {
           VectorAddLine(V, 4, xPoints, yPoints);
           # change the points to make a different line
           for j = 1 to 4 {
                  xPoints[j] = xPoints[j] + 200;
                  yPoints[j] = yPoints[j] + 20;
                  }
           }
           
    numeric numLines = NumVectorLines(V);
    print("number of Lines: ", numLines);
    VectorDeleteLine(V, 1);
    numLines = NumVectorLines(V);
    print("number of Lines: ", numLines);
    lineList[1] = 1;
    lineList[2] = 2;
    VectorDeleteLines(V, lineList, 2);
    numLines = NumVectorLines(V);
    print("number of Lines: ", numLines);
    


    VectorAddNode
    Adds a node to a vector object

    VectorAddNode(Vector, x, y, searchDistance, z)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric variable x
        X coordinate of node
      numeric variable y
        Y coordinate of node
      numeric searchDistance
        Maximum distance to search for line to split
      numeric variable z (オプション)
        Optional - z coordinate of node

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    array numeric xPoints[10], yPoints[10], nodeList[10];
    clear();
    GetOutputVector(V, "VectorToolkit");
    #initialize some points for our polygon box
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 70;
    yPoints[2] = 70;
    xPoints[3] = 90;
    yPoints[3] = 100;
    xPoints[4] = 130;
    yPoints[4] = 120;
    # create a line
    numeric numberPoints = 4;
    VectorAddLine(V, numberPoints, xPoints, yPoints);
    # create a second line
    numberPoints = 4;
    numeric i;
    for i = 1 to 5 {
           xPoints[i] = xPoints[i] + 200;
           }
    VectorAddLine(V, numberPoints, xPoints, yPoints);
    # now add a some nodes to the first line
    numeric x = 10;
    numeric y = 10;
    numeric searchDistance = 10;
    for i = 1 to 4 {
           VectorAddNode(V, x, y, searchDistance);
           print("node added at x, y: ", x, y);
           x = x + 10;
           y = y + 10;
           }
    # now add a some nodes to the second line
    x = 210;
    y = 10;
    searchDistance = 10;
    for i = 1 to 4 {
           VectorAddNode(V, x, y, searchDistance);
           print("node added at x, y: ", x, y);
           x = x + 10;
           y = y + 10;
           }
    # now delete a single node from the first line
    numeric node1 = FindClosestNode(V, 10, 10);
    VectorDeleteNode(V, node1);
    print("node", node1, "at x, y", 10, 10, "will be deleted");
    # now delete multiple nodes from the first line
    x = 20;
    y = 20;
    searchDistance = 10;
    for i = 1 to 3 {
           nodeList[i] = FindClosestNode(V, x, y);
           print("node", nodeList[i], "at x, y", x, y, "will be deleted");
           x = x + 10;
           y = y + 10;
           }
    numeric numNodes = 3;
    VectorDeleteNodes(V, nodeList, numNodes);
    


    VectorAddPoint
    Adds a point to a vector object

    VectorAddPoint(Vector, x, y, z)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric x
        X coordinate of point
      numeric y
        Y coordinate of point
      numeric z (オプション)
        Optional - z coordinate of point

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    array numeric xPoints[10], yPoints[10], pointList[10];
    vector V;
    GetOutputVector(V, "VectorToolkit");
    #initialize some points
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 100;
    yPoints[2] = 0;
    xPoints[3] = 100;
    yPoints[3] = 100;
    xPoints[4] = 0;
    yPoints[4] = 100;
    # add 4 points
    numeric i;
    for i = 1 to 4 {
           VectorAddPoint(V, xPoints[i], yPoints[i]);
           }
           
    numeric numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    VectorDeletePoint(V, 1);
    numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    pointList[1] = 1;
    pointList[2] = 2;
    VectorDeletePoints(V, pointList, 2);
    numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    


    VectorAddPolyLine
    Add a vector line/polygon from the given polyline

    VectorAddPolyLine(Vector, polyline)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      class polyline
        The polyline of coordinate points

    戻り値

      なし

    作成日時: 27-May-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorAddTwoPointLine
    Adds a line with only two vertices to a vector object

    VectorAddTwoPointLine(Vector, x1, y1, x2, y2, z1, z2)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric x1
        X coordinate of first point
      numeric y1
        Y coordinate of first point
      numeric x2
        X coordinate of second point
      numeric y2
        Y coordinate of second point
      numeric z1 (オプション)
        Optional - z coordinate of first point
      numeric z2 (オプション)
        Optional - z coordinate of second point

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    numeric numLines = NumVectorLines(V);
    print("number of lines: ", numLines);
    # add two lines
    VectorAddTwoPointLine(V, 0, 0, 25, 25);
    VectorAddTwoPointLine(V, 50, 5, 100, 90);
    numLines = NumVectorLines(V);
    print("number of lines: ", numLines);
    


    VectorChangeLine
    Changes the vertices of an existing line in a vector object

    VectorChangeLine(Vector, linenumber, numpoints, xPoints, yPoints, zPoints)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric linenumber
        The line to change
      numeric numpoints
        Number of points in xpoints and ypoints
      array xPoints
        Array holding x coordinates of new line points
      array yPoints
        Array holding y coordinates of new line points
      array zPoints (オプション)
        Optional - array holding z coordinates of new line points

    詳細と仮定

      The vector object exists.

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    array numeric xPoints[10], yPoints[10];
    clear();
    # set up new points for line change
    xPoints[1] = 10;
    yPoints[1] = 10;
    xPoints[2] = 40;
    yPoints[2] = 30;
    xPoints[3] = 70;
    yPoints[3] = 90;
    xPoints[4] = 125;
    yPoints[4] = 115;
    numeric numberPoints = 4;
    GetOutputVector(V, "VectorToolkit");
    # add a line
    VectorAddLine(V, numberPoints, xPoints, yPoints);
    # now change a middle point
    xPoints[2] = 50;
    yPoints[2] = 45;
    numeric lineNum = 1;
    VectorChangeLine(V, lineNum, numberPoints, xPoints, yPoints);
    


    VectorChangeNode
    Changes the location of an existing node in a vector object

    VectorChangeNode(Vector, nodenumber, newPoint)

    場所:

      ベクタツールキット

    パラメータ:

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 30-Apr-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    class POINT3D pt;
    GetOutputVector(V, "VectorTookit");
    pt.x = 200;
    pt.y = 470;
    pt.z = 0;
    VectorChangeNode(V, 4, pt);    # move node number 4
    


    VectorChangePoint
    Changes the location of an existing point in a vector object

    VectorChangePoint(Vector, point, newX, newY, newZ)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric point
        The point to change
      numeric newX
        New x coordinate of point
      numeric newY
        New y coordinate of point
      numeric newZ (オプション)
        Optional - new z coordinate of point

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    array numeric xPoints[10], yPoints[10];
    vector V;
    GetOutputVector(V, "VectorToolkit");
    numeric numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    # add some points
    VectorAddPoint(V, 10, 10);
    VectorAddPoint(V, 35, 35);
    VectorAddPoint(V, 50, 50);
    numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    # now change the second point
    numeric pointNum = 2;
    VectorChangePoint(V, pointNum, 25, 25);
    


    VectorDeleteDangleLines
    Delete dangling lines.

    VectorDeleteDangleLines(Vector, maxlength)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric maxlength
        The maximum length of line to delete

    戻り値

      numeric

    作成日時: 05-Oct-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);
    VectorToolkitInit(V);
    print(VectorDeleteDangleLines(V, 10));
    


    VectorDeleteLabel
    Deletes a label from a vector object

    VectorDeleteLabel(Vector, labelnumber)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric labelnumber
        The label to delete

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric labelList[10];
    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    string label$ = "abcdEFG";
    numeric height = 20, x1 = 20, y1 = 10, x2 = 40, y2 = 10;
    numeric numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    # add 4 labels
    numeric i;
    for i = 1 to 4 {
           VectorAddLabel(V, label$, height, x1, y1, x2, y2);
           y1 += 25;
           y2 += 25;
           height /= 2;
           }
    numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    VectorDeleteLabel(V, 1);
    numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    labelList[1] = 1;
    labelList[2] = 2;
    VectorDeleteLabels(V, labelList, 2);
    numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    


    VectorDeleteLabels
    Deletes multiple labels from a vector object

    VectorDeleteLabels(Vector, labellist, numlabels)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      array labellist
        Array containing list of labels to delete
      numeric numlabels
        Number of labels in labellist

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric labelList[10];
    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    string label$ = "abcdEFG";
    numeric height = 20, x1 = 20, y1 = 10, x2 = 40, y2 = 10;
    numeric numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    # add 4 labels
    numeric i;
    for i = 1 to 4 {
           VectorAddLabel(V, label$, height, x1, y1, x2, y2);
           y1 += 25;
           y2 += 25;
           height /= 2;
           }
    numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    VectorDeleteLabel(V, 1);
    numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    labelList[1] = 1;
    labelList[2] = 2;
    VectorDeleteLabels(V, labelList, 2);
    numLabels = NumVectorLabels(V);
    print("number of labels: ", numLabels);
    


    VectorDeleteLine
    Deletes a line from a vector object

    VectorDeleteLine(Vector, linenumber)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric linenumber
        The line to delete

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric xPoints[10], yPoints[10], lineList[10];
    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    #initialize some points for our line
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 50;
    yPoints[2] = 45;
    xPoints[3] = 75;
    yPoints[3] = 80;
    xPoints[4] = 100;
    yPoints[4] = 100;
    # add 4 lines - each with four points
    numeric i, j;
    for i = 1 to 4 {
           VectorAddLine(V, 4, xPoints, yPoints);
           # change the points to make a different line
           for j = 1 to 4 {
                  xPoints[j] = xPoints[j] + 200;
                  yPoints[j] = yPoints[j] + 20;
                  }
           }
           
    numeric numLines = NumVectorLines(V);
    print("number of Lines: ", numLines);
    VectorDeleteLine(V, 1);
    numLines = NumVectorLines(V);
    print("number of Lines: ", numLines);
    lineList[1] = 1;
    lineList[2] = 2;
    VectorDeleteLines(V, lineList, 2);
    numLines = NumVectorLines(V);
    print("number of Lines: ", numLines);
    


    VectorDeleteLines
    Deletes mutiple lines from a vector object

    VectorDeleteLines(Vector, lineslist, numlines)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      array lineslist
        Array containing list of lines to delete
      numeric numlines
        Number of lines in lineslist

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric xPoints[10], yPoints[10], lineList[10];
    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    #initialize some points for our line
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 50;
    yPoints[2] = 45;
    xPoints[3] = 75;
    yPoints[3] = 80;
    xPoints[4] = 100;
    yPoints[4] = 100;
    # add 4 lines - each with four points
    numeric i, j;
    for i = 1 to 4 {
           VectorAddLine(V, 4, xPoints, yPoints);
           # change the points to make a different line
           for j = 1 to 4 {
                  xPoints[j] = xPoints[j] + 200;
                  yPoints[j] = yPoints[j] + 20;
                  }
           }
           
    numeric numLines = NumVectorLines(V);
    print("number of Lines: ", numLines);
    VectorDeleteLine(V, 1);
    numLines = NumVectorLines(V);
    print("number of Lines: ", numLines);
    lineList[1] = 1;
    lineList[2] = 2;
    VectorDeleteLines(V, lineList, 2);
    numLines = NumVectorLines(V);
    print("number of Lines: ", numLines);
    


    VectorDeleteNode
    Deletes a node from a vector object

    VectorDeleteNode(Vector, nodenumber, flag$)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric nodenumber
        The node to delete
      string flag$ (オプション)
        See below
        可能性のある値:
          "NoCheckHyper"
            Do not check differences between hyperlinks
          "NoCheckDatabase"
            Do not check differences between database attachments

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    array numeric xPoints[10], yPoints[10], nodeList[10];
    clear();
    GetOutputVector(V, "VectorToolkit");
    #initialize some points for our polygon box
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 70;
    yPoints[2] = 70;
    xPoints[3] = 90;
    yPoints[3] = 100;
    xPoints[4] = 130;
    yPoints[4] = 120;
    # create a line
    numeric numberPoints = 4;
    VectorAddLine(V, numberPoints, xPoints, yPoints);
    # create a second line
    numberPoints = 4;
    numeric i;
    for i = 1 to 5 {
           xPoints[i] = xPoints[i] + 200;
           }
    VectorAddLine(V, numberPoints, xPoints, yPoints);
    # now add a some nodes to the first line
    numeric x = 10;
    numeric y = 10;
    numeric searchDistance = 10;
    for i = 1 to 4 {
           VectorAddNode(V, x, y, searchDistance);
           print("node added at x, y: ", x, y);
           x = x + 10;
           y = y + 10;
           }
    # now add a some nodes to the second line
    x = 210;
    y = 10;
    searchDistance = 10;
    for i = 1 to 4 {
           VectorAddNode(V, x, y, searchDistance);
           print("node added at x, y: ", x, y);
           x = x + 10;
           y = y + 10;
           }
    # now delete a single node from the first line
    numeric node1 = FindClosestNode(V, 10, 10);
    VectorDeleteNode(V, node1);
    print("node", node1, "at x, y", 10, 10, "will be deleted");
    # now delete multiple nodes from the first line
    x = 20;
    y = 20;
    searchDistance = 10;
    for i = 1 to 3 {
           nodeList[i] = FindClosestNode(V, x, y);
           print("node", nodeList[i], "at x, y", x, y, "will be deleted");
           x = x + 10;
           y = y + 10;
           }
    numeric numNodes = 3;
    VectorDeleteNodes(V, nodeList, numNodes);
    


    VectorDeleteNodes
    Deletes multiple nodes from a vector object

    VectorDeleteNodes(Vector, nodelist, numnodes, flags)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      array nodelist
        Array containing list of nodes to delete
      numeric numnodes
        Number of nodes in nodelist
      numeric flags (オプション)
        See below
        可能性のある値:
          "NoCheckHyper"
            Do not check differences between hyperlinks
          "NoCheckDatabase"
            Do not check differences between database attachments

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    array numeric xPoints[10], yPoints[10], nodeList[10];
    clear();
    GetOutputVector(V, "VectorToolkit");
    #initialize some points for our polygon box
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 70;
    yPoints[2] = 70;
    xPoints[3] = 90;
    yPoints[3] = 100;
    xPoints[4] = 130;
    yPoints[4] = 120;
    # create a line
    numeric numberPoints = 4;
    VectorAddLine(V, numberPoints, xPoints, yPoints);
    # create a second line
    numberPoints = 4;
    numeric i;
    for i = 1 to 5 {
           xPoints[i] = xPoints[i] + 200;
           }
    VectorAddLine(V, numberPoints, xPoints, yPoints);
    # now add a some nodes to the first line
    numeric x = 10;
    numeric y = 10;
    numeric searchDistance = 10;
    for i = 1 to 4 {
           VectorAddNode(V, x, y, searchDistance);
           print("node added at x, y: ", x, y);
           x = x + 10;
           y = y + 10;
           }
    # now add a some nodes to the second line
    x = 210;
    y = 10;
    searchDistance = 10;
    for i = 1 to 4 {
           VectorAddNode(V, x, y, searchDistance);
           print("node added at x, y: ", x, y);
           x = x + 10;
           y = y + 10;
           }
    # now delete a single node from the first line
    numeric node1 = FindClosestNode(V, 10, 10);
    VectorDeleteNode(V, node1);
    print("node", node1, "at x, y", 10, 10, "will be deleted");
    # now delete multiple nodes from the first line
    x = 20;
    y = 20;
    searchDistance = 10;
    for i = 1 to 3 {
           nodeList[i] = FindClosestNode(V, x, y);
           print("node", nodeList[i], "at x, y", x, y, "will be deleted");
           x = x + 10;
           y = y + 10;
           }
    numeric numNodes = 3;
    VectorDeleteNodes(V, nodeList, numNodes);
    


    VectorDeletePoint
    Deletes a point from a vector object

    VectorDeletePoint(Vector, point)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric point
        The point to delete

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    array numeric xPoints[10], yPoints[10], pointList[10];
    clear();
    GetOutputVector(V, "VectorToolkit");
    #initialize some points
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 100;
    yPoints[2] = 0;
    xPoints[3] = 100;
    yPoints[3] = 100;
    xPoints[4] = 0;
    yPoints[4] = 100;
    # add 4 points
    numeric i;
    for i = 1 to 4 {
           VectorAddPoint(V, xPoints[i], yPoints[i]);
           }
    numeric numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    VectorDeletePoint(V, 1);
    numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    pointList[1] = 1;
    pointList[2] = 2;
    VectorDeletePoints(V, pointList, 2);
    numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    


    VectorDeletePoints
    Deletes multiple points from a vector object

    VectorDeletePoints(Vector, pointlist, numpoints)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      array pointlist
        Array containing list of points to delete
      numeric numpoints
        Number of points in pointlist

    詳細と仮定

      The vector object exists.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    array numeric xPoints[10], yPoints[10], pointList[10];
    clear();
    GetOutputVector(V, "VectorToolkit");
    #initialize some points
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 100;
    yPoints[2] = 0;
    xPoints[3] = 100;
    yPoints[3] = 100;
    xPoints[4] = 0;
    yPoints[4] = 100;
    # add 4 points
    numeric i;
    for i = 1 to 4 {
           VectorAddPoint(V, xPoints[i], yPoints[i]);
           }
    numeric numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    VectorDeletePoint(V, 1);
    numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    pointList[1] = 1;
    pointList[2] = 2;
    VectorDeletePoints(V, pointList, 2);
    numberPoints = NumVectorPoints(V);
    print("number of points: ", numberPoints);
    


    VectorDeletePoly
    Deletes a polygon from a vector object

    VectorDeletePoly(Vector, polynumber, flag$)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric polynumber
        The polygon to delete
      string flag$ (オプション)
        See below
        可能性のある値:
          "LongestLine"
          "Collapse"

    詳細と仮定

      The vector object exists.

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric xPoints[10], yPoints[10], polyList[10];
    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    # draw some boxes  - this will create polygons
    # all closed lines are converted to polygons
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 100;
    yPoints[2] = 0;
    xPoints[3] = 100;
    yPoints[3] = 100;
    xPoints[4] = 0;
    yPoints[4] = 100;
    xPoints[5] = 0;
    yPoints[5] = 0;
    numeric i, j;
    for i = 0 to 5 {
           VectorAddLine(V, 5, xPoints, yPoints);
           for j = 1 to 5 {
                  xPoints[j] = xPoints[j] + 150;
                  }
           }
    numeric numPolys = NumVectorPolys(V);
    print("number of polygons: ", numPolys);
    # now delete one polygon
    numeric polyNum = 1;
    VectorDeletePoly(V, polyNum);
    numPolys = NumVectorPolys(V);
    print("number of polygons: ", numPolys);
    # now delete multiple polygons
    polyList[1] = 1;
    polyList[2] = 3;
    numeric polyCount = 2;
    VectorDeletePolys(V, polyList, polyCount);
    numPolys = NumVectorPolys(V);
    print("number of polygons: ", numPolys);
    


    VectorDeletePolys
    Deletes multiple polygons from a vector object

    VectorDeletePolys(Vector, polylist, numpolys, flag$)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      array polylist
        Array containing list of polygons to delete
      numeric numpolys
        The number of polygons in polylist
      string flag$ (オプション)
        See below
        可能性のある値:
          "LongestLine"
          "Collapse"

    詳細と仮定

      The vector object exists.

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric xPoints[10], yPoints[10], polyList[10];
    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    # draw some boxes  - this will create polygons
    # all closed lines are converted to polygons
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 100;
    yPoints[2] = 0;
    xPoints[3] = 100;
    yPoints[3] = 100;
    xPoints[4] = 0;
    yPoints[4] = 100;
    xPoints[5] = 0;
    yPoints[5] = 0;
    numeric i, j;
    for i = 0 to 5 {
           VectorAddLine(V, 5, xPoints, yPoints);
                  for j = 1 to 5 {
                  xPoints[j] = xPoints[j] + 150;
                  }
           }
    numeric numPolys = NumVectorPolys(V);
    print("number of polygons: ", numPolys);
    # now delete one polygon
    numeric polyNum = 1;
    VectorDeletePoly(V, polyNum);
    numPolys = NumVectorPolys(V);
    print("number of polygons: ", numPolys);
    # now delete multiple polygons
    polyList[1] = 1;
    polyList[2] = 3;
    numeric polyCount = 2;
    VectorDeletePolys(V, polyList, polyCount);
    numPolys = NumVectorPolys(V);
    print("number of polygons: ", numPolys);
    


    VectorDeleteStdAttributes
    Delete standard attribute of a Vector object.

    VectorDeleteStdAttributes(Vector)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorLineRayIntersection
    Find intersection of a ray and a Vector line.

    VectorLineRayIntersection(Vector, x, y, angle, maxdist, intx, inty, refsys)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric x
        X coordinate of ray
      numeric y
        Y coordinate of ray
      numeric angle
        Angle of ray
      numeric maxdist
        Maximum distance to search
      numeric variable intx (オプション)
        X coordinate of intersection returned
      numeric variable inty (オプション)
        Y coordinate of intersection returned
      class SR_COORDREFSYS refsys (オプション)
        The coordinate reference system

    戻り値

      numeric
      number - 1 if intersects, 0 if not

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);
    VectorToolkitInit(V);
    numeric x = V.$Info.MinX;
    numeric y = V.$Info.MinY;
    print(VectorLineRayIntersection(V, x,y,45,500));
    


    VectorRemoveBubblePolys
    Remove bubble polygons from the specified object

    VectorRemoveBubblePolys(vector, dangleLength, bubbleArea, delPolyFlag$)

    場所:

      ベクタツールキット

    パラメータ:

      Vector vector
        Vector object
      numeric dangleLength
        The length of dangle lines to remove (in meters)
      numeric bubbleArea
        The maximum area of bubbles to remove (in meters squared)
      string delPolyFlag$ (オプション)
        Flags for polygon deletion (none by default)
        可能性のある値:
          "CombineAttrib"

    戻り値

      numeric

    作成日時: 05-Oct-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);
    numeric err = VectorRemoveBubblePolys(V, 10, 1000000, "CombineAttrib");
    PopupError(err);
    


    VectorRemoveExcessNodes
    Remove excess nodes from the specified object

    VectorRemoveExcessNodes(Vector, nodeList, nodeFlag$)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      class BITSET nodeList (オプション)
        The element bitset for removal (indexed at 0)
      string nodeFlag$ (オプション)
        Flags for excess node determination
        可能性のある値:
          "NoCheckDatabase"
          "NoCheckHyper"
          "NoStdAttrib"
          "RemoveIfPoint"

    戻り値

      numeric

    作成日時: 05-Oct-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);
    numeric err = VectorRemoveExcessNodes(V);
    PopupError(err);
    


    VectorRemoveIslandPolygons
    Remove island polygons from the specified vector object

    VectorRemoveIslandPolygons(Vector, maxArea, delPolyFlag$)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      numeric maxArea
        Maximum area of islands to delete
      string delPolyFlag$ (オプション)
        The polygon removal flags
        可能性のある値:
          "LongLineDelete"
          "NoDeleteSpurs"
          "CombineAttrib"
          "RemoveAllIslands"

    戻り値

      numeric

    作成日時: 05-Oct-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);
    numeric err = VectorRemoveIslandPolygons(V, 100);
    PopupError(err);
    


    VectorRemoveSliverPolys
    Remove sliver polygons from the vector object

    VectorRemoveSliverPolys(vector, removalMethod$, area, thinnessRatio)

    場所:

      ベクタツールキット

    パラメータ:

      Vector vector
        Vector object
      string removalMethod$
        The criterion for polygon removal
        可能性のある値:
          "Area"
          "Ratio"
          "Both"
      numeric area
        The area to use (if removing by area)
      numeric thinnessRatio
        The thinness ratio (if removing by ratio)

    戻り値

      numeric

    作成日時: 05-Oct-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);
    numeric err = VectorRemoveSliverPolys(V, "Ratio", 0, .4);
    PopupError(err);
    


    VectorSetFlags
    Sets optional flags for a given vector object

    VectorSetFlags(Vector, flag$)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object
      string flag$
        See below
        可能性のある値:
          "NoQtree"
            Do not maintain qtrees
          "NoDBStatTable"
            Do not update Database Statistics tables
          "KeepAttachedLabels"
            Keep labels that become unattached
          "IsContour"
            Vector data is a contour set
          "NoStyle"
            Do not open/create a style table
          "NoConvIfElemID"
            Do not convert node to point if element ID attachment only
          "NoDatabase"
            Do not maintain databases
          "RemExNodesDelLine"
            Delete excess nodes when deleting lines
          "NoHyper"
            Do not update hyper object
          "NoCreateTables"
            Do not create databases
          "NoCreateStyle"
            Do not create a style object
          "NoCreateElemID"
            Do not create element ID tables
          "NoCreatePolyID"
            Do not create element ID table for polygons
          "IgnoreBadMinMax"
            Ignore bad min/max values - (only use with validate topo)
          "NoValidateNodes"
            Do not validate nodes during open
          "NoSaveQTree"
            Do not save search tree at close
          "NoPolyQTree"
            Do not generate a polygon qtree
          "NoLineQTree"
            Do not generate a line qtree
          "NoPointQTree"
            Do not generate a point qtree
          "NoLabelQTree"
            Do not generate a label qtree
          "NoNodeQTree"
            Do not generate a node qtree
          "NoQTrees"
            Do not create search trees
          "NoStatusText"
            Do not show status text
          "NoCreateElemID"
            Do not create element ID tables

    詳細と仮定

      The vector object exists.

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    array numeric xPoints[10], yPoints[10];
    # not going to use labels so tell it not to create qtree
    VectorSetFlags(V, "NoLabelQTree");
    # draw some boxes  - this will create polygons
    # all closed lines are converted to polygons
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 100;
    yPoints[2] = 0;
    xPoints[3] = 100;
    yPoints[3] = 100;
    xPoints[4] = 0;
    yPoints[4] = 100;
    xPoints[5] = 0;
    yPoints[5] = 0;
    VectorAddLine(V, 5, xPoints, yPoints);
    # now add some points
    numeric i;
    for i = 1 to 4 {
           VectorAddPoint(V, xPoints[i] + 150, yPoints[i] + 150);
           }
    numeric numPolys = NumVectorPolys(V);
    numeric numberPoints = NumVectorPoints(V);
    print("number of polygons, points: ", numPolys, numberPoints);
    


    VectorSetZValue
    Sets Z value for Vector element.

    VectorSetZValue(Vector, elementType$, elementNumber, zValue)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        The Vector object
      string elementType$
        Element type (point, line, or polygon)
        可能性のある値:
          "point"
            a Vector point
          "line"
            a Vector line
          "polygon"
            a Vector line
      numeric elementNumber
        The element number to set
      numeric zValue
        The z value to set

    詳細と仮定

      Vector was created as 3D Vector

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # example of VectorSetZValue()
    # 3D Vector creation and manipulation
    clear();
    # alternative - CreateVector() instead of GetOutputVector()
    # CreateVector(V, "c:/tnt/win32/projects/V3D/V3D.rvc", "V3d",
    #                                         "3-d Vector from SML", "VectorToolkit,3DVector");
    vector V;
    GetOutputVector(V, "VectorToolkit,Network,3DVector");
    # add three points
    VectorAddPoint(V, 0, 0);
    VectorAddPoint(V, 25, 25);
    VectorAddPoint(V, 50, 50);
    # set z value for second point
    VectorSetZValue(V, "point", 2, 100);
    # add three lines
    VectorAddTwoPointLine(V, 100, 100, 150, 150, 50, 100);
    VectorAddTwoPointLine(V, 200, 200, 250, 250, 100, 150);
    VectorAddTwoPointLine(V, 300, 300, 350, 350, 150, 200);
    # set z value for second point
    # VectorSetZValue(V, "line", 2, 200);
    numeric numLines = NumVectorLines(V);
    print("number of lines: ", numLines);
    


    VectorSplineLines
    Spline specified lines in the vector object

    VectorSplineLines(vector, numKnots, tolerance, splineType$, splineFlag$, lineList)

    場所:

      ベクタツールキット

    パラメータ:

      Vector vector
        Vector object
      numeric numKnots
        The number of knots (inserted vertices) to use
      numeric tolerance
        The tolerance level for splining
      string splineType$
        The splining method
        可能性のある値:
          "Cubic"
          "Quadratic"
          "Bezier"
      string splineFlag$ (オプション)
        Flags for the spline operation
        可能性のある値:
          "DontMoveEnds"
          "UseMinDistance"
          "TreatAsClose"
      class BITSET lineList (オプション)
        The element bitset for spline (indexed at 0)

    戻り値

      numeric

    作成日時: 04-Oct-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);
    numeric err = VectorSplineLines(V, 5, 1.0, "Cubic");
    PopupError(err);
    


    VectorThinLines
    Thin specified lines in the vector object

    VectorThinLines(vector, thinMethod$, factor, lineList)

    場所:

      ベクタツールキット

    パラメータ:

      Vector vector
        Vector object
      string thinMethod$
        The thinning method to use
        可能性のある値:
          "MinimumRatio"
          "MinimumDistance"
          "Douglas-Peucker"
      numeric factor
        The thinning factor
      class BITSET lineList (オプション)
        The element bitset for thinning (indexed at 0)

    戻り値

      numeric

    作成日時: 05-Oct-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorUpdateStdAttributes
    Force update of standard attributes.

    VectorUpdateStdAttributes(Vector)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorValidate
    Validate vector topology

    VectorValidate(Vector)

    場所:

      ベクタツールキット

    パラメータ:

      Vector Vector
        Vector object

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    GetOutputVector(V, "VectorToolkit");
    array numeric xPoints[5];
    array numeric yPoints[5];
    # draw some boxes  - this will create polygons
    # all closed lines are converted to polygons
    xPoints[1] = 0;
    yPoints[1] = 0;
    xPoints[2] = 100;
    yPoints[2] = 0;
    xPoints[3] = 100;
    yPoints[3] = 100;
    xPoints[4] = 0;
    yPoints[4] = 100;
    xPoints[5] = 0;
    yPoints[5] = 0;
    VectorAddLine(V, 5, xPoints, yPoints);
    # now add some points
    numeric i;
    for i = 1 to 4 {
           VectorAddPoint(V, xPoints[i] + 150, yPoints[i] + 150);
           }
           
    numeric numPolys = NumVectorPolys(V);
    numeric numberPoints = NumVectorPoints(V);
    print("number of polygons, points: ", numPolys, numberPoints);
    print("validating vector");
    VectorValidate(V);
    print("done");
    


    ClearRegion(region)

    場所:

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class REGION2D reg;
    # Modify reg here
    ClearRegion(reg); #Clears the region
    


    CopyRegion
    Copies a region and optionally changes its georeference.

    CopyRegion(region, georef)

    場所:

      リージョン

    パラメータ:

      class REGION2D region
        The Region to copy
      class GEOREF georef (オプション)
        The georeference for the new object

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    region RegionIn;
    class REGION RegionOut;
    GetInputRegion(RegionIn);
    string fileName$ = RegionIn.$Info.Filename;
    string objdesc$ = "created via SML-RegionCopy";
    string objectName$ = "RegionCopy";
    # just copy the region
    RegionOut = CopyRegion(RegionIn.$Data);
    SaveRegion(RegionOut, fileName$, objectName$, objdesc$);
    


    GetInputRegion
    Popup dialog to select a Region object for input

    GetInputRegion(RegionVar)

    場所:

      リージョン

    パラメータ:

      class REGION RegionVar
        A Region variable (undefined ok)

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector Vin;
    region reg;
    GetInputVector(Vin);
    GetInputRegion(reg);
    numeric elementNumber = 1;
    numeric inRegion = VectorElementInRegion(reg.$Data, Vin, elementNumber, "line", "CompletelyInside");
    if (inRegion)
           print( "element ", elementNumber, "is CompletelyInside\n");
    


    GetOutputRegion
    Open a Region for output via dialog.

    GetOutputRegion(RegionVar)

    場所:

      リージョン

    パラメータ:

      class REGION RegionVar
        Region object

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    region RegionIn, RegionOut;
    GetInputRegion(RegionIn);
    GetOutputRegion(RegionOut);
    RegionOut.Write(CopyRegion(RegionIn.$Data)); # copy 'In' to 'Out'
    


    PointInRegion
    Test if a point is in a Region.

    PointInRegion(from_x, from_y, region)

    場所:

      リージョン

    パラメータ:

      numeric from_x
        X coordinate of the point
      numeric from_y
        Y coordinate of the point
      class REGION2D region
        The region to test against

    戻り値

      numeric
      0 or 1

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    region RgnIn;
    GetInputRegion(RgnIn);
    # find the x and y midpoint
    class POINT2D pnt;
    pnt = RgnIn.$Data.GetCentroid();
    numeric midX = pnt.x;
    numeric midY = pnt.y;
    # point and region same goeref
    numeric result = PointInRegion(midX, midY, RgnIn.$Data);
    print(midX, midY, result);
    


    ReadRegion
    Read a region from an rvc file

    ReadRegion(region, filename$, objname$, Credentials)

    場所:

      リージョン

    パラメータ:

      class REGION2D region
        Region varible
      string filename$
        RVC filename
      string objname$
        Object name
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    RegionAND
    Create a Region that is the intersection of two Regions.

    RegionAND(region1, region2)

    場所:

      リージョン

    パラメータ:

      class REGION2D region1
        The region variable to be used as the first operand
      class REGION2D region2
        The region variable to be used as the second operand

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    region Rgn1, Rgn2, RgnAND;
    GetInputRegion(Rgn1);
    GetInputRegion(Rgn2);
    GetOutputRegion(RgnAND);
    RgnAND = RegionAND(Rgn1.$Data, Rgn2.$Data);
    


    RegionOR
    Create a Region that is the union of two Regions.

    RegionOR(region1, region2)

    場所:

      リージョン

    パラメータ:

      class REGION2D region1
        The region variable to be used as the first operand
      class REGION2D region2
        The region variable to be used as the second operand

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    region Rgn1, Rgn2, RgnOR;
    GetInputRegion(Rgn1);
    GetInputRegion(Rgn2);
    GetOutputRegion(RgnOR);
    RgnOR = RegionOR(Rgn1.$Data, Rgn2.$Data);
    


    RegionSubtract
    Subtract a Region from a Region.

    RegionSubtract(region1, region2)

    場所:

      リージョン

    パラメータ:

      class REGION2D region1
        The region variable to be used as the first operand
      class REGION2D region2
        The region variable to be used as the second operand

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # example of RegionSubtract()
    region Rgn1, Rgn2, RgnSub;
    GetInputRegion(Rgn1);
    GetInputRegion(Rgn2);
    GetOutputRegion(RgnSub);
    RgnSub = RegionSubtract(Rgn1.$Data, Rgn2.$Data);
    


    RegionTrans
    Convert a region using a transparm.

    RegionTrans(region, transparm, invert)

    場所:

      リージョン

    パラメータ:

      class REGION2D region
        The region to transform
      class TRANSPARM transparm
        The transparm to use
      numeric invert (オプション)
        Reverse direction of transparm

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    RegionXOR
    Create a Region that is the exclusive or of two Regions.

    RegionXOR(region1, region2)

    場所:

      リージョン

    パラメータ:

      class REGION2D region1
        The region variable to be used as the first operand
      class REGION2D region2
        The region variable to be used as the second operand

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # example of RegionXOR()
    region Rgn1, Rgn2, RgnXOR;
    GetInputRegion(Rgn1);
    GetInputRegion(Rgn2);
    GetOutputRegion(RgnXOR);
    RgnXOR = RegionXOR(Rgn1.$Data, Rgn2.$Data);
    


    SaveRegion
    Saves a Region object

    SaveRegion(region, filename$, objname$, desc$, Credentials)

    場所:

      リージョン

    パラメータ:

      class REGION region
        Region object
      string filename$
        RVC file name
      string objname$
        Object name
      string desc$
        Object description
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class REGION RgnIn, RgnOut;
    GetInputRegion(RgnIn);
    RgnOut = CopyRegion(RgnIn);
    SaveRegion(RgnOut, "c:/tnt/win32/pfarming/Save.rvc", "myregion", "created in SML");
    


    WriteRegion
    Write the region to an rvc file

    WriteRegion(region, filename$, objname$, desc$, Credentials)

    場所:

      リージョン

    パラメータ:

      class REGION2D region
        Region variable
      string filename$
        RVC filename
      string objname$
        Object name
      string desc$
        Object description
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    RasterClassifyAdaptiveResonance(numberClasses, maxIterations, initialMinDistance, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    場所:

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      numeric initialMinDistance
        Initial minimum cluster distance
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyAdaptiveResonance()
    raster R1, R2, R3;
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string distON$ = "kMeanD";
    string distDesc$ = "created in SML";
    numeric numberClasses = 15;
    numeric maxIterations = 10;
    numeric initialMinDistance = 10;
    RasterClassifyAdaptiveResonance(numberClasses, maxIterations, initialMinDistance,
    classFN$, classON$, classDesc$,
    distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifyAdaptiveResonanceWithMask
    Adaptive resonance (neural net) classification using mask raster

    RasterClassifyAdaptiveResonanceWithMask(numberClasses, maxIterations, initialMinDistance, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      numeric initialMinDistance
        Initial minimum cluster distance
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster MaskRaster
        Mask Raster indicating which parts of the Raster to exclude from classification
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyAdaptiveResonanceWithMask()
    raster Mask, R1, R2, R3;
    GetInputRaster(Mask);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string distON$ = "kMeanD";
    string distDesc$ = "created in SML";
    numeric numberClasses = 15;
    numeric maxIterations = 10;
    numeric initialMinDistance = 10;
    RasterClassifyAdaptiveResonanceWithMask(numberClasses, maxIterations, initialMinDistance,
    classFN$, classON$, classDesc$,
    distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyFuzzyCMean
    Fuzzy C means classification without mask raster

    RasterClassifyFuzzyCMean(numberClasses, maxIterations, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyFuzzyCMean()
    raster R1, R2, R3;
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
    string distanceON$ = "distras";
    string distanceDesc$ = "created in SML";
    numeric numClasses = 15;
    numeric maxIterations = 10;
    RasterClassifyFuzzyCMean(numClasses, maxIterations, classFN$, classON$, classDesc$,
    distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifyFuzzyCMeanWithMask
    Fuzzy C means classification using mask raster

    RasterClassifyFuzzyCMeanWithMask(numberClasses, maxIterations, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster MaskRaster
        Mask Raster indicating which parts of the Raster to exclude from classification
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyFuzzyCMeanWithMask()
    class Raster Mask, R1, R2, R3;
    GetInputRaster(Mask);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
    string distanceON$ = "distras";
    string distanceDesc$ = "created in SML";
    numeric numClasses = 15;
    numeric maxIterations = 10;
    RasterClassifyFuzzyCMeanWithMask(numClasses, maxIterations, classFN$, classON$, classDesc$,
    distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyISODATA
    ISODATA classification without mask raster

    RasterClassifyISODATA(numberClasses, maxIterations, maxStdDeviaton, minDistanceToCombine, minClusterCells, minDistanceForChaining, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      numeric maxStdDeviaton
        Maximum standard deviation
      numeric minDistanceToCombine
        Minimum distance to combine
      numeric minClusterCells
        Minimum cluster cells
      numeric minDistanceForChaining
        Minimum distance for chaining
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyISODATA()
    class Raster R1, R2, R3;
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string distON$ = "ISODist";
    string distDesc$ = "created in SML";
    numeric numberClasses = 15;
    numeric numberIterations = 10;
    numeric maxStdDeviaton = 15;
    numeric minDistanceToCombine = 3.2;
    numeric minClusterCells = 30;
    numeric minDistanceForChaining = 3.2;
    RasterClassifyISODATA(numberClasses, numberIterations, maxStdDeviaton, minDistanceToCombine,
    minClusterCells, minDistanceForChaining, classFN$, classON$, classDesc$,
    distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifyISODATAWithMask
    ISODATA classification using mask raster

    RasterClassifyISODATAWithMask(numberClasses, maxIterations, maxStdDeviaton, minDistanceToCombine, minClusterCells, minDistanceForChaining, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      numeric maxStdDeviaton
        Maximum standard deviation
      numeric minDistanceToCombine
        Minimum distance to combine
      numeric minClusterCells
        Minimum cluster cells
      numeric minDistanceForChaining
        Minimum distance for chaining
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster MaskRaster
        Mask Raster indicating which parts of the Raster to exclude from classification
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyISODATAWithMask()
    class Raster Mask, R1, R2, R3;
    GetInputRaster(Mask);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string distON$ = "ISODist";
    string distDesc$ = "created in SML";
    numeric numberClasses = 15;
    numeric numberIterations = 10;
    numeric maxStdDeviaton = 15;
    numeric minDistanceToCombine = 3.2;
    numeric minClusterCells = 30;
    numeric minDistanceForChaining = 3.2;
    RasterClassifyISODATAWithMask(numberClasses, numberIterations, maxStdDeviaton, minDistanceToCombine,
    minClusterCells, minDistanceForChaining, classFN$, classON$, classDesc$,
    distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyKMeans
    K means classification without mask raster

    RasterClassifyKMeans(numberClasses, maxIterations, initialMinDistance, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      numeric initialMinDistance
        Initial minimum cluster distance
      numeric maxMoveSteady
        Maximum movement for steadiness
      numeric minSteadyPercentage
        Minimum steady cluster percentage
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyKMeans()
    class Raster R1, R2, R3;
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string distON$ = "kMeanD";
    string distDesc$ = "created in SML";
    numeric numClasses = 15;
    numeric maxIterations = 10;
    numeric initClusterMinDist = 10;
    numeric maxMoveSteady = 5;
    numeric minSteadyClusterPercent = 80;
    RasterClassifyKMeans(numClasses, maxIterations, initClusterMinDist, maxMoveSteady,
    minSteadyClusterPercent, classFN$, classON$, classDesc$,
    distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifyKMeansWithMask
    K means classification using mask raster

    RasterClassifyKMeansWithMask(numberClasses, maxIterations, initialMinDistance, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      numeric initialMinDistance
        Initial minimum cluster distance
      numeric maxMoveSteady
        Maximum movement for steadiness
      numeric minSteadyPercentage
        Minimum steady cluster percentage
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster MaskRaster
        Mask Raster indicating which parts of the Raster to exclude from classification
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      maximum likelihood does not produce a distance Raster so set parameters to empty ("")

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyKMeansWithMask()
    class Raster Mask, R1, R2, R3;
    GetInputRaster(Mask);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string distON$ = "distras";
    string distDesc$ = "created in SML";
    numeric numClasses = 15;
    numeric maxIterations = 10;
    numeric initClusterMinDist = 10;
    numeric maxMoveSteady = 5;
    numeric minSteadyClusterPercent = 80;
    RasterClassifyKMeansWithMask(numClasses, maxIterations, initClusterMinDist, maxMoveSteady,
    minSteadyClusterPercent, classFN$, classON$, classDesc$,
    distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyMaxLikelihood
    Maximum likelihood classification without mask raster

    RasterClassifyMaxLikelihood(minLikelihoodPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, TrainingRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric minLikelihoodPercentage
        Minimum likelihood percentage
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster TrainingRaster
        Training set Raster
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      maximum likelihood does not produce a distance Raster so set parameters to empty ("")

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyMaxLikelihood()
    class Raster Training, R1, R2, R3;
    GetInputRaster(Training);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distanceFN$ = ""; # this function does not create a distance raster
    string distanceON$ = "";
    string distanceDesc$ = "";
    numeric minLikelihoodPercent = 80;
    RasterClassifyMaxLikelihood(minLikelihoodPercent, classFN$, classON$, classDesc$,
    distanceFN$, distanceON$, distanceDesc$,
    "NoRedistribution", Training, R1, R2, R3);
    


    RasterClassifyMaxLikelihoodWithMask
    Maximum likelihood classification using mask raster

    RasterClassifyMaxLikelihoodWithMask(minLikelihoodPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, TrainingRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric minLikelihoodPercentage
        Minimum likelihood percentage
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster MaskRaster
        Mask Raster indicating which parts of the Raster to exclude from classification
      Raster TrainingRaster
        Training set Raster
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      maximum likelihood does not produce a distance Raster so set parameters to empty ("")

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyMaxLikelihoodWithMask()
    class Raster Mask, Training, R1, R2, R3;
    GetInputRaster(Mask);
    GetInputRaster(Training);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = ""; # this function does not create a distance raster
    string classON$ = "";
    string classDesc$ = "";
    string distanceFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
    string distanceON$ = "distras";
    string distanceDesc$ = "created in SML";
    numeric minLikelihoodPercent = 80;
    RasterClassifyMaxLikelihoodWithMask(minLikelihoodPercent, classFN$, classON$, classDesc$,
    distanceFN$, distanceON$, distanceDesc$,
    "NoRedistribution", Mask, Training, R1, R2, R3);
    


    RasterClassifyMinAngle
    Minimum distribution angle classification without mask raster

    RasterClassifyMinAngle(numberClasses, maxIterations, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      numeric maxMoveSteady
        Maximum movement for steadiness
      numeric minSteadyPercentage
        Minimum steady cluster percentage
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyMinAngle()
    class Raster R1, R2, R3;
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string distON$ = "kMeanD";
    string distDesc$ = "created in SML";
    numeric numberClasses = 15;
    numeric maxIterations = 10;
    numeric maxMoveSteady = 10;
    numeric minSteadyPercentage = 80;
    RasterClassifyMinAngle(numberClasses, maxIterations, maxMoveSteady, minSteadyPercentage,
    classFN$, classON$, classDesc$,
    distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifyMinAngleWithMask
    Minimum distribution angle classification using mask raster

    RasterClassifyMinAngleWithMask(numberClasses, maxIterations, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      numeric maxMoveSteady
        Maximum movement for steadiness
      numeric minSteadyPercentage
        Minimum steady cluster percentage
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster MaskRaster
        Mask Raster indicating which parts of the Raster to exclude from classification
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyMinAngleWithMask()
    class Raster Mask, R1, R2, R3;
    GetInputRaster(Mask);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string distON$ = "kMeanD";
    string distDesc$ = "created in SML";
    numeric numberClasses = 15;
    numeric maxIterations = 10;
    numeric maxMoveSteady = 10;
    numeric minSteadyPercentage = 80;
    RasterClassifyMinAngleWithMask(numberClasses, maxIterations, maxMoveSteady, minSteadyPercentage,
    classFN$, classON$, classDesc$,
    distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyMinDistanceToMean
    Minimum distance to mean classification without mask raster

    RasterClassifyMinDistanceToMean(distanceMethod$, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, TrainingRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      string distanceMethod$
        Distance method flags
        可能性のある値:
          "Euclidean"
            standard euclidean distance
          "Orthogonal"
            "city block distance"
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster TrainingRaster
        The classification training raster
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyMinDistanceToMean()
    class Raster Training, R1, R2, R3, R4, R5, R6;
    GetInputRaster(Training);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    GetInputRaster(R4);
    GetInputRaster(R5);
    GetInputRaster(R6);
    string classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
    string distanceON$ = "distras";
    string distanceDesc$ = "created in SML";
    RasterClassifyMinDistanceToMean("Euclidean", classFN$, classON$, classDesc$,
    distanceFN$, distanceON$, distanceDesc$,
    "NoRedistribution", Training, R1, R2, R3, R4, R5, R6);
    


    RasterClassifyMinDistanceToMeanWithMask
    Minimum distance to mean classification using mask raster

    RasterClassifyMinDistanceToMeanWithMask(distanceMethod$, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, TrainingRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      string distanceMethod$
        Distance method flags
        可能性のある値:
          "Euclidean"
            standard euclidean distance
          "Orthogonal"
            "city block distance"
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster MaskRaster
        Mask Raster indicating which parts of the Raster to exclude from classification
      Raster TrainingRaster
        The classification training raster
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyMinDistanceToMeanWithMask()
    class Raster Mask, Training, R1, R2, R3;
    GetInputRaster(Mask);
    GetInputRaster(Training);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
    string distanceON$ = "distras";
    string distanceDesc$ = "created in SML";
    RasterClassifyMinDistanceToMeanWithMask("Euclidean", classFN$, classON$, classDesc$,
    distanceFN$, distanceON$, distanceDesc$,
    "NoRedistribution", Mask, Training, R1, R2, R3);
    


    RasterClassifySelfOrganization
    Self organization (neural net) classification without mask raster

    RasterClassifySelfOrganization(numberClasses, maxIterations, initialMinDistance, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      numeric initialMinDistance
        Initial minimum cluster distance
      numeric maxMoveSteady
        Maximum movement for steadiness
      numeric minSteadyPercentage
        Minimum steady cluster percentage
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifySelfOrganization()
    class Raster R1, R2, R3;
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string distON$ = "kMeanD";
    string distDesc$ = "created in SML";
    numeric numberClasses = 15;
    numeric maxIterations = 10;
    numeric initialMinDistance = 10;
    numeric maxMoveSteady = 5;
    numeric minSteadyPercentage = 80;
    RasterClassifySelfOrganization(numberClasses, maxIterations, initialMinDistance, maxMoveSteady,
    minSteadyPercentage, classFN$, classON$, classDesc$,
    distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifySelfOrganizationWithMask
    Self organization (neural net) classification using mask raster

    RasterClassifySelfOrganizationWithMask(numberClasses, maxIterations, initialMinDistance, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric numberClasses
        Number of classes desired
      numeric maxIterations
        Maximum number of iterations to run
      numeric initialMinDistance
        Initial minimum cluster distance
      numeric maxMoveSteady
        Maximum movement for steadiness
      numeric minSteadyPercentage
        Minimum steady cluster percentage
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster MaskRaster
        Mask Raster indicating which parts of the Raster to exclude from classification
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifySelfOrganizationWithMask()
    class Raster Mask, R1, R2, R3;
    GetInputRaster(Mask);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
    string distON$ = "kMeanD";
    string distDesc$ = "created in SML";
    numeric numberClasses = 15;
    numeric maxIterations = 10;
    numeric initialMinDistance = 10;
    numeric maxMoveSteady = 5;
    numeric minSteadyPercentage = 80;
    RasterClassifySelfOrganizationWithMask(numberClasses, maxIterations, initialMinDistance, maxMoveSteady,
    minSteadyPercentage, classFN$, classON$, classDesc$,
    distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyStepwiseLinear
    Stepwize linear classification without mask raster

    RasterClassifyStepwiseLinear(classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, TrainingRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster TrainingRaster
        Training set Raster
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      stepwise linear does not produce a distance Raster so set parameters to empty ("")

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyStepwiseLinear()
    class Raster Training, R1, R2, R3;
    GetInputRaster(Training);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distanceFN$ = ""; # this function does not create a distance raster
    string distanceON$ = "";
    string distanceDesc$ = "";
    numeric numClasses = 15;
    numeric maxIterations = 10;
    numeric initClusterMinDist = 10;
    numeric maxMoveSteady = 5;
    numeric minSteadyClusterPercent = 80;
    RasterClassifyStepwiseLinear(classFN$, classON$, classDesc$,
    distanceFN$, distanceON$, distanceDesc$,
    "NoRedistribution", Training, R1, R2, R3);
    


    RasterClassifyStepwiseLinearWithMask
    Stepwize linear classification using mask raster

    RasterClassifyStepwiseLinearWithMask(classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, TrainingRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster MaskRaster
        Mask Raster indicating which parts of the Raster to exclude from classification
      Raster TrainingRaster
        Training set Raster
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      stepwise linear does not produce a distance Raster so set parameters to empty ("")

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifyStepwiseLinearWithMask()
    class Raster Mask, Training, R1, R2, R3;
    GetInputRaster(Mask);
    GetInputRaster(Training);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distanceFN$ = ""; # this function does not create a distance raster
    string distanceON$ = "";
    string distanceDesc$ = "";
    numeric numClasses = 15;
    numeric maxIterations = 10;
    numeric initClusterMinDist = 10;
    numeric maxMoveSteady = 5;
    numeric minSteadyClusterPercent = 80;
    RasterClassifyStepwiseLinearWithMask(classFN$, classON$, classDesc$,
    distanceFN$, distanceON$, distanceDesc$,
    "NoRedistribution", Mask, Training, R1, R2, R3);
    


    RasterClassifySuitsMaxRelative
    Suits' maximum relative classification without mask raster

    RasterClassifySuitsMaxRelative(standardDeviationMultiplier, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, TrainingRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric standardDeviationMultiplier
        Standard deviation multiplier
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster TrainingRaster
        Training set Raster
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifySuitsMaxRelative()
    class Raster Training, R1, R2, R3;
    GetInputRaster(Training);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distanceFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
    string distanceON$ = "distras";
    string distanceDesc$ = "created in SML";
    numeric stdDevMultiplier = 2;
    RasterClassifySuitsMaxRelative(stdDevMultiplier, classFN$, classON$, classDesc$,
    distanceFN$, distanceON$, distanceDesc$,
    "NoRedistribution", Training, R1, R2, R3);
    


    RasterClassifySuitsMaxRelativeWithMask
    Suits' maximum relative classification using mask raster

    RasterClassifySuitsMaxRelativeWithMask(standardDeviationMultiplier, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, TrainingRaster, InputRaster1, InputRaster2, ...)

    場所:

      ラスタの画像分類

    パラメータ:

      numeric standardDeviationMultiplier
        Standard deviation multiplier
      string classRasterFilename$
        Class Raster RVC filename
      string classRasterObjectname$
        Class Raster object name
      string classRasterDescription$
        Class Raster description
      string distanceRasterFilename$
        Distance Raster RVC filename
      string distanceRasterObjectname$
        Distance Raster object name
      string distanceRasterDescription$
        Distance Raster description
      string redistribution$
        Flag to indicate redistribution applied to input rasters prior to classifecation
        可能性のある値:
          "NoRedistribution"
            Do not perform input redistribution
          "LinearRedistribution"
            perform linear redistribution on input
          "NormalizeRedistribution"
            perform normalize redistribution on input
          "EqualizeRedistribution"
            perform equalize redistribution on input
          "LogarithmicRedistribution"
            perform logarithmic redistribution on input
      Raster MaskRaster
        Mask Raster indicating which parts of the Raster to exclude from classification
      Raster TrainingRaster
        Training set Raster
      Raster InputRaster1
        First input Raster
      Raster InputRaster2
        Second input Raster
      Raster ... (オプション)
        Additional input Rasters

    詳細と仮定

      if distance Raster Filename is empty ("") then no distance Raster is created

    戻り値

      なし

    作成日時: 19-Aug-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of RasterClassifySuitsMaxRelativeWithMask()
    class Raster Mask, Training, R1, R2, R3;
    GetInputRaster(Mask);
    GetInputRaster(Training);
    GetInputRaster(R1);
    GetInputRaster(R2);
    GetInputRaster(R3);
    string classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
    string classON$ = "classras";
    string classDesc$ = "created in SML";
    string distanceFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
    string distanceON$ = "distras";
    string distanceDesc$ = "created in SML";
    numeric stdDevMultiplier = 2;
    RasterClassifySuitsMaxRelativeWithMask(stdDevMultiplier, classFN$, classON$, classDesc$,
    distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Mask, Training, R1, R2, R3);
    


    beep()

    場所:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric a;
    for a = 1 to 100
           beep();
    


    CheckCancel
    Forces the SML script to check the cancel button.

    CheckCancel()

    場所:

      コンソール

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # force the script to check cancel somewhere in your script
    # instead of waiting until the next time SML checks itself
    clear();
    while(1) {
           print("I'll keep going until you cancel");
           CheckCancel();
           }
    


    clear
    Clear console

    clear()

    場所:

      コンソール

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print("Screen should be clear.");
    


    input
    Prompt user for keyboard input of scalar

    input(default, min, max)

    Function has been deprecated and is not guaranteed to exist as of version 7.1 Use PopupNum instead

    場所:

      コンソール

    パラメータ:

      numeric default (オプション)
        Optional - number. The default variable
        defaults to zero if it is not specified
      numeric min (オプション)
        Minimum value to allow
      numeric max (オプション)
        Maximum value to allow

    詳細と仮定

      If no value is entered other than a , then the
      (optional) default is returned. If the first characters
      are numerical, and the rest are not, then the first
      numerical value is returned. If the first character(s)
      is/are not numerical, then 0 is returned.

    戻り値

      numeric
      a number in base 10

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい


    input$
    Capture string input from keyboard

    input$(default$)

    Function has been deprecated and is not guaranteed to exist as of version 7.1 Use PopupString instead

    場所:

      コンソール

    パラメータ:

      string default$ (オプション)
        The default input value (if only enter pressed)

    詳細と仮定

      If a number is entered, it must be converted to a
      number with StrToNum()

    戻り値

      string
      a string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい


    print
    Sends unformated output to console

    print(value, ...)

    場所:

      コンソール

    パラメータ:

      any value value (オプション)
        Etc. any number of expressions which evaluate to
        numbers or strings
      any value ... (オプション)
        Optional additional strings

    詳細と仮定

      There are various strings which correspond types of whitespace.
      These include the following:
      \t tab
      \n newline
      \b backspace
      \\ '\' must be used twice, or it will not be interpreted
      correctly

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string str1$, str2$, str3$;
    str1$="This is line ";
    str2$="you see.";
    str3$="The next is\nline 3.";
    numeric number=1;
    print(str1$, number, str2$);
    print(str3$);
    


    printf
    Send formatted output to the console

    printf(format$, value, ...)

    場所:

      コンソール

    パラメータ:

      string format$
        Printf-style format string.
        The format string is scanned for format specification fields, which all start with a percent sign (%). Each format specification is replaced by the value of the next parameter passed after the format string. There should be a value passed for each format specification field.
        Format Specification fields have the following form (parts in square brackets are optional)
        %[flags][width][.precision]type
        flags
        Optional characters to control justification and sign display
        - : Left align the result within the field
        + : Prefix numeric value with a sign (+ or -), even if positive
        0 : If with is prefixed with a zero, the number will have leading zeros
        width
        Optional number that specifies the minimum number of characters output
        precision
        Optional number that specifies the maximum number of digits after the
        decimal place for floating point numbers
        type
        Required character specifying the type of parameter to output
        s : String
        d : Signed decimal integer
        u : Unsigned decimal integer
        o : Unsigned octal integer
        x : Unsigned hexadecimal integer, using "abcdef"
        X : Unsigned hexadecimal integer, using "ABCDEF"
        c : A single character, specified the ASCII value.
        e : Floating point value in scientific notation (e.g.: 1e6 for 1,000,000)
        f : Floating point value, not in scientific notation
        g : Floating point value in e or f format, whichever is more compact
      any value value (オプション)
        Etc. one or more numbers or strings
      any value ... (オプション)
        Optional additional strings or numbers

    詳細と仮定

      Specifications for the format string are too numerous to list
      here. See the reference manual for information on format strings

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string str1$, str2$, str3$, format$;
    format$="%s%d%s\n%s";
    str1$="This is line ";
    str2$="you see.";
    str3$="This is line 2";
    numeric number=1;
    print(str1$, number, str2$, str3$);
    printf(format$, str1$, 1, str2$, str3$);
    


    PrintMatrixToConsole
    Prints the matrix to the console.

    PrintMatrixToConsole(Matrix)

    場所:

      コンソール

    パラメータ:

    戻り値

      なし

    作成日時: 18-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX mat;
    mat = CreateMatrix(3,3);
    numeric row, col;
    for (row=0; row<3; row++)
    {
           for (col=0; col<3; col++)
           {
                  SetMatrixItem(mat, row, col, row+col);
           }
    }
    PrintMatrixToConsole(mat);
    


    SetStatusBar
    Displays as status bar at the bottom of the SML Editor window

    SetStatusBar(value, max)

    場所:

      コンソール

    パラメータ:

      numeric value (オプション)
        Optional - the size of the bar, (relative to max)
      numeric max (オプション)
        Optional - the number representing 100%

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Raster Rin;
    GetInputRaster(Rin, 0, 0, "8-bit unsigned"); # get the input raster
    numeric numColumns = NumCols(Rin);
    numeric numLines = NumLins(Rin);
    numeric stepSize = int(numLines / 10);
    numeric status = 0; # set up to display status bar
    numeric r,c;
    for r = 1 to numLines {
           for c = 1 to numColumns {
                  # invert all values
                  Rin[r,c] = 255 - Rin[r,c];
                  }
                  if (!int( r % stepSize)) {   # handle status bar code
                         status = status + 10;
                         SetStatusBar(status, 100);
                         SetStatusMessage("Calculating new raster values.");
                         }
           }
    CloseRaster(Rin);
    


    SetStatusMessage
    Displays a message at the bottom of the SML Editor window

    SetStatusMessage(string$)

    場所:

      コンソール

    パラメータ:

      string string$ (オプション)
        The message to display

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Raster Rin;
    GetInputRaster(Rin, 0, 0, "8-bit unsigned"); # get the input raster
    numeric numColumns = NumCols(Rin);
    numeric numLines = NumLins(Rin);
    numeric stepSize = int(numLines / 10);
    numeric status = 0; # set up to display status bar
    numeric r,c;
    for r = 1 to numLines {
           for c = 1 to numColumns {
                  # invert all values
                  Rin[r,c] = 255 - Rin[r,c];
                  }
                  if (!int( r % stepSize)) {   # handle status bar code
                         status = status + 10;
                         SetStatusBar(status, 100);
                         SetStatusMessage("Calculating new raster values.");
                         }
           }
    CloseRaster(Rin);
    


    ActivateGC(gc)

    場所:

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/elemsel.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateGCForDrawingArea
    Create a graphics context

    CreateGCForDrawingArea(DrawingArea)

    場所:

      描画

    パラメータ:

      class XmDrawingArea DrawingArea
        The drawing area to create the graphics context for

    戻り値

      class GC

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/elemsel.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DestroyGC
    Destroy a graphics context

    DestroyGC(gc)

    場所:

      描画

    パラメータ:

      class GC gc
        A graphics context

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/elemsel.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DrawArc
    Draw an arc

    DrawArc(x, y, xradius, yradius, startangle, sweepangle, rotangle)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of arc
      numeric y
        Y coordinate of arc
      numeric xradius
        X radius of arc
      numeric yradius
        Y radius of arc
      numeric startangle
        Starting angle
      numeric sweepangle
        Angle of arc
      numeric rotangle (オプション)
        Rotation angle in degrees

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/ARROW.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DrawArcChord
    Draw non-filled arc chord

    DrawArcChord(x, y, xradius, yradius, startangle, sweepangle, rotangle)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of chord
      numeric y
        Y coordinate of chord
      numeric xradius
        X radius of chord
      numeric yradius
        Y radius of chord
      numeric startangle
        Starting angle
      numeric sweepangle
        Angle of chord
      numeric rotangle (オプション)
        Rotation angle in degrees

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DrawArcWedge
    Draw non-filled arc wedge

    DrawArcWedge(x, y, xradius, yradius, startangle, sweepangle, rotangle)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of wedge
      numeric y
        Y coordinate of wedge
      numeric xradius
        X radius of wedge
      numeric yradius
        Y radius of wedge
      numeric startangle
        Starting angle
      numeric sweepangle
        Angle of wedge
      numeric rotangle (オプション)
        Rotation angle in degrees

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DrawCircle
    Draw a circle

    DrawCircle(x, y, radius)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of circle
      numeric y
        Y coordinate of circle
      numeric radius
        Radius of circle

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Dialog/drawdlg.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DrawEllipse
    Draw an ellipse

    DrawEllipse(x, y, xradius, yradius, angle)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of ellipse
      numeric y
        Y coordinate of ellipse
      numeric xradius
        X radius of ellipse
      numeric yradius
        Y radius of ellipse
      numeric angle (オプション)
        Rotation applied to ellipse

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DrawInterfaceText
    Draw text using the interface font

    DrawInterfaceText(string$, x, y)

    場所:

      描画

    パラメータ:

      string string$
        String to draw
      numeric x (オプション)
        The x screen coordinate (relative to upper-left of widget) to draw text
      numeric y (オプション)
        The y screen coordinate

    戻り値

      なし

    作成日時: 12-Sep-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/elemsel.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DrawLocalBegin
    Overide current coordinate transformation matrix to local one

    DrawLocalBegin(xcenter, ycenter, xscale, yscale, angle)

    場所:

      描画

    パラメータ:

      numeric xcenter (オプション)
        Current x that will become 0 in new coordinates
      numeric ycenter (オプション)
        Current y that will become 0 in new coordinates
      numeric xscale (オプション)
        X scale factor
      numeric yscale (オプション)
        Y scale factor
      numeric angle (オプション)
        Rotation angle (degrees)

    詳細と仮定

      restore coordinate transformation matrix by calling DrawLocalEnd

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DrawLocalEnd
    Restore coordinate transformation matrix to one before call to DrawLocalBegin()

    DrawLocalEnd()

    場所:

      描画

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DrawPoint
    Draw single point

    DrawPoint(x, y)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of point
      numeric y
        Y coordinate of point

    詳細と仮定

      uses the current point style

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    DrawPolyLine
    Draw polyline

    DrawPolyLine(x_points, y_points, NumPoints)

    場所:

      描画

    パラメータ:

      array x_points
        Array of x coordinates
      array y_points
        Array of y coordinates
      numeric NumPoints
        Number of points in array

    詳細と仮定

      the line is not closed automatically

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/Rastprof.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DrawRect
    Draw a rectangle

    DrawRect(x, y, width, height, angle)

    場所:

      描画

    パラメータ:

      numeric x
        X value of lower left corner
      numeric y
        Y value of lower left corner
      numeric width
        Width of rectangle
      numeric height
        Height of rectangle
      numeric angle (オプション)
        Angle to rotate rectangle

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DrawRegion
    Draw non-filled Region

    DrawRegion(Region)

    場所:

      描画

    パラメータ:

      class REGION2D Region
        The Region to draw

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DrawSetFillStyle
    Set fill style out of current style object

    DrawSetFillStyle(name$)

    場所:

      描画

    パラメータ:

      string name$ (オプション)
        Named style

    詳細と仮定

      If name$ is not used or not found then default style will be set.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DrawSetLineStyle
    Set line style out of current style object

    DrawSetLineStyle(name$)

    場所:

      描画

    パラメータ:

      string name$ (オプション)
        Named style

    詳細と仮定

      If name$ is not used or not found then default style will be set.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DrawSetPointStyle
    Set point style out of current style object

    DrawSetPointStyle(name$)

    場所:

      描画

    パラメータ:

      string name$ (オプション)
        Named style

    詳細と仮定

      If name$ is not used or not found then default style will be set.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    DrawTextSetColors
    Set the colors for text drawing

    DrawTextSetColors(foreground, background)

    場所:

      描画

    パラメータ:

      class color foreground
        Color of forground
      class color background (オプション)
        Color of backgroud

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    DrawTextSetFont
    Set font for text drawing

    DrawTextSetFont(fontname$)

    場所:

      描画

    パラメータ:

      string fontname$
        The font name

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/ARROW.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DrawTextSetHeight
    Sets text height in coordinate units

    DrawTextSetHeight(height)

    場所:

      描画

    パラメータ:

      numeric height
        The height to set

    戻り値

      なし

    作成日時: 14-Jan-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/ARROW.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DrawTextSetHeightPixels
    Set text height

    DrawTextSetHeightPixels(height)

    場所:

      描画

    パラメータ:

      numeric height
        Height of text in pixels

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    DrawTextSimple
    Draw a text string

    DrawTextSimple(string$, x, y, angle)

    場所:

      描画

    パラメータ:

      string string$
        The string to draw
      numeric x (オプション)
        X coordinate of the string
      numeric y (オプション)
        Y coordinate of the string
      numeric angle (オプション)
        Angle of the string

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/Rastprof.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DrawTo
    Draw line from current pen position to a point

    DrawTo(x, y)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of point to draw to
      numeric y
        Y coordinate of point to draw to

    詳細と仮定

      uses current line style

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/Rastprof.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DrawUseDefaultStyleObject
    Reset style object to default

    DrawUseDefaultStyleObject()

    場所:

      描画

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DrawUseStyleObject
    Change the style object used for subsequent calls to SetStyle() functions

    DrawUseStyleObject(filename$, objectname$, Credentials)

    場所:

      描画

    パラメータ:

      string filename$
        File containing the style object
      string objectname$
        Name of the style object
      class RVC_CREDENTIALS Credentials (オプション)
        Credentials Object

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    FillArcChord
    Fill an arc chord with the current fill style

    FillArcChord(x, y, xradius, yradius, startangle, sweepangle, rotangle)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of arc wedge
      numeric y
        Y coordinate of arc wedge
      numeric xradius
        X radius of arc wedge
      numeric yradius
        Y radius of arc wedge
      numeric startangle
        Starting angle
      numeric sweepangle
        Degrees of arc
      numeric rotangle (オプション)
        Rotation angle in degrees

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    FillArcWedge
    Fill an arc wedge with the current fill style

    FillArcWedge(x, y, xradius, yradius, startangle, sweepangle, rotangle)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of wedge
      numeric y
        Y coordinate of wedge
      numeric xradius
        X radius of wedge
      numeric yradius
        Y radius of wedge
      numeric startangle
        Starting angle
      numeric sweepangle
        Degrees of arc
      numeric rotangle (オプション)
        Rotation angle in degrees

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/ARROW.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FillCircle
    Fill a circle with the current fill style

    FillCircle(x, y, radius)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of center
      numeric y
        Y coordinate of center
      numeric radius
        Radius of circle

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/ARROW.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FillEllipse
    Fill an ellipse with the current fill style

    FillEllipse(x, y, xradius, yradius, angle)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate of center
      numeric y
        Y coordinate of center
      numeric xradius
        X radius
      numeric yradius
        Y radius
      numeric angle (オプション)
        Angle to rotate ellipse

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    FillPolyLine
    Draw filled polyline with current fill mode

    FillPolyLine(x_points, y_points, NumPoints)

    場所:

      描画

    パラメータ:

      array x_points
        Array of x coordinates
      array y_points
        Array of y coordinates
      numeric NumPoints
        Number of points in array

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/ARROW.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FillRect
    Fill a rectangle with the current fill style

    FillRect(x, y, width, height, angle)

    場所:

      描画

    パラメータ:

      numeric x
        X value of lower left corner
      numeric y
        Y value of lower left corner
      numeric width
        Width of rectangle
      numeric height
        Height of rectangle
      numeric angle (オプション)
        Angle to rotate rectangle

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/elemsel.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FillRegion
    Fill a Region with the current fill style

    FillRegion(Region)

    場所:

      描画

    パラメータ:

    詳細と仮定

      islands in the Region are not filled

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GetColorPixel
    Return a pixel value given a color

    GetColorPixel(color)

    場所:

      描画

    パラメータ:

      class COLOR color
        The Color class

    戻り値

      numeric

    作成日時: 29-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetNamedColor
    Return a COLOR given a color name from rgb.txt

    GetNamedColor(name$)

    場所:

      描画

    パラメータ:

      string name$
        The color name

    戻り値

    作成日時: 30-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetNamedColorPixel
    Return a pixel value given a color name from rgb.txt

    GetNamedColorPixel(name$)

    場所:

      描画

    パラメータ:

      string name$
        The color name

    戻り値

      numeric

    作成日時: 29-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    LineStyleSetPoints
    Draw a line with the current line style

    LineStyleSetPoints(x_points, y_points, NumPoints)

    場所:

      描画

    パラメータ:

      array x_points
        X coordinates of points
      array y_points
        Y coordinates of points
      numeric NumPoints
        Number of points

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    LineStyleSetRect
    Draws a Rectangle with current line style

    LineStyleSetRect(rect)

    場所:

      描画

    パラメータ:

      class RECT rect
        The class RECT to draw

    戻り値

      なし

    作成日時: 21-Aug-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    LineStyleSetRegion
    Draws a Region with current line style

    LineStyleSetRegion(Region)

    場所:

      描画

    パラメータ:

      class REGION2D Region
        The Region to draw

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/NEATLINE.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    MoveTo
    Move pen

    MoveTo(x, y)

    場所:

      描画

    パラメータ:

      numeric x
        X coordinate to move to
      numeric y
        Y coordinate to move to

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/NEATLINE.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    SetColor
    Set color by color structure

    SetColor(color)

    場所:

      描画

    パラメータ:

      class color color
        The color to set

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    SetColorName
    Set color by name

    SetColorName(color$)

    場所:

      描画

    パラメータ:

      string color$
        The color to set

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/NEATLINE.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    SetColorRGB
    Set color by red, green, blue values

    SetColorRGB(red, green, blue, range)

    場所:

      描画

    パラメータ:

      numeric red
        Red value
      numeric green
        Green value
      numeric blue
        Blue value
      numeric range (オプション)
        Maximum range - default is 255

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    SetLineWidth
    Set the drawing line width

    SetLineWidth(width, units$)

    場所:

      描画

    パラメータ:

      numeric width
        Line width
      string units$ (オプション)
        Units (e.g. "mm")

    詳細と仮定

      line widths are always in page units - default is pixels

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/NEATLINE.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    AlignWidgets(widget1, widget2, ...)

    場所:

    パラメータ:

    戻り値

      なし

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    CloseViewHistogram
    Close a histogram

    CloseViewHistogram(histogram)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class HISTOGRAM histogram
        A valid histogram

    戻り値

      なし

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    CreateButtonRow
    Create a button row

    CreateButtonRow(parent, item, ...)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Parent of the button row
      class BUTTONITEM item
        First button item
      class BUTTONITEM ... (オプション)
        Additional button items

    戻り値

    作成日時: 20-Mar-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/PTCOORD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateDrawingArea
    Create a drawing area.

    CreateDrawingArea(parent, height, width)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Parent to attach drawing area to
      numeric height (オプション)
        Height of drawing area in pixels
      numeric width (オプション)
        Width of drawing area in pixels

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/elemsel.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateForm
    Create a form

    CreateForm(parent)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent Widget of this form

    戻り値

    作成日時: 24-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/Regstatp.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateFormDialog
    Create a form dialog to put widgets in.

    CreateFormDialog(name$, parent)

    場所:

      ウィジェット(Widget)

    パラメータ:

      string name$
        The dialog name
      class Widget parent (オプション)
        Parent of the form dialog

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # DIALOG1.SML
    # Sample script for Getting Started.
    # Creates and opens a simple dialog window.
    # Define parent widget for dialog window.
    class XmForm win1;
    # Procedure for closing window
    proc OnClose() {
           DialogClose(win1);
           DestroyWidget(win1);
           }
    # Set up dialog window
    win1 = CreateFormDialog("Hello World");
    win1.MarginHeight = 5;
    win1.MarginWidth = 5;
    # Create label text for window
    class XmLabel winLabel;
    winLabel = CreateLabel(win1,"Sample Dialog Window");
    winLabel.TopWidget = win1;
    winLabel.LeftWidget = win1;
    winLabel.LeftOffset = 10;
    winLabel.RightWidget = win1;
    winLabel.RightOffset = 10;
    # Create Close button attached to label on
    # on top and to window margin on left and right
    class XmPushButton closeButton;
    closeButton = CreatePushButton(win1,"Close");
    closeButton.TopWidget = winLabel;
    closeButton.TopOffset = 5;
    closeButton.leftWidget = win1;
    closeButton.rightWidget = win1;
    closeButton.bottomWidget = win1;
    # Could also use the generic AddCallback() function
    WidgetAddCallback(closeButton.ActivateCallback,OnClose);
    # Open dialog window and keep script active
    # until window is closed.
    DialogOpen(win1);
    DialogWaitForClose(win1); # Example of CreateFormDialog()
    


    CreateFrame
    Create a frame around widgets.

    CreateFrame(parent)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Widget to attach frame to

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateHorizontalSeparator
    Create a horizontal line on a dialog.

    CreateHorizontalSeparator(parent)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent dialog

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/elemsel.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateHTMLWidget
    Create an HTML widget

    CreateHTMLWidget(parent)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Parent widget

    戻り値

    作成日時: 17-Nov-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    CreateIconButtonRow
    Creates an icon button row

    CreateIconButtonRow(parent, item, ...)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Parent form for the icon button row
      class BUTTONITEM item
        The first button
      class BUTTONITEM ... (オプション)
        Additional buttons

    戻り値

    作成日時: 20-Mar-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/Regstatp.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateIconLabel
    Add an icon to a dialog.

    CreateIconLabel(parent, IconClass$, IconName$, ToolTip$)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent dialog
      string IconClass$
        The icon class
      string IconName$
        The icon name
      string ToolTip$ (オプション)
        The tooltip associated with this icon

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    CreateIconPushButton
    Add an icon pushbutton to a dialog.

    CreateIconPushButton(parent, IconClass$, IconName$, ToolTip$)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent dialog
      string IconClass$
        The icon class
      string IconName$
        The icon name
      string ToolTip$ (オプション)
        The tooltip associated with this icon

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/Regstatp.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateIconToggleButton
    Add an icon toggle button to a dialog.

    CreateIconToggleButton(parent, IconClass$, IconName$, ToolTip$)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent dialog
      string IconClass$
        The icon class
      string IconName$
        The icon name
      string ToolTip$ (オプション)
        The tooltip associated with this icon

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateLabel
    Create a label on a dialog.

    CreateLabel(parent, name$)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent dialog
      string name$
        The label

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # DIALOG1.SML
    # Sample script for Getting Started.
    # Creates and opens a simple dialog window.
    # Define parent widget for dialog window.
    class XmForm win1;
    # Procedure for closing window
    proc OnClose() {
           DialogClose(win1);
           DestroyWidget(win1);
           }
    # Set up dialog window
    win1 = CreateFormDialog("Hello World");
    win1.MarginHeight = 5;
    win1.MarginWidth = 5;
    # Create label text for window
    class XmLabel winLabel;
    winLabel = CreateLabel(win1,"Sample Dialog Window");
    winLabel.TopWidget = win1;
    winLabel.LeftWidget = win1;
    winLabel.LeftOffset = 10;
    winLabel.RightWidget = win1;
    winLabel.RightOffset = 10;
    # Create Close button attached to label on
    # on top and to window margin on left and right
    class XmPushButton closeButton;
    closeButton = CreatePushButton(win1,"Close");
    closeButton.TopWidget = winLabel;
    closeButton.TopOffset = 5;
    closeButton.leftWidget = win1;
    closeButton.rightWidget = win1;
    closeButton.bottomWidget = win1;
    # Could also use the generic AddCallback() function
    WidgetAddCallback(closeButton.ActivateCallback,OnClose);
    # Open dialog window and keep script active
    # until window is closed.
    DialogOpen(win1);
    DialogWaitForClose(win1); # Example of CreateFormDialog()
    


    CreateList
    Create an XmList widget

    CreateList(parent)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Parent widget to use

    戻り値

    作成日時: 10-Aug-2000
    修正日時: 10-Aug-2000
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    CreateMenuItem
    Create a menu item

    CreateMenuItem(name$, function)

    場所:

      ウィジェット(Widget)

    パラメータ:

      string name$
        The menu item name
      proc function
        Procedure associated with menu item

    戻り値

    作成日時: 16-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    CreateModalFormDialog
    Create a modal form dialog to put widgets in.

    CreateModalFormDialog(name$, parent)

    場所:

      ウィジェット(Widget)

    パラメータ:

      string name$
        The dialog name
      class Widget parent (オプション)
        The parent of the modal form dialog

    詳細と仮定

      modal dialogs block input to other forms until they are closed

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/View3d.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateOptionMenu
    Create an option menu

    CreateOptionMenu(parent, name$, item, ...)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Parent for the option menu
      string name$
        The option menu name
      class MENUITEM item
        First Menu item
      class MENUITEM ... (オプション)
        Additional menu items

    戻り値

    作成日時: 05-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    CreatePromptNum
    Create a prompt for numeric value.

    CreatePromptNum(parent, name$, width, places, default, min, max)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent dialog
      string name$
        The prompt dialog name
      numeric width (オプション)
        Number of digits
      numeric places (オプション)
        Number of decimal places to display
      numeric default (オプション)
        Default number to return if no number entered
      numeric min (オプション)
        Minimum allowed input
      numeric max (オプション)
        Maximum allowed input

    戻り値

    作成日時: 20-Mar-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreatePromptStr
    Create a prompt for string value.

    CreatePromptStr(parent, name$, width, default$)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent dialog
      string name$
        The prompt dialog name
      numeric width (オプション)
        Size of input field
      string default$ (オプション)
        The default string to return if none entered

    戻り値

    作成日時: 20-Mar-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreatePushButton
    Create a (text) pushbutton.

    CreatePushButton(parent, name$)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent dialog
      string name$
        The pushbutton name

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # DIALOG1.SML
    # Sample script for Getting Started.
    # Creates and opens a simple dialog window.
    # Define parent widget for dialog window.
    class XmForm win1;
    # Procedure for closing window
    proc OnClose() {
           DialogClose(win1);
           DestroyWidget(win1);
           }
    # Set up dialog window
    win1 = CreateFormDialog("Hello World");
    win1.MarginHeight = 5;
    win1.MarginWidth = 5;
    # Create label text for window
    class XmLabel winLabel;
    winLabel = CreateLabel(win1,"Sample Dialog Window");
    winLabel.TopWidget = win1;
    winLabel.LeftWidget = win1;
    winLabel.LeftOffset = 10;
    winLabel.RightWidget = win1;
    winLabel.RightOffset = 10;
    # Create Close button attached to label on
    # on top and to window margin on left and right
    class XmPushButton closeButton;
    closeButton = CreatePushButton(win1,"Close");
    closeButton.TopWidget = winLabel;
    closeButton.TopOffset = 5;
    closeButton.leftWidget = win1;
    closeButton.rightWidget = win1;
    closeButton.bottomWidget = win1;
    # Could also use the generic AddCallback() function
    WidgetAddCallback(closeButton.ActivateCallback,OnClose);
    # Open dialog window and keep script active
    # until window is closed.
    DialogOpen(win1);
    DialogWaitForClose(win1); # Example of CreateFormDialog()
    


    CreatePushButtonItem
    Create a button item.

    CreatePushButtonItem(name$, function)

    場所:

      ウィジェット(Widget)

    パラメータ:

      string name$
        The pushbutton name
      proc function
        Function associated with button

    戻り値

    作成日時: 16-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateRowColumn
    Creates a row/column form

    CreateRowColumn(parent, numColumns)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Parent form for the row/column form
      numeric numColumns (オプション)
        Number of columns in the row/column widget

    戻り値

    作成日時: 24-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/elemsel.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateScrolledList
    Create an XmScrolledWindow and XmList widget

    CreateScrolledList(parent)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Parent widget to use

    戻り値

    作成日時: 10-Aug-2000
    修正日時: 10-Aug-2000
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/URLS.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateScrolledWindow
    Creates a form with scroll bars

    CreateScrolledWindow(parent, ScrollingPolicy$)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Parent form for the scrolled window
      string ScrollingPolicy$ (オプション)
        Scrolling policy
        可能性のある値:
          "AUTOMATIC"
          "APPLICATION_DEFINED"

    戻り値

    作成日時: 29-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    CreateToggleButton
    Create a (text) toggle button.

    CreateToggleButton(parent, name$)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent dialog
      string name$
        The toggle button name

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/URLS.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateToggleButtonItem
    Create a toggle button item.

    CreateToggleButtonItem(name$, function)

    場所:

      ウィジェット(Widget)

    パラメータ:

      string name$
        The toggle button name
      proc function
        Function associated with toggle button

    戻り値

    作成日時: 16-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/Regstatp.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateToolTip
    Add a tooltip to a drawing area.

    CreateToolTip(widget, string$)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget widget
        The drawing area (e.g. view.DrawingArea)
      string string$
        The desired tooltip message

    戻り値

    作成日時: 20-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateUnitOptionMenu
    Create an option menu for selecting units

    CreateUnitOptionMenu(parent, name$, function, type, default)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        Parent widget to use
      string name$
        The unit option menu name
      proc function
        Procedure to call when the value is changed. The procedure will be
        passed two parameters: The option menu widget, and a string with
        name of the unit selected.
      numeric type
        Unit type
      numeric default
        Default unit number

    戻り値

    作成日時: 26-Sep-2000
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/Regstatp.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    CreateVerticalSeparator
    Create a vertical line on a dialog.

    CreateVerticalSeparator(parent)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget parent
        The parent dialog

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    CreateViewHistogram
    Pop up a histogram of a Raster with an optional Region.

    CreateViewHistogram(dialogname$, Raster, Region)

    場所:

      ウィジェット(Widget)

    パラメータ:

      string dialogname$
        The popup dialog name
      Raster Raster
        Raster object
      class REGION2D Region (オプション)
        Region object

    詳細と仮定

      if no Region is supplied the histogram is for the entire Raster

    戻り値

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    DestroyToolTip
    Destroy tooltip.

    DestroyToolTip(tooltip)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class TOOLTIP tooltip
        A valid tooltip

    戻り値

      なし

    作成日時: 20-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    DestroyWidget
    Destroy a widget.

    DestroyWidget(widget)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget widget
        The widget to destroy

    戻り値

      なし

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/Regstatp.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    DialogClose
    Close a dialog.

    DialogClose(dialog)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget dialog
        The dialog to close

    戻り値

      なし

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # DIALOG1.SML
    # Sample script for Getting Started.
    # Creates and opens a simple dialog window.
    # Define parent widget for dialog window.
    class XmForm win1;
    # Procedure for closing window
    proc OnClose() {
           DialogClose(win1);
           DestroyWidget(win1);
           }
    # Set up dialog window
    win1 = CreateFormDialog("Hello World");
    win1.MarginHeight = 5;
    win1.MarginWidth = 5;
    # Create label text for window
    class XmLabel winLabel;
    winLabel = CreateLabel(win1,"Sample Dialog Window");
    winLabel.TopWidget = win1;
    winLabel.LeftWidget = win1;
    winLabel.LeftOffset = 10;
    winLabel.RightWidget = win1;
    winLabel.RightOffset = 10;
    # Create Close button attached to label on
    # on top and to window margin on left and right
    class XmPushButton closeButton;
    closeButton = CreatePushButton(win1,"Close");
    closeButton.TopWidget = winLabel;
    closeButton.TopOffset = 5;
    closeButton.leftWidget = win1;
    closeButton.rightWidget = win1;
    closeButton.bottomWidget = win1;
    # Could also use the generic AddCallback() function
    WidgetAddCallback(closeButton.ActivateCallback,OnClose);
    # Open dialog window and keep script active
    # until window is closed.
    DialogOpen(win1);
    DialogWaitForClose(win1); # Example of CreateFormDialog()
    


    DialogFullScreen
    Sets dialog to full screen mode

    DialogFullScreen(dialog)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget dialog
        The dialog to set

    戻り値

      なし

    作成日時: 24-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    DialogOpen
    Open a dialog.

    DialogOpen(dialog)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget dialog
        The dialog to open

    戻り値

      なし

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # DIALOG1.SML
    # Sample script for Getting Started.
    # Creates and opens a simple dialog window.
    # Define parent widget for dialog window.
    class XmForm win1;
    # Procedure for closing window
    proc OnClose() {
           DialogClose(win1);
           DestroyWidget(win1);
           }
    # Set up dialog window
    win1 = CreateFormDialog("Hello World");
    win1.MarginHeight = 5;
    win1.MarginWidth = 5;
    # Create label text for window
    class XmLabel winLabel;
    winLabel = CreateLabel(win1,"Sample Dialog Window");
    winLabel.TopWidget = win1;
    winLabel.LeftWidget = win1;
    winLabel.LeftOffset = 10;
    winLabel.RightWidget = win1;
    winLabel.RightOffset = 10;
    # Create Close button attached to label on
    # on top and to window margin on left and right
    class XmPushButton closeButton;
    closeButton = CreatePushButton(win1,"Close");
    closeButton.TopWidget = winLabel;
    closeButton.TopOffset = 5;
    closeButton.leftWidget = win1;
    closeButton.rightWidget = win1;
    closeButton.bottomWidget = win1;
    # Could also use the generic AddCallback() function
    WidgetAddCallback(closeButton.ActivateCallback,OnClose);
    # Open dialog window and keep script active
    # until window is closed.
    DialogOpen(win1);
    DialogWaitForClose(win1); # Example of CreateFormDialog()
    


    DialogToBottom
    Moves dialog to bottom of visible windows

    DialogToBottom(dialog)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget dialog
        The dialog to set

    戻り値

      なし

    作成日時: 27-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    DialogToTop
    Moves dialog to top of visible windows

    DialogToTop(dialog)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget dialog
        The dialog to set

    戻り値

      なし

    作成日時: 27-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    DialogWaitForClose
    Wait for user to close given modal dialog.

    DialogWaitForClose(dialog)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget dialog
        The modal dialog

    戻り値

      なし

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # DIALOG1.SML
    # Sample script for Getting Started.
    # Creates and opens a simple dialog window.
    # Define parent widget for dialog window.
    class XmForm win1;
    # Procedure for closing window
    proc OnClose() {
           DialogClose(win1);
           DestroyWidget(win1);
           }
    # Set up dialog window
    win1 = CreateFormDialog("Hello World");
    win1.MarginHeight = 5;
    win1.MarginWidth = 5;
    # Create label text for window
    class XmLabel winLabel;
    winLabel = CreateLabel(win1,"Sample Dialog Window");
    winLabel.TopWidget = win1;
    winLabel.LeftWidget = win1;
    winLabel.LeftOffset = 10;
    winLabel.RightWidget = win1;
    winLabel.RightOffset = 10;
    # Create Close button attached to label on
    # on top and to window margin on left and right
    class XmPushButton closeButton;
    closeButton = CreatePushButton(win1,"Close");
    closeButton.TopWidget = winLabel;
    closeButton.TopOffset = 5;
    closeButton.leftWidget = win1;
    closeButton.rightWidget = win1;
    closeButton.bottomWidget = win1;
    # Could also use the generic AddCallback() function
    WidgetAddCallback(closeButton.ActivateCallback,OnClose);
    # Open dialog window and keep script active
    # until window is closed.
    DialogOpen(win1);
    DialogWaitForClose(win1); # Example of CreateFormDialog()
    


    DialogWaitForOpen
    Wait for a dialog to open

    DialogWaitForOpen(dialog)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget dialog
        Dialog to wait for

    詳細と仮定

      Waits for the given dialog to actually appear on the screen.

    戻り値

      なし

    作成日時: 12-May-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    SetPopupDialogParent
    Set the parent widget for popup dialogs

    SetPopupDialogParent(widget)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class Widget widget
        Parent widget to use

    戻り値

      なし

    作成日時: 14-Aug-2000
    修正日時: 14-Aug-2000
    TNTsml for Windows で使用可能: いいえ

    例:

    Unable to locate sample script "smlsamples/ToolScript/VPTOOL.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    UpdateViewHistogram
    Force update of histogram to current Region.

    UpdateViewHistogram(histogram, Region)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class HISTOGRAM histogram
        A valid histogram
      class REGION2D Region
        Region to create histogram from

    戻り値

      なし

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    # no sample necessary
    


    WidgetAddCallback
    Register function to call when an action happens on a widget.

    WidgetAddCallback(callback, function, data)

    場所:

      ウィジェット(Widget)

    パラメータ:

      class CALLBACKLIST callback
        A class member of type XmCallbackList
      proc function
        Function to call when action occurs
      class anything data (オプション)
        Data sent to function

    戻り値

      なし

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # DIALOG1.SML
    # Sample script for Getting Started.
    # Creates and opens a simple dialog window.
    # Define parent widget for dialog window.
    class XmForm win1;
    # Procedure for closing window
    proc OnClose() {
           DialogClose(win1);
           DestroyWidget(win1);
           }
    # Set up dialog window
    win1 = CreateFormDialog("Hello World");
    win1.MarginHeight = 5;
    win1.MarginWidth = 5;
    # Create label text for window
    class XmLabel winLabel;
    winLabel = CreateLabel(win1,"Sample Dialog Window");
    winLabel.TopWidget = win1;
    winLabel.LeftWidget = win1;
    winLabel.LeftOffset = 10;
    winLabel.RightWidget = win1;
    winLabel.RightOffset = 10;
    # Create Close button attached to label on
    # on top and to window margin on left and right
    class XmPushButton closeButton;
    closeButton = CreatePushButton(win1,"Close");
    closeButton.TopWidget = winLabel;
    closeButton.TopOffset = 5;
    closeButton.leftWidget = win1;
    closeButton.rightWidget = win1;
    closeButton.bottomWidget = win1;
    # Could also use the generic AddCallback() function
    WidgetAddCallback(closeButton.ActivateCallback,OnClose);
    # Open dialog window and keep script active
    # until window is closed.
    DialogOpen(win1);
    DialogWaitForClose(win1); # Example of CreateFormDialog()
    


    StatusContextCreate(handle)

    場所:

    パラメータ:

    詳細と仮定

      if handle is not passed then default handle is used

    戻り値

    作成日時: 20-May-1998
    修正日時: 20-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    ###
    ### Using Function Group
    ###
    class STATUSHANDLE statushandle;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statushandle = StatusDialogCreate();
    statuscontext = StatusContextCreate(statushandle);
    StatusSetMessage(statuscontext, "Starting...");
    # initialize progress bar
    StatusSetBar(statuscontext, 0, count);
    numeric percent = 0;
    numeric i;
    for i=1 to count
    {
           print(i);
           StatusSetBar(statuscontext, i, count);
           
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
    }
    StatusContextDestroy(statuscontext);
    StatusDialogDestroy(statushandle);
    ###
    ### Using Class Methods (Preferred)
    ###
    class STATUSDIALOG statusdialog;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statusdialog.Create();
    statuscontext = statusdialog.CreateContext();
    statuscontext.Message = "Starting...";
    # initialize progress bar
    statuscontext.BarInit(count,0);
    numeric percent;
    numeric i;
    for i=1 to count
    {
           print(i);
           statuscontext.BarIncrement(1,0);
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
           if (statusdialog.CheckCancel())
           {
                  print("Task Cancelled");
                  Exit();
           }
    }
    statusdialog.destroy();
    


    StatusContextDestroy
    Destroy a status context

    StatusContextDestroy(status)

    場所:

      ステータス

    パラメータ:

    戻り値

      なし

    作成日時: 20-May-1998
    修正日時: 20-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    ###
    ### Using Function Group
    ###
    class STATUSHANDLE statushandle;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statushandle = StatusDialogCreate();
    statuscontext = StatusContextCreate(statushandle);
    StatusSetMessage(statuscontext, "Starting...");
    # initialize progress bar
    StatusSetBar(statuscontext, 0, count);
    numeric percent = 0;
    numeric i;
    for i=1 to count
    {
           print(i);
           StatusSetBar(statuscontext, i, count);
           
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
    }
    StatusContextDestroy(statuscontext);
    StatusDialogDestroy(statushandle);
    ###
    ### Using Class Methods (Preferred)
    ###
    class STATUSDIALOG statusdialog;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statusdialog.Create();
    statuscontext = statusdialog.CreateContext();
    statuscontext.Message = "Starting...";
    # initialize progress bar
    statuscontext.BarInit(count,0);
    numeric percent;
    numeric i;
    for i=1 to count
    {
           print(i);
           statuscontext.BarIncrement(1,0);
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
           if (statusdialog.CheckCancel())
           {
                  print("Task Cancelled");
                  Exit();
           }
    }
    statusdialog.destroy();
    


    StatusDialogCreate
    Create a status dialog.

    StatusDialogCreate(parent, delay)

    場所:

      ステータス

    パラメータ:

      class Widget parent (オプション)
        The parent to attach the status dialog to
      numeric delay (オプション)
        Time delay for popping up the status. This keeps the
        dialog from displaying only briefly for short processes.

    戻り値

    作成日時: 23-Jan-1998
    修正日時: 12-Oct-2000
    TNTsml for Windows で使用可能: いいえ

    例:

    ###
    ### Using Function Group
    ###
    class STATUSHANDLE statushandle;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statushandle = StatusDialogCreate();
    statuscontext = StatusContextCreate(statushandle);
    StatusSetMessage(statuscontext, "Starting...");
    # initialize progress bar
    StatusSetBar(statuscontext, 0, count);
    numeric percent = 0;
    numeric i;
    for i=1 to count
    {
           print(i);
           StatusSetBar(statuscontext, i, count);
           
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
    }
    StatusContextDestroy(statuscontext);
    StatusDialogDestroy(statushandle);
    ###
    ### Using Class Methods (Preferred)
    ###
    class STATUSDIALOG statusdialog;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statusdialog.Create();
    statuscontext = statusdialog.CreateContext();
    statuscontext.Message = "Starting...";
    # initialize progress bar
    statuscontext.BarInit(count,0);
    numeric percent;
    numeric i;
    for i=1 to count
    {
           print(i);
           statuscontext.BarIncrement(1,0);
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
           if (statusdialog.CheckCancel())
           {
                  print("Task Cancelled");
                  Exit();
           }
    }
    statusdialog.destroy();
    


    StatusDialogDestroy
    Destroy a status dialog.

    StatusDialogDestroy(handle)

    場所:

      ステータス

    パラメータ:

      class STATUSHANDLE handle
        Handle of status dialog to destroy

    戻り値

      なし

    作成日時: 23-Jan-1998
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    ###
    ### Using Function Group
    ###
    class STATUSHANDLE statushandle;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statushandle = StatusDialogCreate();
    statuscontext = StatusContextCreate(statushandle);
    StatusSetMessage(statuscontext, "Starting...");
    # initialize progress bar
    StatusSetBar(statuscontext, 0, count);
    numeric percent = 0;
    numeric i;
    for i=1 to count
    {
           print(i);
           StatusSetBar(statuscontext, i, count);
           
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
    }
    StatusContextDestroy(statuscontext);
    StatusDialogDestroy(statushandle);
    ###
    ### Using Class Methods (Preferred)
    ###
    class STATUSDIALOG statusdialog;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statusdialog.Create();
    statuscontext = statusdialog.CreateContext();
    statuscontext.Message = "Starting...";
    # initialize progress bar
    statuscontext.BarInit(count,0);
    numeric percent;
    numeric i;
    for i=1 to count
    {
           print(i);
           statuscontext.BarIncrement(1,0);
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
           if (statusdialog.CheckCancel())
           {
                  print("Task Cancelled");
                  Exit();
           }
    }
    statusdialog.destroy();
    


    StatusSetBar
    Set the value of a status bar

    StatusSetBar(status, value, max)

    場所:

      ステータス

    パラメータ:

      class STATUSCONTEXT status
        The status bar to set
      numeric value (オプション)
        Value to set
      numeric max (オプション)
        Maximum value

    戻り値

      なし

    作成日時: 20-May-1998
    修正日時: 20-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    ###
    ### Using Function Group
    ###
    class STATUSHANDLE statushandle;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statushandle = StatusDialogCreate();
    statuscontext = StatusContextCreate(statushandle);
    StatusSetMessage(statuscontext, "Starting...");
    # initialize progress bar
    StatusSetBar(statuscontext, 0, count);
    numeric percent = 0;
    numeric i;
    for i=1 to count
    {
           print(i);
           StatusSetBar(statuscontext, i, count);
           
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
    }
    StatusContextDestroy(statuscontext);
    StatusDialogDestroy(statushandle);
    ###
    ### Using Class Methods (Preferred)
    ###
    class STATUSDIALOG statusdialog;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statusdialog.Create();
    statuscontext = statusdialog.CreateContext();
    statuscontext.Message = "Starting...";
    # initialize progress bar
    statuscontext.BarInit(count,0);
    numeric percent;
    numeric i;
    for i=1 to count
    {
           print(i);
           statuscontext.BarIncrement(1,0);
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
           if (statusdialog.CheckCancel())
           {
                  print("Task Cancelled");
                  Exit();
           }
    }
    statusdialog.destroy();
    


    StatusSetDefaultHandle
    Set the "current" status line.

    StatusSetDefaultHandle(handle)

    場所:

      ステータス

    パラメータ:

      class STATUSHANDLE handle
        Handle of status to set as "current"

    戻り値

      なし

    作成日時: 20-May-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    StatusSetMessage
    Set the text message for a status bar

    StatusSetMessage(status, string$)

    場所:

      ステータス

    パラメータ:

      class STATUSCONTEXT status
        The status bar to set
      string string$ (オプション)
        The message

    戻り値

      なし

    作成日時: 20-May-1998
    修正日時: 20-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    ###
    ### Using Function Group
    ###
    class STATUSHANDLE statushandle;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statushandle = StatusDialogCreate();
    statuscontext = StatusContextCreate(statushandle);
    StatusSetMessage(statuscontext, "Starting...");
    # initialize progress bar
    StatusSetBar(statuscontext, 0, count);
    numeric percent = 0;
    numeric i;
    for i=1 to count
    {
           print(i);
           StatusSetBar(statuscontext, i, count);
           
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
    }
    StatusContextDestroy(statuscontext);
    StatusDialogDestroy(statushandle);
    ###
    ### Using Class Methods (Preferred)
    ###
    class STATUSDIALOG statusdialog;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statusdialog.Create();
    statuscontext = statusdialog.CreateContext();
    statuscontext.Message = "Starting...";
    # initialize progress bar
    statuscontext.BarInit(count,0);
    numeric percent;
    numeric i;
    for i=1 to count
    {
           print(i);
           statuscontext.BarIncrement(1,0);
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
           if (statusdialog.CheckCancel())
           {
                  print("Task Cancelled");
                  Exit();
           }
    }
    statusdialog.destroy();
    


    WatershedClose(watershed)

    場所:

    パラメータ:

    戻り値

      なし

    作成日時: 28-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/FLOWPATH.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    WatershedCompute
    Computes different hydrological features depends on flags

    WatershedCompute(watershed, flags$)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      string flags$
        Flags
        可能性のある値:
          "None"
            No action flag
          "FillAllDepressions"
            Fill all depressions
          "FillUpperDepressions"
            Fill upper depressions that pour to selected set of depressions
          "FillLowerDepressions"
            Fill lower depressions that pour from selected set of depressions
          "FillDoubleDepressions"
            Fill only depressions that pour only to each other
          "FlowPath"
            Calculate flow paths in state without depressions
          "Basin"
            Calculate basins in state without depressions
          "Ridge"
            Calculate ridges in state without depressions
          "Database"
            Calculate attributes

    戻り値

      なし

    作成日時: 28-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/FLOWPATH.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    WatershedComputeElements
    Computes different hydrological elements as flow paths, basins, ridges depends on selected set of seed points and/or flags

    WatershedComputeElements(watershed, xValues, yValues, number, flags$)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      array xValues
        One dimensional array of x values
      array yValues
        One dimensional array of y values
      numeric number
        Number of values
      string flags$
        Flags
        可能性のある値:
          "None"
            No action flag
          "FillAllDepressions"
            Fill all depressions
          "FillUpperDepressions"
            Fill upper depressions that pour to selected set of depressions
          "FillLowerDepressions"
            Fill lower depressions that pour from selected set of depressions
          "FillDoubleDepressions"
            Fill only depressions that pour only to each other
          "FlowPath"
            Calculate flow paths in state without depressions
          "Basin"
            Calculate basins in state without depressions
          "Ridge"
            Calculate ridges in state without depressions
          "Database"
            Calculate attributes

    戻り値

      なし

    作成日時: 28-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/FLOWPATH.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    WatershedConvertRegionToMask
    Convert region given by filename and objectname to mask according an operation

    WatershedConvertRegionToMask(watershed, filename$, objname$, operation)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      string filename$
        RVC filename
      string objname$
        Object name
      numeric operation
        0 - exclude, otherwise - include

    戻り値

      なし

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedFillDepressions
    Fills depressions in different ways depends on selected set of watersheds with depressions and/or flags

    WatershedFillDepressions(watershed, depressions, number, flags$)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      array depressions
        One dimensional array of depressions
      numeric number
        Number of depressions
      string flags$
        Flags
        可能性のある値:
          "None"
            No action flag
          "FillAllDepressions"
            Fill all depressions
          "FillUpperDepressions"
            Fill upper depressions that pour to selected set of depressions
          "FillLowerDepressions"
            Fill lower depressions that pour from selected set of depressions
          "FillDoubleDepressions"
            Fill only depressions that pour only to each other
          "FlowPath"
            Calculate flow paths in state without depressions
          "Basin"
            Calculate basins in state without depressions
          "Ridge"
            Calculate ridges in state without depressions
          "Database"
            Calculate attributes

    戻り値

      なし

    作成日時: 28-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetBasin
    Get current basin value

    WatershedGetBasin(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetBranch
    Get current branch value

    WatershedGetBranch(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetIDOfWatershedPolygonForVectorPolygon
    Get watershed polygon ID in watershed system for given vector polygon element ID

    WatershedGetIDOfWatershedPolygonForVectorPolygon(watershed, index)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      numeric index
        Vector polygon element ID

    戻り値

      numeric

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetInlet
    Get current inlet value

    WatershedGetInlet(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetMask
    Get mask as filename and objname

    WatershedGetMask(watershed, filename$, objname$)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      string variable filename$
        RVC filename returned
      string variable objname$
        Object name returned

    戻り値

      なし

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetNumberOfDoublePours
    Get number of double pour points in watershed system

    WatershedGetNumberOfDoublePours(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetNumberOfObjects
    Get number of output objects that were calculated

    WatershedGetNumberOfObjects(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric

    作成日時: 28-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetNumberOfPours
    Get number of pour points in watershed system

    WatershedGetNumberOfPours(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetNumberOfVectorPolygons
    Get number of vector polygons in watershed system

    WatershedGetNumberOfVectorPolygons(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Watershed w;
    class WatershedPolygon poly;
    raster DEM;
    GetInputRaster(DEM);
    string demFilename$, demObjname$;
    numeric demInode;
    demFilename$ = GetObjectFileName(DEM);
    demInode = GetObjectNumber(DEM);
    demObjname$ = GetObjectName(demFilename$,demInode);
    # initialize the watershed object
    w = WatershedInit(demFilename$,demObjname$);
    # compute the watershed
    WatershedCompute(w,"FillAllDepressions,FlowPath,Ridge");
    poly = WatershedGetWatershedPolygon(w, WatershedGetNumberOfVectorPolygons(w)/2);
    print(WatershedGetStatus(w));
    print("Max Z:", WatershedPolygonGetMaxZ(poly));
    print("Min Z:", WatershedPolygonGetMinZ(poly));
    print("Lower Pours:", WatershedPolygonGetNumberOfLowerPours(poly));
    print("Upper Pours:", WatershedPolygonGetNumberOfUpperPours(poly));
    print("Has Depression:", WatershedPolygonHasDepression(poly));
    WatershedPolygonClose(poly);
    WatershedClose(w);
    


    WatershedGetNumberOfWatershedPolygons
    Get number of watershed polygons in watershed system

    WatershedGetNumberOfWatershedPolygons(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetNumberOfWatershedPolygonsWithDepression
    Get number of watershed polygons with depression in watershed system

    WatershedGetNumberOfWatershedPolygonsWithDepression(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetObject
    Get specified output object as filename and objname

    WatershedGetObject(watershed, output$, filename$, objname$)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      string output$
        Output ID
        可能性のある値:
          "RasterAdjusted"
            modified version of original DEM due by depressions filling
          "RasterExtrema"
            4-bits raster represents extrema values on original DEM
          "RasterFlowDirection"
            4-bits raster represents flow directionon adjusted DEM
          "RasterAccumulation"
            32-bits signed raster represents flow accumulation in number of cells in adjusted DEMnumber of cells in adjusted DEM
          "RasterWatershed"
            32-bits signed raster represents watershed area.
          "VectorWatershed"
            3D vector object is vector form of watershed raster
          "VectorFlowPath"
            3D vector object represents flow paths on DEM for automatically calaculated seed points
          "VectorBasin"
            3D vector object represents basins on DEM for automatically calaculated seed points
          "VectorRidge"
            3D vector object represents ridges on DEM
          "VectorUserFlowPath"
            3D vector object represents flow paths on DEM for user-defined seed points
          "VectorUserBasin"
            3D vector object represents basins on DEM foruser-defined seed points
      string variable filename$
        RVC filename returned
      string variable objname$
        Object name returned

    戻り値

      numeric

    作成日時: 31-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/FLOWPATH.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    WatershedGetOutlet
    Get current outlet value

    WatershedGetOutlet(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetPour
    Get pour object

    WatershedGetPour(watershed, index)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      numeric index
        Watershed polygon ID

    戻り値

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedGetStatus
    Get status of watershed process

    WatershedGetStatus(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      string

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Watershed w;
    class WatershedPolygon poly;
    raster DEM;
    GetInputRaster(DEM);
    string demFilename$, demObjname$;
    numeric demInode;
    demFilename$ = GetObjectFileName(DEM);
    demInode = GetObjectNumber(DEM);
    demObjname$ = GetObjectName(demFilename$,demInode);
    # initialize the watershed object
    w = WatershedInit(demFilename$,demObjname$);
    # compute the watershed
    WatershedCompute(w,"FillAllDepressions,FlowPath,Ridge");
    poly = WatershedGetWatershedPolygon(w, WatershedGetNumberOfVectorPolygons(w)/2);
    print(WatershedGetStatus(w));
    print("Max Z:", WatershedPolygonGetMaxZ(poly));
    print("Min Z:", WatershedPolygonGetMinZ(poly));
    print("Lower Pours:", WatershedPolygonGetNumberOfLowerPours(poly));
    print("Upper Pours:", WatershedPolygonGetNumberOfUpperPours(poly));
    print("Has Depression:", WatershedPolygonHasDepression(poly));
    WatershedPolygonClose(poly);
    WatershedClose(w);
    


    WatershedGetWatershedPolygon
    Get watershed polygon object

    WatershedGetWatershedPolygon(watershed, index)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      numeric index
        Watershed polygon ID

    戻り値

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Watershed w;
    class WatershedPolygon poly;
    raster DEM;
    GetInputRaster(DEM);
    string demFilename$, demObjname$;
    numeric demInode;
    demFilename$ = GetObjectFileName(DEM);
    demInode = GetObjectNumber(DEM);
    demObjname$ = GetObjectName(demFilename$,demInode);
    # initialize the watershed object
    w = WatershedInit(demFilename$,demObjname$);
    # compute the watershed
    WatershedCompute(w,"FillAllDepressions,FlowPath,Ridge");
    poly = WatershedGetWatershedPolygon(w, WatershedGetNumberOfVectorPolygons(w)/2);
    print(WatershedGetStatus(w));
    print("Max Z:", WatershedPolygonGetMaxZ(poly));
    print("Min Z:", WatershedPolygonGetMinZ(poly));
    print("Lower Pours:", WatershedPolygonGetNumberOfLowerPours(poly));
    print("Upper Pours:", WatershedPolygonGetNumberOfUpperPours(poly));
    print("Has Depression:", WatershedPolygonHasDepression(poly));
    WatershedPolygonClose(poly);
    WatershedClose(w);
    


    WatershedInit
    Initialize watershed (returns handle)

    WatershedInit(filename$, objname$)

    場所:

      流水解析

    パラメータ:

      string filename$
        RVC filename
      string objname$
        Object name

    戻り値

    作成日時: 28-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/FLOWPATH.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    WatershedIsValleySeparated
    Is valley set separated

    WatershedIsValleySeparated(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      numeric
      0 or 1

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedMaskInverseValue
    Inverse value for all cells in mask

    WatershedMaskInverseValue(watershed)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle

    戻り値

      なし

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedMaskSetValue
    Set value for all cells in mask

    WatershedMaskSetValue(watershed, value)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      numeric value
        Set value for all cells in mask

    戻り値

      なし

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPolygonClose
    Close an open watershed polygon handle

    WatershedPolygonClose(watershedpolygon)

    場所:

      流水解析

    パラメータ:

    戻り値

      なし

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Watershed w;
    class WatershedPolygon poly;
    raster DEM;
    GetInputRaster(DEM);
    string demFilename$, demObjname$;
    numeric demInode;
    demFilename$ = GetObjectFileName(DEM);
    demInode = GetObjectNumber(DEM);
    demObjname$ = GetObjectName(demFilename$,demInode);
    # initialize the watershed object
    w = WatershedInit(demFilename$,demObjname$);
    # compute the watershed
    WatershedCompute(w,"FillAllDepressions,FlowPath,Ridge");
    poly = WatershedGetWatershedPolygon(w, WatershedGetNumberOfVectorPolygons(w)/2);
    print(WatershedGetStatus(w));
    print("Max Z:", WatershedPolygonGetMaxZ(poly));
    print("Min Z:", WatershedPolygonGetMinZ(poly));
    print("Lower Pours:", WatershedPolygonGetNumberOfLowerPours(poly));
    print("Upper Pours:", WatershedPolygonGetNumberOfUpperPours(poly));
    print("Has Depression:", WatershedPolygonHasDepression(poly));
    WatershedPolygonClose(poly);
    WatershedClose(w);
    


    WatershedPolygonGetIDOfLowerPour
    Get ID of lower pour point by index

    WatershedPolygonGetIDOfLowerPour(watershedpolygon, index)

    場所:

      流水解析

    パラメータ:

      class WATERSHEDPOLYGON watershedpolygon
        A valid watershedpolygon handle
      numeric index
        Index

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPolygonGetIDOfUpperPour
    Get ID of upper pour point by index

    WatershedPolygonGetIDOfUpperPour(watershedpolygon, index)

    場所:

      流水解析

    パラメータ:

      class WATERSHEDPOLYGON watershedpolygon
        A valid watershedpolygon handle
      numeric index
        Index

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPolygonGetIDOfVectorPolygon
    Get element ID of vector polygon by index

    WatershedPolygonGetIDOfVectorPolygon(watershedpolygon, index)

    場所:

      流水解析

    パラメータ:

      class WATERSHEDPOLYGON watershedpolygon
        A valid watershedpolygon handle
      numeric index
        Index

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPolygonGetMaxZ
    Get maximum z value inside watershed

    WatershedPolygonGetMaxZ(watershedpolygon)

    場所:

      流水解析

    パラメータ:

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Watershed w;
    class WatershedPolygon poly;
    raster DEM;
    GetInputRaster(DEM);
    string demFilename$, demObjname$;
    numeric demInode;
    demFilename$ = GetObjectFileName(DEM);
    demInode = GetObjectNumber(DEM);
    demObjname$ = GetObjectName(demFilename$,demInode);
    # initialize the watershed object
    w = WatershedInit(demFilename$,demObjname$);
    # compute the watershed
    WatershedCompute(w,"FillAllDepressions,FlowPath,Ridge");
    poly = WatershedGetWatershedPolygon(w, WatershedGetNumberOfVectorPolygons(w)/2);
    print(WatershedGetStatus(w));
    print("Max Z:", WatershedPolygonGetMaxZ(poly));
    print("Min Z:", WatershedPolygonGetMinZ(poly));
    print("Lower Pours:", WatershedPolygonGetNumberOfLowerPours(poly));
    print("Upper Pours:", WatershedPolygonGetNumberOfUpperPours(poly));
    print("Has Depression:", WatershedPolygonHasDepression(poly));
    WatershedPolygonClose(poly);
    WatershedClose(w);
    


    WatershedPolygonGetMinZ
    Get minimum z value inside watershed

    WatershedPolygonGetMinZ(watershedpolygon)

    場所:

      流水解析

    パラメータ:

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Watershed w;
    class WatershedPolygon poly;
    raster DEM;
    GetInputRaster(DEM);
    string demFilename$, demObjname$;
    numeric demInode;
    demFilename$ = GetObjectFileName(DEM);
    demInode = GetObjectNumber(DEM);
    demObjname$ = GetObjectName(demFilename$,demInode);
    # initialize the watershed object
    w = WatershedInit(demFilename$,demObjname$);
    # compute the watershed
    WatershedCompute(w,"FillAllDepressions,FlowPath,Ridge");
    poly = WatershedGetWatershedPolygon(w, WatershedGetNumberOfVectorPolygons(w)/2);
    print(WatershedGetStatus(w));
    print("Max Z:", WatershedPolygonGetMaxZ(poly));
    print("Min Z:", WatershedPolygonGetMinZ(poly));
    print("Lower Pours:", WatershedPolygonGetNumberOfLowerPours(poly));
    print("Upper Pours:", WatershedPolygonGetNumberOfUpperPours(poly));
    print("Has Depression:", WatershedPolygonHasDepression(poly));
    WatershedPolygonClose(poly);
    WatershedClose(w);
    


    WatershedPolygonGetNumberOfLowerPours
    Get number of lower pours in watershed

    WatershedPolygonGetNumberOfLowerPours(watershedpolygon)

    場所:

      流水解析

    パラメータ:

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Watershed w;
    class WatershedPolygon poly;
    raster DEM;
    GetInputRaster(DEM);
    string demFilename$, demObjname$;
    numeric demInode;
    demFilename$ = GetObjectFileName(DEM);
    demInode = GetObjectNumber(DEM);
    demObjname$ = GetObjectName(demFilename$,demInode);
    # initialize the watershed object
    w = WatershedInit(demFilename$,demObjname$);
    # compute the watershed
    WatershedCompute(w,"FillAllDepressions,FlowPath,Ridge");
    poly = WatershedGetWatershedPolygon(w, WatershedGetNumberOfVectorPolygons(w)/2);
    print(WatershedGetStatus(w));
    print("Max Z:", WatershedPolygonGetMaxZ(poly));
    print("Min Z:", WatershedPolygonGetMinZ(poly));
    print("Lower Pours:", WatershedPolygonGetNumberOfLowerPours(poly));
    print("Upper Pours:", WatershedPolygonGetNumberOfUpperPours(poly));
    print("Has Depression:", WatershedPolygonHasDepression(poly));
    WatershedPolygonClose(poly);
    WatershedClose(w);
    


    WatershedPolygonGetNumberOfUpperPours
    Get number of upper pours in watershed

    WatershedPolygonGetNumberOfUpperPours(watershedpolygon)

    場所:

      流水解析

    パラメータ:

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Watershed w;
    class WatershedPolygon poly;
    raster DEM;
    GetInputRaster(DEM);
    string demFilename$, demObjname$;
    numeric demInode;
    demFilename$ = GetObjectFileName(DEM);
    demInode = GetObjectNumber(DEM);
    demObjname$ = GetObjectName(demFilename$,demInode);
    # initialize the watershed object
    w = WatershedInit(demFilename$,demObjname$);
    # compute the watershed
    WatershedCompute(w,"FillAllDepressions,FlowPath,Ridge");
    poly = WatershedGetWatershedPolygon(w, WatershedGetNumberOfVectorPolygons(w)/2);
    print(WatershedGetStatus(w));
    print("Max Z:", WatershedPolygonGetMaxZ(poly));
    print("Min Z:", WatershedPolygonGetMinZ(poly));
    print("Lower Pours:", WatershedPolygonGetNumberOfLowerPours(poly));
    print("Upper Pours:", WatershedPolygonGetNumberOfUpperPours(poly));
    print("Has Depression:", WatershedPolygonHasDepression(poly));
    WatershedPolygonClose(poly);
    WatershedClose(w);
    


    WatershedPolygonGetNumberOfVectorPolygons
    Get number of vector polygons in watershed

    WatershedPolygonGetNumberOfVectorPolygons(watershedpolygon)

    場所:

      流水解析

    パラメータ:

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPolygonGetZ
    Get minimum z value on watershed boundary

    WatershedPolygonGetZ(watershedpolygon)

    場所:

      流水解析

    パラメータ:

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPolygonHasDepression
    Does watershed polygon have a depression

    WatershedPolygonHasDepression(watershedpolygon)

    場所:

      流水解析

    パラメータ:

    戻り値

      string
      'true' or 'false'

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class Watershed w;
    class WatershedPolygon poly;
    raster DEM;
    GetInputRaster(DEM);
    string demFilename$, demObjname$;
    numeric demInode;
    demFilename$ = GetObjectFileName(DEM);
    demInode = GetObjectNumber(DEM);
    demObjname$ = GetObjectName(demFilename$,demInode);
    # initialize the watershed object
    w = WatershedInit(demFilename$,demObjname$);
    # compute the watershed
    WatershedCompute(w,"FillAllDepressions,FlowPath,Ridge");
    poly = WatershedGetWatershedPolygon(w, WatershedGetNumberOfVectorPolygons(w)/2);
    print(WatershedGetStatus(w));
    print("Max Z:", WatershedPolygonGetMaxZ(poly));
    print("Min Z:", WatershedPolygonGetMinZ(poly));
    print("Lower Pours:", WatershedPolygonGetNumberOfLowerPours(poly));
    print("Upper Pours:", WatershedPolygonGetNumberOfUpperPours(poly));
    print("Has Depression:", WatershedPolygonHasDepression(poly));
    WatershedPolygonClose(poly);
    WatershedClose(w);
    


    WatershedPolygonIsValid
    Is watershed polygon valid

    WatershedPolygonIsValid(watershedpolygon)

    場所:

      流水解析

    パラメータ:

    戻り値

      string

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPourClose
    Close an open watershed pour handle

    WatershedPourClose(watershedpour)

    場所:

      流水解析

    パラメータ:

    戻り値

      なし

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPourGetElementIDOfVectorPoint
    Get element ID of vector point

    WatershedPourGetElementIDOfVectorPoint(watershedpour)

    場所:

      流水解析

    パラメータ:

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPourGetLeftWatershed
    Get left watershed ID

    WatershedPourGetLeftWatershed(watershedpour)

    場所:

      流水解析

    パラメータ:

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPourGetPoint
    Get location of pour point as POINT3D in original DEM coordinates

    WatershedPourGetPoint(watershedpour)

    場所:

      流水解析

    パラメータ:

    戻り値

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPourGetRightWatershed
    Get right watershed ID

    WatershedPourGetRightWatershed(watershedpour)

    場所:

      流水解析

    パラメータ:

    戻り値

      numeric

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPourGetType
    Get type of pour

    WatershedPourGetType(watershedpour)

    場所:

      流水解析

    パラメータ:

    戻り値

      string

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedPourIsValid
    Is pour valid

    WatershedPourIsValid(watershedpour)

    場所:

      流水解析

    パラメータ:

    戻り値

      string

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedSetBasin
    Set value as current basin value

    WatershedSetBasin(watershed, value)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      numeric value
        Value to be set as current basin value

    戻り値

      なし

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedSetBranch
    Set value as current branch value

    WatershedSetBranch(watershed, value)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      numeric value
        Value to be set as current branch value

    戻り値

      なし

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedSetInlet
    Set value as current inlet value

    WatershedSetInlet(watershed, value)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      numeric value
        Value to be set as current inlet value

    戻り値

      なし

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedSetMask
    Set mask from extrnal binary raster by filename and objname

    WatershedSetMask(watershed, filename$, objname$)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      string filename$
        RVC filename
      string objname$
        Object name

    戻り値

      なし

    作成日時: 30-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedSetOutlet
    Set value as current outlet value

    WatershedSetOutlet(watershed, value)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      numeric value
        Value to be set as current outlet value

    戻り値

      なし

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    WatershedSetValleySeparation
    Set valley separation by given value

    WatershedSetValleySeparation(watershed, value)

    場所:

      流水解析

    パラメータ:

      class WATERSHED watershed
        A valid watershed handle
      numeric value
        Separation value to be set as current

    戻り値

      なし

    作成日時: 29-Aug-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    SurfaceFitBidirectional(Vector, Raster, AcrossLineMethod$, AlongLineMethod$, DirectionType$, Direction, SelectLines$, ValueLines$, RefRaster)

    場所:

    パラメータ:

      Vector Vector
        Input Vector
      Raster Raster
        Input Raster
      string AcrossLineMethod$
        Across line method
        可能性のある値:
          "Linear"
            Linear interpolation
          "Cubic BSpline"
            Cubic BSpline interpolation
          "Bezier Spline"
            Bezier Spline interpolation
      string AlongLineMethod$
        Along line method
        可能性のある値:
          "Linear"
            Linear interpolation
          "Cubic BSpline"
            Cubic BSpline interpolation
          "Bezier Spline"
            Bezier Spline interpolation
      string DirectionType$ (オプション)
        Direction type
        可能性のある値:
          "Manual"
            Manual direction mode
          "Automatic"
            Automatic direction mode
      numeric Direction (オプション)
        Direction
      string SelectLines$ (オプション)
        Query
      string ValueLines$ (オプション)
        Query
      Raster RefRaster (オプション)
        Reference raster. Output will match size and georeference

    戻り値

      なし

    作成日時: 09-Apr-1999
    修正日時: 09-Mar-2000
    TNTsml for Windows で使用可能: はい

    例:

    # Example of SurfaceFitBidirectional()
    vector V;
    raster R;
    class Georef georef;
    GetInputVector(V);
    georef = GetLastUsedGeorefObject(V);
    CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
    "Bidirectional", "SML Surface Modeling", 30, 30,
    "16-bit unsigned", georef);
    string acrossLineMethod$ = "Linear";
    string alongLineMethod$ = "Linear";
    string directionType$ = "Automatic";
    numeric direction = 0.0; # not used if Automatic mode
    string selectLines$ = "";
    string valueLines$ = "";
    SurfaceFitBidirectional(V, R, acrossLineMethod$, alongLineMethod$,
    directionType$, direction, selectLines$, valueLines$);
    CloseRaster(R);
    CloseVector(V);
    


    SurfaceFitInverseDistance
    Surface fit by inverse distance method

    SurfaceFitInverseDistance(Vector, Raster, usePoints, useLines, SearchMethod$, SearchDistance, WeightPower, SelectPoints$, SelectLines$, ValuePoints$, ValueLines$, RefRaster)

    場所:

      地表面(サーフェス)フィッティング

    パラメータ:

      Vector Vector
        Input Vector
      Raster Raster
        Input Raster
      numeric usePoints
        Boolean - if true use all points or select by query
      numeric useLines
        Boolean - if true use all lines or select by query
      string SearchMethod$ (オプション)
        Search method for inverse distance
        可能性のある値:
          "Circle"
            Circular search area
          "Square"
            Square search area
          "Diamond"
            Diamond search area
      numeric SearchDistance (オプション)
        Search distance/radius in output raster cells
      numeric WeightPower (オプション)
        Weighting power for inverse distance averaging
      string SelectPoints$ (オプション)
        Query
      string SelectLines$ (オプション)
        Query
      string ValuePoints$ (オプション)
        Query
      string ValueLines$ (オプション)
        Query
      Raster RefRaster (オプション)
        Reference raster. Output will match size and georeference

    戻り値

      なし

    作成日時: 09-Apr-1999
    修正日時: 09-Mar-2000
    TNTsml for Windows で使用可能: はい

    例:

    # Example of SurfaceFitInverseDistance()
    raster R;
    vector V;
    class Georef georef;
    GetInputVector(V);
    georef = GetLastUsedGeorefObject(V);
    CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
    "InvDist", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef);
    R = 0; # zero out the Raster
    numeric usePoints, useLines, searchDist, weightPower;
    string searchMethod$, selectPoints$, selectLines$, valuePoints$, valueLines$;
    usePoints = 1;
    useLines = 0;
    searchMethod$ = "Circle";
    searchDist = 40.0;
    weightPower = 2.0;
    selectPoints$ = "";
    selectLines$  = "";
    valuePoints$ = "";
    valueLines$ = "";
    SurfaceFitInverseDistance(V, R, usePoints, useLines,
    searchMethod$, searchDist, weightPower,
    selectPoints$, selectLines$, valuePoints$, valueLines$);
    CloseRaster(R);
    CloseVector(V);
    


    SurfaceFitMinimumCurvature
    Surface fit by minimum curvature method

    SurfaceFitMinimumCurvature(Vector, Raster, usePoints, useLines, searchMethod$, searchDistance, weightPower, tension, selectPoints$, selectLines$, valuePoints$, valueLines$, RefRaster)

    場所:

      地表面(サーフェス)フィッティング

    パラメータ:

      Vector Vector
        Input Vector
      Raster Raster
        Input Raster
      numeric usePoints
        Boolean - if true use all points or select by query
      numeric useLines
        Boolean - if true use all lines or select by query
      string searchMethod$ (オプション)
        Search Method
        可能性のある値:
          "Circle"
            Circular search area
          "Square"
            Square search area
          "Diamond"
            Diamond search area
      numeric searchDistance (オプション)
        Search distance/radius in output raster cells
      numeric weightPower (オプション)
        Weighting power for inverse distance averaging
      numeric tension (オプション)
        Tension parameter for splines with tension
      string selectPoints$ (オプション)
        Point selection query
      string selectLines$ (オプション)
        Line selection query
      string valuePoints$ (オプション)
        Point value query
      string valueLines$ (オプション)
        Line value query
      Raster RefRaster (オプション)
        Reference raster. Output will match size and georeference

    戻り値

      なし

    作成日時: 09-Apr-1999
    修正日時: 09-Mar-2000
    TNTsml for Windows で使用可能: はい

    例:

    # Example of SurfaceFitMinimumCurvature()
    vector V;
    raster R;
    class Georef georef;
    raster R;
    GetInputVector(V);
    georef = GetLastUsedGeorefObject(V);
    CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
    "MinCurve", "SML Surface Modeling", 30, 30,
    "16-bit unsigned", georef);
    R = 0; # zero out the Raster
    numeric usePoints, useLines, searchDist, weightPower, tension;
    string searchMethod$, selectPoints$, selectLines$, valuePoints$, valueLines$;
    usePoints = 1;
    useLines = 0;
    searchMethod$ = "Circle";
    searchDist = 30.0;
    weightPower = 2.0;
    tension = 0.0;
    selectPoints$ = "";
    selectLines$  = "";
    valuePoints$ = "";
    valueLines$ = "";
    SurfaceFitMinimumCurvature(V, R, usePoints, useLines,
    searchMethod$, searchDist, weightPower, tension,
    selectPoints$, selectLines$, valuePoints$, valueLines$);
    CloseRaster(R);
    CloseVector(V);
    


    SurfaceFitPolynomial
    Surface fit by polynomial method

    SurfaceFitPolynomial(Vector, Raster, usePoints, useLines, PolynomialOrder, SelectPoints$, SelectLines$, ValuePoints$, ValueLines$, RefRaster)

    場所:

      地表面(サーフェス)フィッティング

    パラメータ:

      Vector Vector
        Input Vector
      Raster Raster
        Input Raster
      numeric usePoints
        Boolean - if true use all points or select by query
      numeric useLines
        Boolean - if true use all lines or select by query
      numeric PolynomialOrder
        Order of polynomial
      string SelectPoints$ (オプション)
        Query
      string SelectLines$ (オプション)
        Query
      string ValuePoints$ (オプション)
        Query
      string ValueLines$ (オプション)
        Query
      Raster RefRaster (オプション)
        Reference raster. Output will match size and georeference

    戻り値

      なし

    作成日時: 09-Apr-1999
    修正日時: 09-Mar-2000
    TNTsml for Windows で使用可能: はい

    例:

    # Example of SurfaceFitPolynomial()
    class Vector V;
    class Raster R;
    class Georef georef;
    GetInputVector(V);
    georef = GetLastUsedGeorefObject(V);
    CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
    "Poly", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef);
    R = 0; # zero out the Raster
    numeric polyOrder = 3;
    numeric usePoints = 1;
    numeric useLines = 0;
    string selectPoints$ = "";
    string selectLines$  = "";
    string valuePoints$ = "";
    string valueLines$ = "";
    SurfaceFitPolynomial(V, R, usePoints, useLines,  polyOrder,
    selectPoints$, selectLines$, valuePoints$, valueLines$);
    CloseRaster(R);
    CloseVector(V);
    


    SurfaceFitProfiles
    Surface fit by profiles method

    SurfaceFitProfiles(Vector, Raster, usePoints, useLines, SearchDistance, SelectPoints$, SelectLines$, ValuePoints$, ValueLines$, RefRaster)

    場所:

      地表面(サーフェス)フィッティング

    パラメータ:

      Vector Vector
        Input Vector
      Raster Raster
        Input Raster
      numeric usePoints
        Boolean - if true use all points or select by query
      numeric useLines
        Boolean - if true use all lines or select by query
      numeric SearchDistance (オプション)
        Search distance/radius in output raster cells
      string SelectPoints$ (オプション)
        Query
      string SelectLines$ (オプション)
        Query
      string ValuePoints$ (オプション)
        Query
      string ValueLines$ (オプション)
        Query
      Raster RefRaster (オプション)
        Reference raster. Output will match size and georeference

    戻り値

      なし

    作成日時: 09-Apr-1999
    修正日時: 09-Mar-2000
    TNTsml for Windows で使用可能: はい

    例:

    # Example of SurfaceFitProfiles()
    vector V;
    raster R;
    class Georef georef;
    GetInputVector(V);
    georef = GetLastUsedGeorefObject(V);
    CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
    "Profile", "SML Surface Modeling", 30, 30,
    "16-bit unsigned", georef);
    R = 0; # zero out the Raster
    numeric searchDist = 130.0;
    numeric usePoints, useLines;
    usePoints = 0;
    useLines = 1;
    string selectPoints$ = "";
    string selectLines$  = "";
    string valuePoints$ = "";
    string valueLines$ = "";
    SurfaceFitProfiles(V, R, usePoints, useLines, searchDist,
    selectPoints$, selectLines$, valuePoints$, valueLines$);
    CloseRaster(R);
    CloseVector(V);
    


    SurfaceFitTINLinear
    Surface fit TIN by linear method

    SurfaceFitTINLinear(TIN, Raster, SelectPoints$, ValuePoints$, RefRaster)

    場所:

      地表面(サーフェス)フィッティング

    パラメータ:

      TIN TIN
        Input TIN
      Raster Raster
        Input Raster
      string SelectPoints$ (オプション)
        Query
      string ValuePoints$ (オプション)
        Query
      Raster RefRaster (オプション)
        Reference raster. Output will match size and georeference

    戻り値

      なし

    作成日時: 09-Apr-1999
    修正日時: 09-Mar-2000
    TNTsml for Windows で使用可能: はい

    例:

    # Example of SurfaceFitTINLinear()
    tin T;
    raster R;
    class Georef georef;
    GetInputTIN(T);
    georef = GetLastUsedGeorefObject(T);
    CreateRasterFromObject(T, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
    "TINLinear", "SML Surface Modeling", 30, 30,
    "16-bit unsigned", georef);
    R = 0; # zero out the Raster
    SurfaceFitTINLinear(T, R);
    CloseRaster(R);
    


    SurfaceFitTINQuintic
    Surface fit TIN by quintic method

    SurfaceFitTINQuintic(TIN, Raster, SelectPoints$, ValuePoints$, RefRaster)

    場所:

      地表面(サーフェス)フィッティング

    パラメータ:

      TIN TIN
        Input TIN
      Raster Raster
        Input Raster
      string SelectPoints$ (オプション)
        Query
      string ValuePoints$ (オプション)
        Query
      Raster RefRaster (オプション)
        Reference raster. Output will match size and georeference

    戻り値

      なし

    作成日時: 09-Apr-1999
    修正日時: 09-Mar-2000
    TNTsml for Windows で使用可能: はい

    例:

    # Example of SurfaceFitTINQuintic()
    tin T;
    raster R;
    class Georef georef;
    GetInputTIN(T);
    georef = GetLastUsedGeorefObject(T);
    CreateRasterFromObject(T, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
    "TINQuintic", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef);
    SurfaceFitTINQuintic(T, R);
    CloseRaster(R);
    


    SurfaceFitTriangulation
    Surface fit by triangulation method

    SurfaceFitTriangulation(Vector, Raster, usePoints, useLines, Tolerance, SelectPoints$, SelectLines$, ValuePoints$, ValueLines$, RefRaster)

    場所:

      地表面(サーフェス)フィッティング

    パラメータ:

      Vector Vector
        Input Vector
      Raster Raster
        Input Raster
      numeric usePoints
        Boolean - if true use all points or select by query
      numeric useLines
        Boolean - if true use all lines or select by query
      numeric Tolerance
        Tolerance
      string SelectPoints$ (オプション)
        Query
      string SelectLines$ (オプション)
        Query
      string ValuePoints$ (オプション)
        Query
      string ValueLines$ (オプション)
        Query
      Raster RefRaster (オプション)
        Reference raster. Output will match size and georeference

    戻り値

      numeric

    作成日時: 09-Apr-1999
    修正日時: 06-Mar-2002
    TNTsml for Windows で使用可能: はい

    例:

    # Example of SurfaceFitTriangulation()
    vector V;
    raster R;
    class Georef georef;
    GetInputVector(V);
    georef = GetLastUsedGeorefObject(V);
    CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
    "Triangle", "SML Surface Modeling", 30, 30,
    "16-bit unsigned", georef);
    R = 0; # zero out the Raster
    numeric usePoints, useLines, tolerance;
    tolerance = 0.0;
    usePoints = 1;
    useLines = 0;
    string selectPoints$ = "";
    string selectLines$  = "";
    string valuePoints$ = "";
    string valueLines$ = "";
    SurfaceFitTriangulation(V, R, usePoints, useLines, tolerance,
    selectPoints$, selectLines$, valuePoints$, valueLines$);
    CloseRaster(R);
    CloseVector(V);
    


    LineStyleAddToOptimizer(xstart, ystart, xlast, ylast, rank, dooptimize, dodelete)

    場所:

    パラメータ:

      numeric xstart
        The label's minimum x extent (on left edge)
      numeric ystart
        The label's minimum y extent (on lower edge)
      numeric xlast
        The label's maximum x extent (on right edge)
      numeric ylast
        The label's maximum y extent (on upper edge)
      numeric rank (オプション)
        Label's rank (any number), the label's importance increases with this value
      numeric dooptimize (オプション)
        A value of 0 limits changes in label position to a single pass through the point labels.
      numeric dodelete (オプション)
        Turn label deletion on (1) or off (0)

    詳細と仮定

      This function tabulates the extents of each point label's bounding rectangle. Values for xstart and ystart can be read or computed from the point coordinates in the Internal table. Values for xlast and ylast can be computed from the starting coordinates and the height and length of the text string (the length can obtained using the LineStyleTextNextPosition() function). After all points have been processed, the optimizer deletes conflicting labels or moves them to alternate positions around the point, then calls a function called FuncDrawLabel()to draw the labels. The script must include a definition for this function that contains all necessary drawing instructions, including font, color, and height of the labels, and the LineStyleDrawText() or LineStyleDrawTextBox() function. The FuncDrawLabel() function cannot directly access variable values defined in the main body of the script (such as the rank parameter); all variables required for drawing labels must be defined independently in the function definition.

    戻り値

      numeric
      An error code less then 0 or 0

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Optimize placement of text labels with
    # names of towns for vector points.
    # Use three rank classes based on population
    # to control optimization and to vary height
    # and color of label text.
    # Label sizes for three sizes of towns
    small = 2500; med = 3500; big = 4500;
    # Rank towns by population
    pop = TownData.POP90;
    if (pop < 1000) then {
           rank = 1; height = small;
           }
    else {
           if (pop >= 30000 ) then { 
           rank = 3; height = big;
           }
           else {
                  rank = 2; height = med;
                  }
           }
    # Draw circle with size based on rank
    radius = rank * 500;
    LineStyleSetColor(255,0,0);
    LineStyleDrawCircle(radius,1);
    # Read label text and determine dimensions
    LineStyleSetFont("ARIALBD.TTF");
    LineStyleTextNextPosition(TownData.NAME,height,0,0,next_x,next_y,length);
    # Define parameters for optimization
    xstart = Internal.x; ystart  = Internal.y;
    xlast = xstart + length; ylast = ystart + height;
    dooptimize = 1; dodelete = 0;
    LineStyleAddToOptimizer(xstart,ystart,xlast,ylast,rank,dooptimize,dodelete);
    # Define required function to draw labels after optimization
    func FuncDrawLabel() {
           small = 2500; med = 3500; big = 4500;
           pop = TownData.POP90;
           if (pop < 1000) then {
                  height = small; LineStyleSetTextColor(0,0,0);
                  }
           else {
           if (pop >= 30000 ) then { 
                  height = big;
                  LineStyleSetTextColor(255,0,0);
                  }
                  else {
                         height = med;
                         LineStyleSetTextColor(0,0,255);
                         }
                  }
           LineStyleSetFont("ARIALBD.TTF");
           LineStyleDrawText(TownData.NAME,height,0,0);
           }
    


    LineStyleDrawArc
    Draw an arc centered at location referenced from current position

    LineStyleDrawArc(angle, dist, radius_x, radius_y, startangle, sweepangle, rotangle, isAngleAbs, closemode, dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle
        Angle to the center point of the arc in degrees
      numeric dist
        Distance to the center point of the arc
      numeric radius_x
        X radius of ellipse (BEFORE ROTATION)
      numeric radius_y
        Y radius of ellipse (BEFORE ROTATION)
      numeric startangle
        Starting angle in degrees
      numeric sweepangle
        Sweep angle in degrees
      numeric rotangle
        Rotation angle in degrees
      numeric isAngleAbs (オプション)
        Is the starting angle absolute (0 default)
      numeric closemode (オプション)
        0 - no close, 1 - close arc, 2 - close arc via center point
      numeric dofill (オプション)
        Set to 1 to fill the arc, 0 otherwise (0 default)

    詳細と仮定

      This function tabulates the extents of each point label's bounding rectangle. Values for xstart and ystart can be read or computed from the point coordinates in the Internal table. Values for xlast and ylast can be computed from the starting coordinates and the height and length of the text string (the length can obtained using the LineStyleTextNextPosition() function). After all points have been processed, the optimizer deletes conflicting labels or moves them to alternate positions around the point, then calls a function called FuncDrawLabel()to draw the labels. The script must include a definition for this function that contains all necessary drawing instructions, including font, color, and height of the labels, and the LineStyleDrawText() or LineStyleDrawTextBox() function. The FuncDrawLabel() function cannot directly access variable values defined in the main body of the script (such as the rank parameter); all variables required for drawing labels must be defined independently in the function definition.

    戻り値

      numeric
      An error code less then 0 or 0

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw filled elliptical 90 degree arc starting at 60 degrees
    # and centered 45 degrees and 10 units from current position
    numeric angle = 45, dist = 10, radius_x = 10, radius_y = 15, startangle = 60;
    numeric sweepangle = 90, rotangle = 0, isAngleAbs = 0, closemode = 1, dofill = 1;
    LineStyleSetColor(0,0,0);
    LineStyleDrawArc(angle, dist, radius_x, radius_y, startangle, sweepangle, rotangle, isAngleAbs, closemode, dofill);
    


    LineStyleDrawArrow
    Draw an arrow from current position to specified point

    LineStyleDrawArrow(angle, dist, length, sweepangle, dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle
        The angle to draw the arrow
      numeric dist
        The distance from start to end point
      numeric length
        The length of the arrow 'wings'
      numeric sweepangle
        Sweep angle in degrees
      numeric dofill (オプション)
        Set to 1 to fill the arrow, 0 otherwise (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing, and is left at the tip of the arrow after drawing. Angles and directions refer to the current local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw black arrow 10 units long to 45 degrees, head lines 4 units long,
    # with 40 degree sweepangle and head filled
    numeric angle = 45, dist = 10, length = 4, sweepangle = 40, dofill = 1;
    LineStyleSetColor(0,0,0);
    LineStyleDrawArrow(angle, dist, length, sweepangle, dofill);
    


    LineStyleDrawCircle
    Draw a circle centered on the current position

    LineStyleDrawCircle(radius, dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric radius
        The radius in object coordinates
      numeric dofill (オプション)
        Set to 1 to fill the circle, 0 otherwise (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing, and is left at the center of the circle after drawing.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw a filled red circle with a radius of 10 units
    numeric radius = 10, dofill = 1;
    LineStyleSetColor(255,0,0);
    LineStyleDrawCircle(radius, dofill);
    


    LineStyleDrawCone
    Draw a cone with the specified dimensions and fill color

    LineStyleDrawCone(long_axis, short_axis, height, color_red, color_green, color_blue)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric long_axis
        The length of the long axis
      numeric short_axis
        The length of the short axis
      numeric height
        The height of the cone
      numeric color_red
        The red color component (0-1)
      numeric color_green
        The green color component (0-1)
      numeric color_blue
        The blue color component (0-1)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The center of the basal ellipse is placed at the current position, and the pen remains there after drawing. Cone edges are drawn using the current line drawing color. Color values for the fill color range from 0 to 255.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw cone symbol with base 40 by 20 units, and height 100 units
    # with black edges and green fill color
    numeric long_axis = 40, short_axis = 20, height = 100;
    numeric color_red = 0, color_green = 255, color_blue = 0;
    LineStyleSetColor(0,0,0);
    LineStyleDrawCone(long_axis, short_axis, height, color_red, color_green, color_blue);
    


    LineStyleDrawCube
    Draw a rectangular solid shape with the specified dimensions and fill color

    LineStyleDrawCube(width, depth, height, color_red, color_green, color_blue)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric width
        The width of the cube
      numeric depth
        The depth of the cube
      numeric height
        The height of the cube
      numeric color_red
        The red color component (0-1)
      numeric color_green
        The green color component (0-1)
      numeric color_blue
        The blue color component (0-1)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The center of the lower front edge of the cube is placed at the current position, and the pen remains there after drawing. Cube edges are drawn using the current line drawing color. Color values for the fill color range from 0 to 255.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw cube symbol with width and height
    # of 16 units and depth of 8 units 
    # with black edges and red fill color
    numeric width = 16, depth = 0.5 * width, height = width;
    numeric color_red = 255,  color_green = 0, color_blue = 0;
    LineStyleSetColor(0,0,0);
    LineStyleDrawCube(width, depth, height, color_red, color_green, color_blue);
    


    LineStyleDrawCylinder
    Draw a vertical cylinder with the specified dimensions and fill color

    LineStyleDrawCylinder(long_axis, short_axis, height, color_red, color_green, color_blue)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric long_axis
        The length of the long axis
      numeric short_axis
        The length of the short axis
      numeric height
        The height of the cone
      numeric color_red
        The red color component (0-1)
      numeric color_green
        The green color component (0-1)
      numeric color_blue
        The blue color component (0-1)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The center of the basal ellipse is placed at the current position, and the pen remains there after drawing. Cylinder edges are drawn using the current line drawing color. Color values for the fill color range from 0 to 255.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw cylinder symbol with base 30 by 15 
    # units, height 100 units, and
    # with black edges and yellow fill color
    numeric long_axis = 30, short_axis = 15, height = 60;
    numeric color_red = 255, color_green = 255, color_blue = 0;
    LineStyleSetColor(0,0,0);
    LineStyleDrawCylinder(long_axis, short_axis, height, color_red, color_green, color_blue);
    


    LineStyleDrawEllipse
    Draw an ellipse centered at location referenced from current position

    LineStyleDrawEllipse(angle, dist, radius_x, radius_y, rotangle, isAngleAbs, dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle
        Angle to the center point of the ellipse in degrees
      numeric dist
        Distance to the center point of the ellipse
      numeric radius_x
        X radius of ellipse (BEFORE ROTATION)
      numeric radius_y
        Y radius of ellipse (BEFORE ROTATION)
      numeric rotangle (オプション)
        Rotation angle in degrees
      numeric isAngleAbs (オプション)
        Is the starting angle absolute (0 default)
      numeric dofill (オプション)
        Set to 1 to fill the ellipse, 0 otherwise (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing, and is left at the center of the ellipse after drawing. Angles and directions refer to the current local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw filled green ellipse centered at the current
    # position with long axis = 20 units and short
    # axis = 10 units, and rotate 30 degrees counterclockwise
    numeric angle = 0, dist = 0, radius_x = 20, radius_y = 10;
    numeric rotangle = 30, isAngleAbs = 0, dofill = 1;
    LineStyleSetColor(0,0,0);
    LineStyleDrawEllipse(angle, dist, radius_x, radius_y, rotangle, isAngleAbs, dofill);
    


    LineStyleDrawLine
    Draw complete line element using currently set color and width

    LineStyleDrawLine()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    詳細と仮定

      The current position on the line is not changed.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw line elements as solid black lines
    # 3 units wide
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(3);
    LineStyleDrawLine();
    


    LineStyleDrawPolygon
    Draw a polygon from previously recorded sequence of points

    LineStyleDrawPolygon(dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric dofill (オプション)
        Set to 1 to fill the polygon, 0 otherwise (0 default)

    詳細と仮定

      Point locations of polygon vertices must be recorded using the LineStyleRecordPolygon( ) function before using this function. Use of this function stops the recording of vertex locations initiated by the LineStyleRecordPolygon() function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw blue filled equilateral triangle 
    # with sides 30 units long
    LineStyleSetColor(0,0,255);
    LineStyleDropAnchor(0);
    LineStyleRecordPolygon(1);
    LineStyleMoveTo(0,30);
    LineStyleMoveTo(120,30);
    LineStyleMoveToAnchor(0);
    LineStyleDrawPolygon(1);
    


    LineStyleDrawPolyline
    Draw a polyline connecting previously recorded sequence of points

    LineStyleDrawPolyline()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    詳細と仮定

      Point locations of polyline vertices must be recorded using the LineStyleRecordPolygon( ) function before using this function. Use of this function stops the recording of vertex locations initiated by the LineStyleRecordPolygon() function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw brown polyline representing 
    # overlapping triangles of different sizes
    LineStyleSetColor(170,85,0);
    LineStyleRecordPolygon(1);
    LineStyleMoveTo(0,0);
    LineStyleMoveTo(55,30);
    LineStyleMoveTo(-55,20);
    LineStyleMoveTo(55,10);
    LineStyleMoveTo(-55,20);
    LineStyleDrawPolyline();
    


    LineStyleDrawRectangle
    Draw a rectangle

    LineStyleDrawRectangle(width, height, angle, dofill, isAbs)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric width
        The rectangle's width
      numeric height
        The rectangle's height
      numeric angle (オプション)
        The rectangle drawing angle in degrees (0 default)
      numeric dofill (オプション)
        Set to 1 to fill the rectangle, 0 otherwise (0 default)
      numeric isAbs (オプション)
        Is the angle absolute (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The center of the rectangle is placed at the current position, and the pen remains there after the rectangle is drawn. The base of the rectangle is initially parallel to the x-axis of the coordinate system (local or object according to the isAbs parameter value).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw solid line with regularly spaced filled
    # squares oriented with bases parallel to local
    # line direction.
    # Set parameters for squares
    numeric width = 10; numeric height = width;
    numeric angle = 0 ; # no rotation of square
    numeric dofill = 1;
    numeric isAbs = 0; # orient to local coordinate system
    numeric dist, spacing; 
    # Set spacing between squares
    spacing = 30;
    # Set line color and width and draw line
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(3);
    LineStyleDrawLine();
    # Draw square at start of line
    LineStyleDrawRectangle(width,height,angle,dofill,isAbs);
    # Draw rest of squares
    while (LineStyleRoll(spacing) != 1) {
           dist = LineStyleGetDistanceTo(3);
           if ( dist > spacing ) {
                  LineStyleDrawRectangle(width,height,angle,dofill,isAbs);
                  }
           }
    


    LineStyleDrawText
    Draw a text string with specified height and orientation

    LineStyleDrawText(text$, height, angle, isAbs, next_x, next_y, length)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      string text$
        The text string to draw
      numeric height
        The font height
      numeric angle
        The angle to draw the text at
      numeric isAbs
        Is the angle absolute (0 default)
      numeric variable next_x (オプション)
        The x coordinate for the next string (returned)
      numeric variable next_y (オプション)
        The y coordinate for the next string (returned)
      numeric variable length (オプション)
        The text strings length (returned)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The lower left corner of the text label is placed at the current position, and the pen remains there after the text is drawn. The base of the label is initially parallel to the x-axis of the coordinate system (local or object according to the isAbs parameter value). The text is drawn using the current font set by the LineStyleSetFont() function and the current color set by the LineStyleSetTextColor() function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw circle point symbols for towns,
    # read town names from database, and draw text
    # labels rotated 30 degrees counterclockwise.
    # Draw red circle point symbol
    LineStyleSetColor(255,0,0);
    LineStyleDrawCircle(500,1);
    # Read town name from database field to string variable
    label$ = sprintf("%s",TownData.NAME);
    # Set text color and font
    LineStyleSetTextColor(0,0,0);
    LineStyleSetFont("ARIALBD.TTF");
    # Set label parameters
    height = 2000; angle = 30; isAbs = 0;
    # Move pen to right of symbol and draw label
    LineStyleMoveTo(0,2000);
    LineStyleDrawText(label$,height,angle,isAbs);
    


    LineStyleDrawTextBox
    Draw a text string in a rectangular bounding box

    LineStyleDrawTextBox(text$, height, angle, border, isAbs, next_x, next_y, length)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      string text$
        The text string to draw
      numeric height
        The font height
      numeric angle
        The angle to draw the text at
      numeric border
        The border offset distance from the text
      numeric isAbs
        Is the angle absolute (0 default)
      numeric variable next_x (オプション)
        The x coordinate for the next string (returned)
      numeric variable next_y (オプション)
        The y coordinate for the next string (returned)
      numeric variable length (オプション)
        The text strings length (returned)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The lower left corner of the text label is placed at the current position, and the pen remains there after the text is drawn. The base of the label is initially parallel to the x-axis of the coordinate system (local or object according to the isAbs parameter value). The text is drawn using the current font set by the LineStyleSetFont() function and the current color set by the LineStyleSetTextColor() function. The box outline is drawn with the current color set by the LineStyleSetColor function, and is filled with the text fill color set by the LineStyleSetTextColor() function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw square point symbol and draw boxed text
    # label with sample number from database field
    # in black on yellow fill
    # Draw red square point symbol
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(0);
    LineStyleDrawRectangle(15,15,0,1);
    # Read sample number from database field and convert
    # to text string for use as a label
    label$ = sprintf("%d", Samples.Number);
    # String variable for label text font
    font$ = "ARIALBD.TTF";
    # Define color variables for text
    t_red = 0; t_green= 0; t_blue = 0;
    # Define fill color variables for text box
    fillred = 255; fillgreen = 255; fillblue = 170;
    # Define height, angle, and border width of text
    t_height = 10; angle = 0; # no rotation of label
    border = 2;
    isAbs = 0; # use local coordinate system
    # Set color and font for text label
    LineStyleSetTextColor(t_red,t_green,t_blue,fillred, fillgreen, fillblue);
    LineStyleSetFont(font$);
    # Move pen to right of symbol and draw label
    LineStyleSetColor(0,0,0);
    LineStyleMoveTo(0, 15);
    LineStyleDrawTextBox(label$,t_height,angle,border,isAbs);
    


    LineStyleDrawThreePointArc
    Draw an arc centered at current location and passing through three points referenced from current position

    LineStyleDrawThreePointArc(angle1, dist1, angle2, dist2, angle3, dist3, closemode, dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle1
        The angle to the first point
      numeric dist1
        The distance to the first point
      numeric angle2
        The angle to the second point
      numeric dist2
        The distance to the second point
      numeric angle3
        The angle to the third point
      numeric dist3
        The distance to the third point
      numeric closemode (オプション)
        0 - no close, 1 - close arc, 2 - close arc via center point
      numeric dofill (オプション)
        Set to 1 to fill the arc, 0 otherwise (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing, and is left at the center of the arc after drawing. Direction angles refer to the local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line). If closemode == 0 AND dofill == 1 the arc will be filled (and thus must be closed)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw arc through listed point positions,
    # closed through the center and filled.
    # Set parameters for arc
    numeric angle1 = 60; numeric dist1 = 20;
    numeric angle2 = 90; numeric dist2 = 30;
    numeric angle3 = 120; numeric dist3 = 40;
    numeric closemode = 2; # close through center
    numeric dofill = 1; # fill closed arc
    LineStyleSetColor(0,0,0);
    LineStyleDrawThreePointArc(angle1,dist1,angle2,dist2,angle3,dist3,closemode,dofill);
    


    LineStyleDropAnchor
    Remember the current 'pen' position (anchor number) for later use

    LineStyleDropAnchor(Anchor)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric Anchor (オプション)
        An anchor id number

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw flag symbol with anchor at base.
    # Return to anchor to draw filled rectangle.
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(2);
    LineStyleDropAnchor(1);
    LineStyleLineTo(90,20);
    LineStyleLineTo(-30,8);
    LineStyleLineTo(-150,8);
    LineStyleMoveToAnchor(1);
    LineStyleDrawRectangle(10,5,0,1);
    


    LineStyleGetDirection
    Get minimum and maximum direction angles for portion of line starting at current position

    LineStyleGetDirection(distance, minangle, maxangle)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric distance
        The distance along the line
      numeric variable minangle
        The minimum (line direction) angle for this line segment
      numeric variable maxangle
        The maximum (line direction) angle for this line segment

    詳細と仮定

      Direction angles are in the object coordinate reference frame (positive x-axis = 0 degrees).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい


    LineStyleGetDistanceTo
    Distance from current position to specified feature

    LineStyleGetDistanceTo(feature)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric feature
        The feature id number

    詳細と仮定

      next vertex == 1, previous vertex == 2, end of line == 3, beginning of line == 4

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw solid line with regularly spaced filled
    # squares oriented with bases parallel to local
    # line direction.  Don't draw square within
    # desired spacing distance from end of line.
    # Set parameters for squares
    numeric width = 20; numeric height = width; 
    numeric angle = 0; # no rotation of square
    numeric dofill = 1;
    numeric isAbs = 0; # orient to local coordinate system
    # Set spacing between squares
    numeric spacing = 100;
    # Set line color and width and draw line
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(3);
    LineStyleDrawLine();
    # Draw square at start of line
    LineStyleDrawRectangle(width,height,angle,dofill,isAbs);
    # Draw rest of squares
    while (LineStyleRoll(spacing) != 1) {
           numeric dist = LineStyleGetDistanceTo(3);
           if ( dist > spacing ) {
                  LineStyleDrawRectangle(width,height,angle,dofill,isAbs);
                  }
           }
    


    LineStyleGetLineCurvature
    Find maximum deviation angles between successive line segments for portion of line element starting at current position.

    LineStyleGetLineCurvature(dist, maxangle, maxleftangle, maxrightangle)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric dist
        The distance along the line
      numeric variable maxangle
        The sum of the max left and right angles
      numeric variable maxleftangle (オプション)
        The maximum left angle over the line segment
      numeric variable maxrightangle (オプション)
        The maximum right angle over the line segment

    詳細と仮定

      Left and right sides are relative to line direction from the start point to the end point.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # For vector lines representing fairly
    # straight surface traces of geologic faults
    # determine largest value of maximum deviation
    # angle based on 50-meter segments, and
    # assign different line color for lines
    # exceeding specified maximum curvature value.
    numeric spacing = 50; # length of line to examine
    # Find maximum deviation angle for first segment
    numeric maxangle;
    LineStyleGetLineCurvature(spacing,maxangle);
    numeric max = maxangle; # variable to record max deviation
    # Check max deviation angles for remainder of line
    # and record maximum value
    while (LineStyleRoll(spacing) != 1) {
           LineStyleGetLineCurvature(spacing,maxangle);
           if (maxangle > max) then
                  max  = maxangle;
                  }
    numeric red, green, blue;
    # Assign values to color variables based on max
    if (max > 4) then {
           red = 255; green = 0; blue = 0;
           }
    else {
           red = 0; green = 0; blue = 0;
           }
    # Draw solid line with appropriate color
    LineStyleSetColor(red,green,blue);
    LineStyleDrawLine();
    


    LineStyleGetMaxDistance
    Find maximum perpendicular distance from specified portion of line to a straight line joining its start and end points.

    LineStyleGetMaxDistance(dist, direction, maxdist)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric dist
        The distance along the line
      numeric variable direction
        The direction in degrees (returned)
      numeric variable maxdist
        The maximum perpendicular distance between the specified portion of the line element and a straight line joining its endpoit (returned)

    詳細と仮定

      Direction angles are in the object coordinate reference frame (positive x-axis = 0 degrees).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw line elements as solid lines with
    # regularly spaced filled triangle symbols
    # on left side of line.  Use function to avoid
    # placing triangles on sharp bends of line.
    # Triangle spacing and dimensions
    numeric spacing = 35;
    numeric triWidth = spacing * 0.6;
    numeric halfTri = triWidth * 0.5;
    numeric height = triWidth * 0.6;
    numeric tol = 0.2 * height;
    # Set line color and width and draw line
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(2);
    LineStyleDrawLine();
    numeric angle, maxDist;
    # Draw triangles
    while (LineStyleRoll(spacing) != 1) {
           numeric dist = LineStyleGetDistanceTo(3); # distance to end of line
           LineStyleGetMaxDistance(triWidth,angle,maxDist);
           if (dist > triWidth and maxDist < tol) {
                  LineStyleDropAnchor(1);
                  LineStyleRoll(halfTri);
                  LineStyleMoveTo(0,0);
                  LineStyleMoveTo(90, height);
                  LineStyleDropAnchor(2);
                  LineStyleRoll(halfTri);
                  LineStyleDropAnchor(3);
                  LineStyleRecordPolygon();
                  LineStyleMoveToAnchor(2);
                  LineStyleMoveToAnchor(1);
                  LineStyleMoveToAnchor(3);
                  LineStyleDrawPolygon(1);
                  }
           else LineStyleRoll(halfTri);
           }
    


    LineStyleGetPosition
    Record the current line position as a distance from the line beginning

    LineStyleGetPosition(getAbsolute)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric getAbsolute (オプション)
        0 for relative position on the line, 1 for absolute distance from the start in object coordinates

    戻り値

      numeric
      Returned value for relative distance is between 0 (start of line) and 1.0 (end of line).

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw dashed line with red color from
    # start to middle and blue color from
    # middle to end
    LineStyleSetLineWidth(2);
    numeric dashSize = 10;
    while (LineStyleRoll(dashSize) != 1) {
           numeric pos = LineStyleGetPosition(0);
           if ( pos <= 0.5) LineStyleSetColor(255,0,0);
           else LineStyleSetColor(0,0,255);
           LineStyleRollPen(dashSize);
           }
    


    LineStyleIsClosed
    Tests the current line closure

    LineStyleIsClosed()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    詳細と仮定

      Line is closed if start and end points have the same coordinates.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw solid line, mark start with red
    # arrow head and end with green filled circle.
    # Omit circle if line forms closed polygon.
    # Set line width, color, and draw solid line
    LineStyleSetLineWidth(2);
    LineStyleSetColor(0,0,0);
    LineStyleDrawLine();
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(0);
    LineStyleDrawArrow(0,13,15,60,1);
    if (LineStyleIsClosed() != 1) {
           LineStyleSetPosition(1.0);
           LineStyleSetColor(0,255,0);
           LineStyleDrawCircle(7,1);
           }
    


    LineStyleLineTo
    Draw a line from the current 'pen' position to the specified location

    LineStyleLineTo(angle, dist)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle
        The line direction in degrees
      numeric dist
        The line length

    詳細と仮定

      If the pen position is not coincident with the current position on a line element, the pen is not moved to the current line element position before drawing (unlike most of the other LineStyle drawing functions). This property allows the function to be used to draw a continuous series of line components offset from a vector line element. Angles and directions refer to the current local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw point symbol of triangular flag
    # on vertical pole
    LineStyleSetColor(225,0,0);
    LineStyleSetLineWidth(1);
    LineStyleLineTo(90,20);
    LineStyleLineTo(-30,8);
    LineStyleLineTo(-150,8);
    # Example 2 of LineStyleLineTo()
    # Draw line symbol approximating
    # a sine wave for vector line elements.
    # Set line color and width
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(3);
    # Set sine wave parameters
    numeric angle = 0;     numeric space = 4;
    # Draw line
    while (LineStyleRoll(space) != 1) {
           angle = angle + 1; # in radians
           numeric a = sin(angle) * 5; # amplitude
           if (a > 0) Then LineStyleLineTo(90,a);
           else LineStyleLineTo(-90,abs(a));
           }
    


    LineStyleLineToAnchor
    Draw a line from the current 'pen' position to the prevously anchored position

    LineStyleLineToAnchor(Anchor)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric Anchor
        The anchor 'id' number

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw point symbol of unfilled triangle
    # with lower left corner at point position.
    LineStyleSetColor(0,0,255);
    LineStyleSetLineWidth(2);
    LineStyleDropAnchor(0);
    LineStyleLineTo(60,15);
    LineStyleLineTo(-60,15);
    LineStyleLineToAnchor(0);
    


    LineStyleMoveTo
    Move 'pen' (without drawing) to specified location

    LineStyleMoveTo(angle, dist)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle
        The destination direction in degrees
      numeric dist
        The distance to move

    詳細と仮定

      Angles and directions refer to the current local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw vector line element as solid
    # line with regularly spaced "X" symbols
    numeric spacing = 30; # spacing between "X" symbols
    numeric length = 12; # length of lines in X
    numeric halfLength = 0.5 * length;
    # Set line width and color
    LineStyleSetLineWidth(2);
    LineStyleSetColor(0,0,255);
    # Draw solid line
    LineStyleDrawLine();
    # Draw "X" symbols
    while (LineStyleRoll(spacing) != 1) {
           LineStyleSetColor(0,0,255);
           LineStyleMoveTo(0,0); # move pen to origin of local coordinate system
           LineStyleMoveTo(45, halfLength);
           LineStyleLineTo(-135, length);
           LineStyleMoveTo(45, halfLength);
           LineStyleMoveTo(-45, halfLength);
           LineStyleLineTo(135, length);
           }
    


    LineStyleMoveToAnchor
    Move 'pen' to specified anchor

    LineStyleMoveToAnchor(Anchor)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric Anchor
        The anchor 'id' number

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw point symbol as triangular flag on
    # vertical pole with filled rectangle
    # centered on base.
    # Set line color and width
    LineStyleSetColor(0,255,0);
    LineStyleSetLineWidth(2);
    # Draw flag
    LineStyleDropAnchor(0); # anchor at origin
    LineStyleLineTo(90,20);
    LineStyleLineTo(-30,8);
    LineStyleLineTo(-150,8);
    # Move to origin and draw rectangle
    LineStyleMoveToAnchor(0);
    LineStyleDrawRectangle(10,5,0,1);
    


    LineStyleNextVertex
    Move the current 'pen' position to the next vertex on the line element

    LineStyleNextVertex()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw vector line element as solid
    # black line, then mark start with an
    # open red circle and each subsequent
    # vertex with an open green circle
    # Set parameters for circles marking vertices
    numeric radius = 5;    numeric dofill = 0;
    # Draw solid black line
    LineStyleSetLineWidth(3);
    LineStyleSetColor(0,0,0);
    LineStyleDrawLine();
    # draw red circle at beginning of line
    LineStyleSetColor(225,0,0);
    LineStyleDrawCircle(radius,dofill);
    # Move to next vertex and draw green circle
    LineStyleSetColor(0,225,0);
    while ( LineStyleNextVertex() != 1 ) {
           LineStyleDrawCircle(radius,dofill);
           }
    


    LineStylePrevVertex
    Move the current 'pen' position to the previous vertex on the line element

    LineStylePrevVertex()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw vector line element as dashed
    # black line, then mark end with an
    # open red circle and each subsequent
    # vertex with an open green circle
    # Set parameters for circles and dashes
    numeric radius = 5;    numeric dofill = 0; numeric dashSize = 10;
    # Draw dashed black line
    LineStyleSetLineWidth(3);
    LineStyleSetColor(0,0,0);
    while (LineStyleRoll(dashSize) != 1) {
           numeric dist = LineStyleGetDistanceTo(3); # distance to end of line
           if (dist >dashSize) 
           LineStyleRollPen(dashSize);
           else
           LineStyleRollPen(dist);
           }
    # draw red circle at end of line
    LineStyleSetColor(225,0,0);
    LineStyleDrawCircle(radius,dofill);
    # Move to previous vertex and draw green circle
    LineStyleSetColor(0,225,0);
    while ( LineStylePrevVertex() != 1 ) {
           LineStyleDrawCircle(radius,dofill);
           }
    


    LineStyleRecordPolygon
    Start or stop recording a sequence of vertex locations for later use in drawing a polygon or polyline

    LineStyleRecordPolygon(start_stop)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric start_stop (オプション)
        Set to 1 to start recording vertex locations specified by pen movements in subsequent statements

    詳細と仮定

      After using this function to start recording, the end points of subsequent pen movements are recorded as vertex locations. Vertex locations can be indicated by various pen movement functions, including LineStyleLineTo(), LineStyleMoveTo(), LineStyleLineToAnchor(), LineStyleMoveToAnchor(), and LineStyleSideshot(). Use of the LineStyleDrawPolygon() or LineStyleDrawPolyline() functions also stops recording.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw point symbol of triangular flag
    # on vertical pole, flag as filled polygon.
    # Set line color and width
    LineStyleSetColor(0,255,0);
    LineStyleSetLineWidth(2);
    # Draw flag
    LineStyleLineTo(90,20);
    LineStyleDropAnchor(1);
    LineStyleRecordPolygon(1);
    LineStyleLineTo(-30,8);
    LineStyleLineTo(-150,8);
    LineStyleMoveToAnchor(1);
    LineStyleDrawPolygon(1);
    


    LineStyleRestoreLine
    Restore original line coordinates

    LineStyleRestoreLine()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    詳細と仮定

      The current position on the line is not changed.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい


    LineStyleRoll
    Move the current position specified distance along a line (the line is not drawn)

    LineStyleRoll(shift)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric shift
        The distance to move along the line

    詳細と仮定

      The pen position is not changed by this function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw dashed line symbol for line element.
    # Set line color and width
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(2);
    # set dash parameters
    numeric dashSize = 16;
    numeric spacing = 0.6 * dashSize;
    # Draw dashed line
    while (LineStyleRoll(spacing) != 1) {
           LineStyleRollPen(dashSize);
           }
    


    LineStyleRollPen
    Draw a line a specified distance along a line from the current position

    LineStyleRollPen(dist)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric dist
        The distance to move along the line

    詳細と仮定

      The pen position is moved to the current line element position if necessary before drawing.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw dashed line symbol for line element.
    # Set line color and width
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(2);
    # set dash parameters
    numeric dashSize = 16;
    numeric spacing = 0.6 * dashSize;
    # Draw dashed line
    while (LineStyleRoll(spacing) != 1) {
           LineStyleRollPen(dashSize);
           }
    


    LineStyleSetCapJoinType
    Set square or rounded ends for lines and polyline segments

    LineStyleSetCapJoinType(capstype, jointype)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric capstype
        Draw square line ends when set to 1, or rounded ends when set to 0 (default).
      numeric jointype
        Draw square line segment ends when set to 1, or rounded line segment ends when set to 0 (default).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw cross point symbol with square line ends
    # Set line color, width, and capstype
    LineStyleSetColor(255,0,255);
    LineStyleSetLineWidth(2);
    LineStyleSetCapJoinType(1,1);
    # Draw cross
    LineStyleDropAnchor(0);
    LineStyleMoveTo(90,10);
    LineStyleLineTo(-90,20);
    LineStyleMoveToAnchor(0);
    LineStyleMoveTo(0,10);
    LineStyleLineTo(180,20);
    


    LineStyleSetColor
    Set RGB color values for line color.

    LineStyleSetColor(red, green, blue)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric red
        The red color component (0-255)
      numeric green
        The green color component (0-255)
      numeric blue
        The blue color component (0-255)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw point symbol with red flag and
    # blue filled rectangle at base
    # Set line width and color for flag
    LineStyleSetLineWidth(2);
    LineStyleSetColor(255,0,0);
    # Draw flag
    LineStyleDropAnchor(1);
    LineStyleLineTo(90,20);
    LineStyleLineTo(-30,8);
    LineStyleLineTo(-150,8);
    LineStyleMoveToAnchor(1);
    # Change line color and draw rectangle
    LineStyleSetColor(0,0,255);
    LineStyleDrawRectangle(10,5,0,1);
    


    LineStyleSetCoordType
    Set the coordinate type for input distances

    LineStyleSetCoordType(type)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric type
        0 for OBJECT coordinates, 1 for SCREEN coordinates (mm)

    詳細と仮定

      Setting the coordinate type to millimeters produces symbols with constant size in millimeters regardless of the display scale or print scale.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw filled rectangle point symbol
    # with constant size in millimeters
    # Set dimensions of rectangle
    LineStyleSetCoordType(1);
    numeric width = 4;
    numeric height = 0.5 * width;
    # Set color for rectangle 
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(0);
    # Draw rectangle
    LineStyleDrawRectangle(width,height,0,1);
    


    LineStyleSetFont
    Set the font (by name)

    LineStyleSetFont(fontname$)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      string fontname$
        The font name to use

    詳細と仮定

      The font can be any installed system font (.ttf) or one of the TNTmips outline fonts (.of).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw circle point symbols for towns,
    # read town names from database, and draw text
    # labels.
    # Draw red circle point symbol
    LineStyleSetColor(255,0,0);
    LineStyleDrawCircle(500,1);
    # Read town name from database field to string variable
    label$ = sprintf("%s",TownData.NAME);
    # Set text color and font
    LineStyleSetTextColor(0,0,0);
    LineStyleSetFont("ARIALBD.TTF");
    # Set label parameters
    height = 2000; angle = 0; isAbs = 0;
    # Move pen to right of symbol and draw label
    LineStyleMoveTo(0,2000);
    LineStyleDrawText(label$,height,angle,isAbs);
    


    LineStyleSetLineWidth
    Set the drawing line width

    LineStyleSetLineWidth(width, isInMM)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric width
        The line width in pixels or mm
      numeric isInMM (オプション)
        Set to 1 for mm, 0 for pixels (the default)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw line elements as solid black lines
    # 3 units wide
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(3);
    LineStyleDrawLine();
    


    LineStyleSetPosition
    Move a specified distance along line relative to line length

    LineStyleSetPosition(shift)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric shift
        The line position as a relative distance between 0 (beginning of the line) and 1.0 (end of the line)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw line element as solid line with small
    # red circles at start, middle, and end of line.
    # Set radius parameters for circles
    numeric radius = 8; numeric dofill = 0;
    # Set line color and width and draw line
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(4);
    LineStyleDrawLine();
    # Draw small red circle at beginning of line
    LineStyleSetColor(225,0,0);
    LineStyleDrawCircle(radius,dofill);
    # Draw remaining circles
    LineStyleSetPosition(0.5);
    LineStyleDrawCircle(radius,dofill);
    LineStyleSetPosition(1.0);
    LineStyleDrawCircle(radius,dofill);
    


    LineStyleSetScale
    Set a scale factor to be applied to all input distances and lengths

    LineStyleSetScale(scale)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric scale
        The scaling factor (default = 1.0)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw dashed red line with dash
    # lengths scaled by 0.5
    # Set scale factor
    LineStyleSetScale(0.5);
    # Set color, width, and end type for lines
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(2);
    LineStyleSetCapJoinType(1,1);
    # draw dashed line
    numeric dashSize = 20;
    numeric halfDash = 0.5 * dashSize;
    while (LineStyleRoll(halfDash) != 1) {
           LineStyleRollPen(dashSize);
           }
    


    LineStyleSetTextColor
    Set the text foreground and background colors as RGB

    LineStyleSetTextColor(red, green, blue, bgred, bggreen, bgblue)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric red
        The red component (0-255)
      numeric green
        The green component (0-255)
      numeric blue
        The blue component (0-255)
      numeric bgred (オプション)
        The red component for the background (0-255)
      numeric bggreen (オプション)
        The green component for the background (0-255)
      numeric bgblue (オプション)
        The blue component for the background (0-255)

    詳細と仮定

      Background color is for shadows and "enhancement" outline

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw square point symbol with sample
    # number (from database) in text box
    # Set line color and width and draw square
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(0);
    LineStyleDrawRectangle(15,15,0,1);
    # Read sample number from database field and convert
    # to text string for use as a label
    string label$ = sprintf("%d", Samples.Number);
    # String variable for label text font
    string font$ = "ARIALBD.TTF";
    # Define color variables for text
    numeric red = 0; numeric green = 0; numeric blue = 0;
    # Define fill color variables for text box;
    numeric bgred = 255; numeric bggreen = 255; numeric bgblue = 170
    # Define height, angle, and border width of text
    numeric t_height = 10; numeric angle = 0; numeric border = 2;
    # Set color and font for text label
    LineStyleSetColor(0,0,0); # color for box outline
    LineStyleSetTextColor(red,green,blue,bgred,bggreen,bgblue);
    LineStyleSetFont(font$);
    # Move pen to right of symbol and draw label
    LineStyleMoveTo(0, 15);
    LineStyleDrawTextBox(label$,t_height,angle,border,0) ;
    


    LineStyleSideshot
    Specify sequence of positions by direction and distance from current pen position

    LineStyleSideshot(dodraw, ...)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric dodraw
        Draw a line connecting the points specified (1 by default)
      numeric ... (オプション)
        A series of point positions specified as Angle, Distance pairs

    詳細と仮定

      Angles and directions refer to the current local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line). Parameter list can contain any number of paired angle / distance values.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw line elements with regularly
    # repeated diamond symbols.
    LineStyleSetColor(128,128,128);
    # Set dimensions for diamond symbols
    numeric length, width, halfLength, halfWidth, spacing, dodraw;
    length = 15; width = 8;
    halfLength = 0.5 * length;
    halfWidth = 0.5 * width;
    spacing = 25; # spacing between diamond centers
    dodraw = 0;
    while (LineStyleRoll(spacing) != 1) {
           LineStyleMoveTo(0,0);
           LineStyleRecordPolygon(1); # record sideshot points to make polygon
           LineStyleSideshot(dodraw,0,halfLength,90,halfWidth,180,halfLength,-90,halfWidth);
           LineStyleDrawPolygon(1);       # draw and fill diamond polygon
           }
    


    LineStyleSpline
    Spline vector line elements (smooth by inserting additional vertices)

    LineStyleSpline(parameter, method)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric parameter
        The number of knots
      numeric method
        1 == b-spline, 2 == quadritic, 3 == bezier

    詳細と仮定

      This function splines the lines, but does not draw draw them. Use the LineStyleDrawLine() function following splining to draw the splined lines. See the section Vector / Vector Filters / Filter Options / Line Densification in the Process Volume of the TNTmips Reference Manual for a description of the splining methods and their parameters.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Spline lines using BSpline method, with
    # 5 inserted points between each pair of vertices,
    # draw in red.
    numeric parameter = 5, method = 1;
    LineStyleSpline(parameter,method);
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(2);
    LineStyleDrawLine();
    


    LineStyleTextNextPosition
    Compute length and end position of text string

    LineStyleTextNextPosition(text$, height, angle, isAbs, next_x, next_y, length)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      string text$
        The text string
      numeric height
        The font height
      numeric angle
        The angle in degrees
      numeric isAbs
        Local (0) or absolute (1) coordinate
      numeric variable next_x
        The x position for the next text string (returned)
      numeric variable next_y
        The y position for the next text string (returned)
      numeric variable length
        The length of the string (returned)

    詳細と仮定

      The base of the label is initially parallel to the x-axis of the coordinate system (local or object according to the isAbs parameter value). The text string coordinates are computed using the current font set by the LineStyleSetFont() function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw circle point symbols for towns,
    # read town names from database, and draw text
    # labels to the left of the points
    # Draw red circle point symbol
    LineStyleSetColor(255,0,0);
    LineStyleDrawCircle(500,1);
    # Read town name from database field to string variable
    string label$ = sprintf("%s",TownData.NAME);
    # Set text color and font
    LineStyleSetTextColor(0,0,0);
    LineStyleSetFont("ARIALBD.TTF");
    # Set label parameters and find length of text label
    height = 2000; angle = 0; isAbs = 0;
    LineStyleTextNextPosition(label$,height,angle,isAbs,next_x,next_y,length);
    # Move pen to left of symbol and draw label,
    # using length of label to avoid overlap
    LineStyleMoveTo(180,length + 500);
    LineStyleDrawText(label$,height,angle,isAbs);
    


    LineStyleThinLine
    Thin (simplify) vector line elements by removing vertices

    LineStyleThinLine(parameter, method)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric parameter
        The thinning factor
      numeric method
        "Douglas-Peucker" == 1, "Minimum Distance" == 2, "Minimum Ratio" == 3

    詳細と仮定

      This function thins the lines, but does not draw draw them. Use the LineStyleDrawLine() function following thinning to draw the thinned lines. See the section Vector / Vector Filters / Filter Options / Line Simplification in the Process Volume of the TNTmips Reference Manual for a description of the thinning methods and their parameters.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Thin lines with Douglas-Peucker method
    # using thinning distance of 5
    numeric parameter = 5; numeric method = 1;
    LineStyleSetColor(0,255,0);
    LineStyleThinLine(parameter,method);
    LineStyleDrawLine();
    


    Total Number of Functions: 1084