//--------------------------------------------------------- CPROJ4_Grid::CPROJ4_Grid(int Interface, bool bInputList) : CPROJ4_Base(Interface, bInputList) { CSG_Parameters *pParameters; //----------------------------------------------------- Set_Name (CSG_String::Format(SG_T("%s (%s, %s)"), _TL("Proj.4"), Interface == PROJ4_INTERFACE_DIALOG ? _TL("Dialog") : _TL("Command Line Arguments"), m_bInputList ? _TL("List of Grids") : _TL("Grid") )); Set_Author (SG_T("O. Conrad (c) 2004-8")); Set_Description (_TW( "Coordinate Transformation for Grids.\n" "Based on the PROJ.4 Cartographic Projections library originally written by Gerald Evenden " "and later continued by the United States Department of the Interior, Geological Survey (USGS).\n" "<a target=\"_blank\" href=\"http://trac.osgeo.org/proj/\">Proj.4 Homepage</a>\n" )); //----------------------------------------------------- if( m_bInputList ) { Parameters.Add_Grid_List( Parameters("SOURCE_NODE"), "SOURCE" , _TL("Source"), _TL(""), PARAMETER_INPUT, false ); Parameters.Add_Grid_List( NULL, "TARGET" , _TL("Target"), _TL(""), PARAMETER_OUTPUT_OPTIONAL ); m_Grid_Target.Add_Parameters_User(Add_Parameters("GET_USER", _TL("User Defined Grid") , _TL("")), false); pParameters = Add_Parameters("GET_SYSTEM" , _TL("Choose Grid Project"), _TL("")); pParameters->Add_Grid_System( NULL, "SYSTEM" , _TL("System") , _TL("") ); } else { Parameters.Add_Grid( Parameters("SOURCE_NODE"), "SOURCE" , _TL("Source"), _TL(""), PARAMETER_INPUT ); m_Grid_Target.Add_Parameters_User(Add_Parameters("GET_USER", _TL("User Defined Grid") , _TL(""))); m_Grid_Target.Add_Parameters_Grid(Add_Parameters("GET_GRID", _TL("Choose Grid") , _TL(""))); } Parameters.Add_Shapes_Output( NULL, "SHAPES" , _TL("Shapes"), _TL("") ); //----------------------------------------------------- Parameters.Add_Value( Parameters("TARGET_NODE") , "CREATE_XY" , _TL("Create X/Y Grids"), _TL(""), PARAMETER_TYPE_Bool, false ); Parameters.Add_Grid_Output( NULL , "OUT_X" , _TL("X Coordinates"), _TL("") ); Parameters.Add_Grid_Output( NULL , "OUT_Y" , _TL("Y Coordinates"), _TL("") ); //----------------------------------------------------- Parameters.Add_Choice( Parameters("TARGET_NODE") , "INTERPOLATION" , _TL("Interpolation"), _TL(""), CSG_String::Format(SG_T("%s|%s|%s|%s|%s|"), _TL("Nearest Neigbhor"), _TL("Bilinear Interpolation"), _TL("Inverse Distance Interpolation"), _TL("Bicubic Spline Interpolation"), _TL("B-Spline Interpolation") ), 4 ); //----------------------------------------------------- Parameters.Add_Choice( Parameters("TARGET_NODE") , "TARGET_TYPE" , _TL("Target"), _TL(""), CSG_String::Format(SG_T("%s|%s|%s|"), _TL("user defined"), _TL("grid"), _TL("shapes") ), 0 ); //----------------------------------------------------- pParameters = Add_Parameters("GET_SHAPES" , _TL("Choose Shapes") , _TL("")); pParameters->Add_Shapes( NULL, "SHAPES" , _TL("Shapes") , _TL(""), PARAMETER_OUTPUT , SHAPE_TYPE_Point ); }
//--------------------------------------------------------- CShapes_Cut::CShapes_Cut(void) { Set_Name (_TL("Cut Shapes Layer")); Set_Author (SG_T("O. Conrad (c) 2006")); Set_Description (_TW( "" )); //----------------------------------------------------- Parameters.Add_Shapes_List( NULL , "SHAPES" , _TL("Shapes"), _TL(""), PARAMETER_INPUT ); Parameters.Add_Shapes_List( NULL , "CUT" , _TL("Cut"), _TL(""), PARAMETER_OUTPUT ); Parameters.Add_Shapes( NULL , "EXTENT" , _TL("Extent"), _TL(""), PARAMETER_OUTPUT_OPTIONAL, SHAPE_TYPE_Polygon ); Parameters.Add_Choice( NULL , "METHOD" , _TL("Method"), _TL(""), Cut_Methods_Str(), 0 ); Parameters.Add_Choice( NULL , "TARGET" , _TL("Extent"), _TL(""), CSG_String::Format(SG_T("%s|%s|%s|%s|"), _TL("user defined"), _TL("grid project"), _TL("shapes layer extent"), _TL("polygons") ), 0 ); //----------------------------------------------------- CSG_Parameters *pParameters; pParameters = Add_Parameters("CUT", _TL("Extent"), _TL("")); pParameters->Add_Value( NULL, "AX" , _TL("Left") , _TL(""), PARAMETER_TYPE_Double ); pParameters->Add_Value( NULL, "BX" , _TL("Right") , _TL(""), PARAMETER_TYPE_Double ); pParameters->Add_Value( NULL, "AY" , _TL("Bottom") , _TL(""), PARAMETER_TYPE_Double ); pParameters->Add_Value( NULL, "BY" , _TL("Top") , _TL(""), PARAMETER_TYPE_Double ); pParameters->Add_Value( NULL, "DX" , _TL("Horizontal Range") , _TL(""), PARAMETER_TYPE_Double, 1.0, 0.0, true ); pParameters->Add_Value( NULL, "DY" , _TL("Vertical Range") , _TL(""), PARAMETER_TYPE_Double, 1.0, 0.0, true ); pParameters = Add_Parameters("GRID", _TL("Extent"), _TL("")); pParameters->Add_Grid_System( NULL, "GRID", _TL("Grid Project") , _TL("") ); pParameters = Add_Parameters("SHAPES", _TL("Extent"), _TL("")); pParameters->Add_Shapes( NULL, "SHAPES", _TL("Shapes") , _TL(""), PARAMETER_INPUT ); pParameters = Add_Parameters("POLYGONS", _TL("Polygons"), _TL("")); pParameters->Add_Shapes( NULL, "POLYGONS", _TL("Polygons") , _TL(""), PARAMETER_INPUT, SHAPE_TYPE_Polygon ); }
//--------------------------------------------------------- C_Kriging_Base::C_Kriging_Base(void) { CSG_Parameter *pNode; CSG_Parameters *pParameters; //----------------------------------------------------- Parameters.Add_Grid_Output( NULL , "GRID" , _TL("Grid"), _TL("") ); Parameters.Add_Grid_Output( NULL , "VARIANCE" , _TL("Variance"), _TL("") ); pNode = Parameters.Add_Shapes( NULL , "SHAPES" , _TL("Points"), _TL(""), PARAMETER_INPUT ); Parameters.Add_Table_Field( pNode , "FIELD" , _TL("Attribute"), _TL("") ); Parameters.Add_Value( NULL , "BVARIANCE" , _TL("Create Variance Grid"), _TL(""), PARAMETER_TYPE_Bool , true ); Parameters.Add_Choice( NULL , "TARGET" , _TL("Target Grid"), _TL(""), CSG_String::Format(SG_T("%s|%s|%s|"), _TL("user defined"), _TL("grid system"), _TL("grid") ), 0 ); Parameters.Add_Choice( NULL , "MODEL" , _TL("Variogram Model"), _TL(""), CSG_String::Format(SG_T("%s|%s|%s|%s|%s|%s|"), _TL("Spherical Model"), _TL("Exponential Model"), _TL("Gaussian Model"), _TL("Linear Regression"), _TL("Exponential Regression"), _TL("Power Function Regression") ), 3 ); Parameters.Add_Value( NULL , "BLOCK" , _TL("Block Kriging"), _TL(""), PARAMETER_TYPE_Bool , false ); Parameters.Add_Value( NULL , "DBLOCK" , _TL("Block Size"), _TL(""), PARAMETER_TYPE_Double , 100.0, 0.0, true ); Parameters.Add_Value( NULL , "BLOG" , _TL("Logarithmic Transformation"), _TL(""), PARAMETER_TYPE_Bool ); Parameters.Add_Value( NULL , "NUGGET" , _TL("Nugget"), _TL(""), PARAMETER_TYPE_Double, 0.0, 0.0, true ); Parameters.Add_Value( NULL , "SILL" , _TL("Sill"), _TL(""), PARAMETER_TYPE_Double, 10.0, 0.0, true ); Parameters.Add_Value( NULL , "RANGE" , _TL("Range"), _TL(""), PARAMETER_TYPE_Double, 100.0, 0.0, true ); pNode = Parameters.Add_Node( NULL , "PARMS" , _TL("Additional Parameters"), _TL("") ); Parameters.Add_Value( pNode , "LIN_B" , _TL("Linear Regression"), _TL("Parameter B for Linear Regression:\n y = Nugget + B * x"), PARAMETER_TYPE_Double, 1.0 ); Parameters.Add_Value( pNode , "EXP_B" , _TL("Exponential Regression"), _TL("Parameter B for Exponential Regression:\n y = Nugget * e ^ (B * x)"), PARAMETER_TYPE_Double, 0.1 ); Parameters.Add_Value( pNode , "POW_A" , _TL("Power Function - A"), _TL("Parameter A for Power Function Regression:\n y = A * x ^ B"), PARAMETER_TYPE_Double, 1.0 ); Parameters.Add_Value( pNode , "POW_B" , _TL("Power Function - B"), _TL("Parameter B for Power Function Regression:\n y = A * x ^ B"), PARAMETER_TYPE_Double, 0.5 ); //----------------------------------------------------- pParameters = Add_Parameters(SG_T("USER") , _TL("User defined grid") , _TL("")); pParameters->Add_Value( NULL , "CELL_SIZE" , _TL("Grid Size"), _TL(""), PARAMETER_TYPE_Double, 100.0, 0.0, true ); pNode = pParameters->Add_Value( NULL , "FIT_EXTENT" , _TL("Fit Extent"), _TL("Automatically fits the grid to the shapes layers extent."), PARAMETER_TYPE_Bool , true ); pParameters->Add_Range( pNode , "X_EXTENT" , _TL("X-Extent"), _TL("") ); pParameters->Add_Range( pNode , "Y_EXTENT" , _TL("Y-Extent"), _TL("") ); //----------------------------------------------------- pParameters = Add_Parameters(SG_T("SYSTEM") , _TL("Choose Grid System") , _TL("")); pParameters->Add_Grid_System( NULL , "SYSTEM" , _TL("Grid System"), _TL("") ); //----------------------------------------------------- pParameters = Add_Parameters(SG_T("GRID") , _TL("Choose Grid") , _TL("")); pNode = pParameters->Add_Grid_System( NULL , "SYSTEM" , _TL("Grid System"), _TL("") ); pParameters->Add_Grid( pNode , "GRID" , _TL("Grid"), _TL(""), PARAMETER_INPUT , false ); pParameters->Add_Grid( pNode , "VARIANCE" , _TL("Variance"), _TL(""), PARAMETER_INPUT_OPTIONAL, false ); }