package require java
proc graphicalEllipsoid { formHandle } {
$formHandle hide
set visualiserForm [java::new com.surpac.gui.VisualiserForm 1]
$visualiserForm setMajorSemi [$formHandle getField semi_major]
$visualiserForm setMajorMinor [$formHandle getField minor]
$visualiserForm setMaxDistance [$formHandle getField majordist]
$visualiserForm setBearing [$formHandle getField bearing]
$visualiserForm setDip [$formHandle getField dip]
$visualiserForm setPlunge [$formHandle getField plunge]
$visualiserForm interactFrame
if {[$visualiserForm getReturnStatus] == 1 } {
$formHandle setField semi_major [$visualiserForm getMajorSemi]
$formHandle setField minor [$visualiserForm getMajorMinor]
$formHandle setField majordist [$visualiserForm getDist]
$formHandle setField bearing [$visualiserForm getBrg]
$formHandle setField dip [$visualiserForm getDip]
$formHandle setField plunge [$visualiserForm getPlunge]
}
$visualiserForm destroyFrame
$formHandle show
}
proc retrieveVariogramModelParameters { file } {
set name [$file getCurrentValue]
if {"$name" != ""} {
set buffer [GuidoExecServer "GetVariogramModellingParameters" [subst {VGModelName = "$name"} ]]
set status [GuidoGetParamBufferValue $buffer status]
if {$status >= 0} {
global model
$model setCurrentValue [GuidoGetParamBufferValue $buffer ModelType]
global nugget
$nugget setCurrentValue [GuidoGetParamBufferValue $buffer Nugget]
set num_structures [GuidoGetParamBufferValue $buffer NumStructures]
if {$num_structures > 5} {
set num_structures 5
}
for {set idx 0} {$idx < $num_structures} {incr idx} {
global sill$idx
upvar 0 "sill$idx" field
set val [format %.6f [GuidoGetParamBufferValue $buffer "Sill$idx"]]
$field setCurrentValue $val
global range$idx
upvar 0 "range$idx" field
set val [format %.3f [GuidoGetParamBufferValue $buffer "Range$idx"]]
$field setCurrentValue $val
}
}
}
return 1
}
GuidoForm frm20600 {
-default_buttons
-label "Direct Kriging"
-layout BoxLayout Y_AXIS
-tip "20600_TIP_001"
GuidoPanel frm20600_49 {
-layout BoxLayout X_AXIS
GuidoPanel frm20600_47 {
-border etched true
-label OBJECTS
-layout CentreLineLayout
GuidoFileBrowserField obj_loc {
-display_length 10
-file_mask *.dtm
-format none
-label Location
-link obj_id
-max_length "FIO_MAX_LOCATION_LENGTH"
-next_focus obj_id
-null false
-tip "Specify the DTM file(s) containing the objects for which grades will be estimated."
-translate none
}
GuidoField obj_id {
-default 1
-display_length 10
-format range
-label "ID Range"
-max_length 50
-next_focus obj_rng
-null false
-tip "Specify the DTM file(s) containing the objects for which grades will be estimated."
-translate none
}
GuidoField obj_rng {
-display_length 10
-format range
-label "Object Range"
-max_length 50
-next_focus data_loc
-tip "20600_TIP_004"
-translate none
}
}
GuidoFiller frm20600_50 {
-width 1
}
GuidoPanel frm20600_48 {
-border etched true
-label DATA
-layout CentreLineLayout
GuidoFileBrowserField data_loc {
-display_length 10
-file_mask *.str
-format none
-label Location
-link data_id
-max_length "FIO_MAX_LOCATION_LENGTH"
-next_focus data_id
-null false
-tip "Specify the string file(s) containing the points from which informing samples are selected."
-translate none
}
GuidoField data_id {
-default 1
-display_length 10
-format range
-label "ID Range"
-max_length 50
-next_focus data_rng
-null false
-tip "Specify the string file(s) containing the points from which informing samples are selected."
-translate none
}
GuidoField data_rng {
-display_length 10
-format range
-label "String Range"
-max_length 50
-next_focus dfield
-tip "20465_TIP_004"
-translate none
}
GuidoComboBox dfield {
-default D1
-display_length 7
-format string_field
-label "D Field"
-max_length 4
-tip "Give the description field in which the data is to be found."
-value_in D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24 D25 D26 D27 D28 D29 D30 D31 D32 D33 D34 D35 D36 D37 D38 D39 D40 D41 D42 D43 D44 D45 D46 D47 D48 D49 D50 D51 D52 D53 D54 D55 D56 D57 D58 D59 D60 D61 D62 D63 D64 D65 D66 D67 D68 D69 D70 D71 D72 D73 D74 D75 D76 D77 D78 D79 D80 D81 D82 D83 D84 D85 D86 D87 D88 D89 D90 D91 D92 D93 D94 D95 D96 D97 D98 D99 D100
}
}
GuidoFiller frm20600_50 {
-width 1
}
GuidoPanel frm20600_48 {
-border etched true
-label "KRIGING TYPE"
-layout CentreLineLayout
GuidoLabel ktype {
-label "Type"
}
GuidoButtonGroupPanel krig_type {
-layout BoxLayout X_AXIS
GuidoRadioButton krig_type_ordinary {
-caption Ordinary
-default true
-selected_value ordinary
-height 1
}
GuidoRadioButton krig_type_simple {
-caption Simple
-selected_value simple
-height 1
}
}
GuidoField skmean {
-dependency {"[ $krig_type getCurrentValue]" == "simple"}
-display_length 6
-label "Mean"
-format double
-max_length 6
-null true
-default 0
-tip GST_SKMEAN_TIP
}
}
}
GuidoLabel frm20600_14 {
-font_style bold
-label "SEARCH PARAMETERS"
}
GuidoPanel frm20600_53 {
-layout BoxLayout X_AXIS
GuidoPanel frm20600_51 {
-border etched true
-layout CentreLineLayout
GuidoPanel frm20600_18 {
-label "Search type"
-layout BoxLayout X_AXIS
-tip "20600_TIP_010"
GuidoButtonGroupPanel search {
GuidoRadioButton frm20600_16 {
-caption ELLIPSOID
-default true
-selected_value ELLIPSOID
}
GuidoRadioButton frm20600_17 {
-caption OCTANT
-next_focus minsamples
-selected_value OCTANT
}
}
}
GuidoField minsamples {
-default 3
-display_length 4
-format short
-label "Minimum number of samples"
-low_bound 1
-max_length 2
-next_focus maxsamples
-null false
-tip "20600_TIP_011"
-translate none
}
GuidoField maxsamples {
-default 15
-display_length 4
-format short
-label "Maximum number of samples"
-low_bound 1
-max_length 4
-next_focus majordist
-null false
-tip "The nearest n samples will be used to create the estimate."
-translate none
}
GuidoField majordist {
-display_length 4
-format double
-label "Maximum search radius"
-max_length 16
-next_focus vertdist
-null false
-tip "20253_TIP_005"
-translate upper
}
GuidoField vertdist {
-display_length 4
-format double
-label "Maximum vertical search distance"
-max_length 16
-next_focus adjoct
-null false
-tip "20253_TIP_006"
-translate upper
}
}
GuidoFiller frm20600_54 {
-width 1
}
GuidoPanel frm20600_52 {
-border etched true
-layout CentreLineLayout
GuidoComboBox req_dpts {
-display_length 4
-format integer
-label "Required desc. points"
-low_bound 1
-max_length 4
-next_focus proportional
-null false
-tip "20600_TIP_015"
-translate none
-value_in 1 8 64 512
-exclusive false
}
GuidoCheckBox proportional {
-default true
-label Proportional?
-next_focus notefile
-selected_value Y
-tip "20600_TIP_016"
-unselected_value N
}
GuidoFileBrowserField notefile {
-display_length 10
-extension true
-file_access write
-file_mask reports|*.not
-format none
-label "REPORT_FILE_NAME"
-max_length 256
-next_focus debug
-null false
-tip "20600_TIP_017"
-translate lower
}
GuidoCheckBox debug {
-default false
-label Debug?
-selected_value Y
-tip "20600_TIP_018"
-unselected_value N
-next_focus bearing
}
}
GuidoFiller frm20600_54 {
-width 1
}
}
GuidoPanel frm20600_55 {
-layout CentreLineLayout
GuidoField adjoct {
-dependency {"[ $search getCurrentValue]" == "OCTANT"}
-display_length 2
-format short
-label "Maximum number of adjacent octants with no samples"
-max_length 2
-null false
-tip "00141_TIP_018"
-translate none
-next_focus req_dpts
}
}
GuidoPanel frm20600_60 {
-layout BoxLayout X_AXIS
GuidoPanel frm20600_56 {
-border etched true
-label ANISOTROPY
-layout CentreLineLayout
GuidoField bearing {
-default 0
-display_length 4
-format double
-high_bound 360
-label "Bearing of major axis"
-low_bound 0
-max_length 6
-next_focus plunge
-null false
-tip "20600_TIP_020"
-translate upper
}
GuidoField plunge {
-default 0
-display_length 4
-format double
-high_bound 90
-label "Plunge of major axis"
-low_bound -90
-max_length 6
-next_focus dip
-null false
-translate upper
}
GuidoField dip {
-default 0
-display_length 4
-format double
-high_bound 90
-label "Dip of semi-major"
-low_bound -90
-max_length 6
-next_focus semi_major
-null false
-translate upper
}
GuidoField semi_major {
-default 1
-display_length 4
-format double
-label "major / semi-major"
-max_length 5
-next_focus minor
-null false
-translate upper
}
GuidoField minor {
-default 1
-display_length 4
-format double
-label "major / minor"
-max_length 5
-next_focus vg_model_file_name
-null false
-translate upper
}
}
GuidoFiller frm20600_61 {
-width 0.5
}
GuidoPanel frm20600_57 {
-border etched true
-label VARIOGRAM
-layout CentreLineLayout
GuidoFileBrowserField vg_model_file_name {
-action valueChanged {[retrieveVariogramModelParameters $vg_model_file_name]}
-display_length 20
-file_access read
-file_mask "*.vgm *.not"
-format none
-label "File name"
-max_length 256
-null true
-translate none
-tip GST_VG_FILENAME_TIP
-next_focus model
}
GuidoComboBox model {
-default Spherical
-format string_field
-label Model
-max_length 11
-null false
-value_in Spherical Exponential Gaussian "Hole Effect"
-tip "Select the variogram model to be used from those available using the browser."
-next_focus nugget
}
GuidoField nugget {
-default 0
-display_length 10
-format double
-label Nugget
-low_bound 0
-max_length 20
-next_focus sill0
-null false
-tip "20101_TIP_003"
-translate upper
}
}
GuidoFiller frm20600_61 {
-width 0.5
}
GuidoPanel frm20600_58 {
-border etched true
-label Sill
-layout BoxLayout Y_AXIS
GuidoField sill0 {
-display_length 6
-format double
-max_length 20
-next_focus range0
-tip "Enter the sill for this variogram structure."
-translate upper
}
GuidoField sill1 {
-display_length 6
-format double
-max_length 20
-next_focus range1
-tip "Enter the sill for this variogram structure."
-translate upper
}
GuidoField sill2 {
-display_length 6
-format double
-max_length 20
-next_focus range2
-tip "Enter the sill for this variogram structure."
-translate upper
}
GuidoField sill3 {
-display_length 6
-format double
-max_length 20
-next_focus range3
-tip "Enter the sill for this variogram structure."
-translate upper
}
GuidoField sill4 {
-display_length 6
-format double
-max_length 20
-next_focus range4
-tip "Enter the sill for this variogram structure."
-translate upper
}
}
GuidoFiller frm20600_61 {
-width 0.5
}
GuidoPanel frm20600_59 {
-border etched true
-label Range
-layout BoxLayout Y_AXIS
GuidoField range0 {
-display_length 6
-format double
-max_length 20
-next_focus sill1
-tip "Enter the range for this variogram structure."
-translate upper
}
GuidoField range1 {
-display_length 6
-format double
-max_length 20
-next_focus sill2
-tip "Enter the range for this variogram structure."
-translate upper
}
GuidoField range2 {
-display_length 6
-format double
-max_length 20
-next_focus sill3
-tip "Enter the range for this variogram structure."
-translate upper
}
GuidoField range3 {
-display_length 6
-format double
-max_length 20
-next_focus sill4
-tip "Enter the range for this variogram structure."
-translate upper
}
GuidoField range4 {
-display_length 6
-format double
-max_length 20
-tip "Enter the range for this variogram structure."
-translate upper
}
}
}
GuidoPanel evPanel {
-layout BoxLayout Y_AXIS
GuidoFiller ev1_1 {
-height 0.2
}
GuidoPanel evPanel2 {
-layout FlowLayout
GuidoButton visualiser {
-caption "Ellipsoid Visualiser"
-action valueChanged {[graphicalEllipsoid $frm20600]}
-tip "A Visual Representation of the Search Ellipsoid"
}
}
GuidoFiller ev1_2 {
-height 0.2
}
}
}
