Ejemplo n.º 1
0
//---------------------------------------------------------
CSurfer_BLN_Export::CSurfer_BLN_Export(void)
{
	//-----------------------------------------------------
	// 1. Info...

	Set_Name		(_TL("Export Surfer Blanking File"));

	Set_Author		("O.Conrad (c) 2006");

	Set_Description	(_TW(
		"Export shapes to Golden Software's Surfer Blanking File format.\n"
	));


	//-----------------------------------------------------
	// 2. Parameters...

	CSG_Parameter	*pNode	= Parameters.Add_Shapes(
		NULL	, "SHAPES"	, _TL("Shapes"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Table_Field(pNode, "NAME", _TL("Name"       ), _TL(""), true);
	Parameters.Add_Table_Field(pNode, "DESC", _TL("Description"), _TL(""), true);
	Parameters.Add_Table_Field(pNode, "ZVAL", _TL("z values"   ), _TL(""), true);

	Parameters.Add_FilePath(
		NULL	, "FILE"	, _TL("File"),
		_TL(""),
		CSG_String::Format(SG_T("%s|*bln|%s|*.*"),
			_TL("Surfer Blanking Files (*.bln)"),
			_TL("All Files")
		), NULL, true
	);
}
Ejemplo n.º 2
0
//---------------------------------------------------------
CXYZ_Import::CXYZ_Import(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Import Shapes from XYZ"));

	Set_Author		("O.Conrad (c) 2003");

	Set_Description	(_TW(
		"Imports points from a table with only list of x, y, z coordinates provided as simple text. "
		"If your table has a more complex structure, you should import it as table "
		"and then use the \'points from table\' conversion tool. "
	));

	//-----------------------------------------------------
	Parameters.Add_Shapes("",
		"POINTS"	, _TL("Points"),
		_TL(""),
		PARAMETER_OUTPUT, SHAPE_TYPE_Point
	);

	Parameters.Add_Bool("",
		"HEADLINE"	, "File contains headline",
		_TL(""),
		true
	);

	Parameters.Add_FilePath("",
		"FILENAME"	, _TL("File"),
		_TL(""),
		CSG_String::Format("%s (*.xyz)|*.xyz|%s (*.txt)|*.txt|%s|*.*",
			_TL("XYZ Files"),
			_TL("Text Files"),
			_TL("All Files")
		), NULL, false
	);
}
Ejemplo n.º 3
0
//---------------------------------------------------------
CPolygon_Centroids::CPolygon_Centroids(void)
{
	CSG_Parameter	*pNode;

	//-----------------------------------------------------
	Set_Name		(_TL("Polygon Centroids"));

	Set_Author		(SG_T("(c) 2003 by O.Conrad"));

	Set_Description	(_TW(
		"Creates a points layer containing the centroids of the input polygon layer."
	));

	//-----------------------------------------------------
	pNode	= Parameters.Add_Shapes(
		NULL	, "POLYGONS"	, _TL("Polygons"),
		_TL(""),
		PARAMETER_INPUT, SHAPE_TYPE_Polygon
	);

	//-----------------------------------------------------
	pNode	= Parameters.Add_Shapes(
		NULL	, "CENTROIDS"	, _TL("Centroids"),
		_TL(""),
		PARAMETER_OUTPUT, SHAPE_TYPE_Point
	);

	//-----------------------------------------------------
	pNode	= Parameters.Add_Value(
		NULL	, "METHOD"		, _TL("Centroids for each part"),
		_TL(""),
		PARAMETER_TYPE_Bool, false
	);

	//-----------------------------------------------------
}
Ejemplo n.º 4
0
//---------------------------------------------------------
CTA_Standard::CTA_Standard(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Basic Terrain Analysis"));

	Set_Author		("O.Conrad (c) 2005");

	Set_Description	(_TW(
		"A selection of basic parameters and objects to be derived from a Digital Terrain Model using standard settings."
	));

	//-----------------------------------------------------
	Parameters.Add_Grid  (NULL, "ELEVATION"  , _TL("Elevation"                 ), _TL(""), PARAMETER_INPUT);
	Parameters.Add_Grid  (NULL, "SHADE"      , _TL("Analytical Hillshading"    ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "SLOPE"      , _TL("Slope"                     ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "ASPECT"     , _TL("Aspect"                    ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "HCURV"      , _TL("Plan Curvature"            ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "VCURV"      , _TL("Profile Curvature"         ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "CONVERGENCE", _TL("Convergence Index"         ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "SINKS"      , _TL("Closed Depressions"        ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "CAREA"      , _TL("Total Catchment Area"      ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "WETNESS"    , _TL("Topographic Wetness Index" ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "LSFACTOR"   , _TL("LS-Factor"                 ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Shapes(NULL, "CHANNELS"   , _TL("Channel Network"           ), _TL(""), PARAMETER_OUTPUT, SHAPE_TYPE_Line);
	Parameters.Add_Shapes(NULL, "BASINS"     , _TL("Drainage Basins"           ), _TL(""), PARAMETER_OUTPUT, SHAPE_TYPE_Polygon);
	Parameters.Add_Grid  (NULL, "CHNL_BASE"  , _TL("Channel Network Base Level"), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "CHNL_DIST"  , _TL("Channel Network Distance"  ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "VALL_DEPTH" , _TL("Valley Depth"              ), _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid  (NULL, "RSP"        , _TL("Relative Slope Position"   ), _TL(""), PARAMETER_OUTPUT);

	Parameters.Add_Value(
		NULL	, "THRESHOLD"	, _TL("Channel Density"), 
		_TL("Strahler order to begin a channel."), 
		PARAMETER_TYPE_Int, 5, 1, true
	);
}
Ejemplo n.º 5
0
//---------------------------------------------------------
CGSGrid_Statistics::CGSGrid_Statistics(void)
{
	Set_Name		(_TL("Statistics for Grids"));

	Set_Author		(SG_T("O.Conrad (c) 2005"));

	Set_Description	(_TW(
		"Calculates statistical properties (arithmetic mean, minimum, maximum, "
		"variance, standard deviation) for each cell position for the values of "
		"the selected grids."
	));


	Parameters.Add_Grid_List(
		NULL, "GRIDS"	, _TL("Grids"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(NULL, "MEAN"	, _TL("Arithmetic Mean")             , _TL(""), PARAMETER_OUTPUT_OPTIONAL);
	Parameters.Add_Grid(NULL, "MIN"		, _TL("Minimum")                     , _TL(""), PARAMETER_OUTPUT_OPTIONAL);
	Parameters.Add_Grid(NULL, "MAX"		, _TL("Maximum")                     , _TL(""), PARAMETER_OUTPUT_OPTIONAL);
	Parameters.Add_Grid(NULL, "RANGE"	, _TL("Range")                       , _TL(""), PARAMETER_OUTPUT_OPTIONAL);
	Parameters.Add_Grid(NULL, "SUM"		, _TL("Sum")                         , _TL(""), PARAMETER_OUTPUT_OPTIONAL);
	Parameters.Add_Grid(NULL, "VAR"		, _TL("Variance")                    , _TL(""), PARAMETER_OUTPUT_OPTIONAL);
	Parameters.Add_Grid(NULL, "STDDEV"	, _TL("Standard Deviation")          , _TL(""), PARAMETER_OUTPUT_OPTIONAL);
	Parameters.Add_Grid(NULL, "STDDEVLO", _TL("Mean less Standard Deviation"), _TL(""), PARAMETER_OUTPUT_OPTIONAL);
	Parameters.Add_Grid(NULL, "STDDEVHI", _TL("Mean plus Standard Deviation"), _TL(""), PARAMETER_OUTPUT_OPTIONAL);
	Parameters.Add_Grid(NULL, "PCTL"	, _TL("Percentile")                  , _TL(""), PARAMETER_OUTPUT_OPTIONAL);

	Parameters.Add_Value(
		NULL, "PCTL_VAL", _TL("Percentile"),
		_TL(""),
		PARAMETER_TYPE_Double, 50.0, 0.0, true, 100.0, true
	);
}
Ejemplo n.º 6
0
//---------------------------------------------------------
CPGIS_Shapes_Load::CPGIS_Shapes_Load(void)
{
	Set_Name		(_TL("PostGIS Shapes Import"));

	Set_Author		(SG_T("O.Conrad (c) 2009"));

	Set_Description	(_TW(
		"Imports shapes from a PostGIS database via ODBC."
	));

	Parameters.Add_Shapes(
		NULL	, "SHAPES"		, _TL("Shapes"),
		_TL(""),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Choice(
		NULL	, "TABLES"		, _TL("Tables"),
		_TL(""),
		CSG_String::Format(SG_T("%s|"),
			_TL("--- no table available ---")
		)
	);
}
//---------------------------------------------------------
CGrid_Copy::CGrid_Copy(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Copy Grid"));

	Set_Author		("O.Conrad (c) 2016");

	Set_Description	(_TW(
		"Copy a grid. "
	));

	//-----------------------------------------------------
	Parameters.Add_Grid(
		NULL	, "GRID"	, _TL("Grid"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL	, "COPY"	, _TL("Copy"),
		_TL(""),
		PARAMETER_OUTPUT
	);
}
//---------------------------------------------------------
CPolygon_Vertex_Check::CPolygon_Vertex_Check(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Polygon Vertex Check"));

	Set_Author		("O.Conrad (c) 2014");

	Set_Description	(_TW(
		""
	));

	//-----------------------------------------------------
	Parameters.Add_Shapes(
		NULL	, "POLYGONS"	, _TL("Polygons"),
		_TL(""),
		PARAMETER_INPUT, SHAPE_TYPE_Polygon
	);

	Parameters.Add_Shapes(
		NULL	, "CHECKED"		, _TL("Checked"),
		_TL(""),
		PARAMETER_OUTPUT_OPTIONAL, SHAPE_TYPE_Polygon
	);

	Parameters.Add_Shapes(
		NULL	, "ADDED"		, _TL("Added"),
		_TL(""),
		PARAMETER_OUTPUT_OPTIONAL, SHAPE_TYPE_Point
	);

	Parameters.Add_Value(
		NULL	, "EPSILON"		, _TL("Tolerance"),
		_TL(""),
		PARAMETER_TYPE_Double, 0.0, 0.0, true
	);
}
Ejemplo n.º 9
0
//---------------------------------------------------------
CTable_Query_GUI::CTable_Query_GUI(void)
{
	Set_Name		(_TL("Import Table from SQL Query (GUI)"));

	Set_Author		("O.Conrad (c) 2017");

	Set_Description	(_TW(
		"Import a SQL table from a PostgreSQL database."
	));

	Parameters.Add_Table("",
		"TABLE"		, _TL("Query Result"),
		_TL(""),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Parameters("", "TABLES"  , _TL("Tables"  ), _TL("")    );
	Parameters.Add_Parameters("", "FIELDS"  , _TL("Fields"  ), _TL("")    );
	Parameters.Add_String    ("", "WHERE"   , _TL("Where"   ), _TL(""), "");
	Parameters.Add_Parameters("", "GROUP"   , _TL("Group by"), _TL("")    );
	Parameters.Add_String    ("", "HAVING"  , _TL("Having"  ), _TL(""), "");
	Parameters.Add_String    ("", "ORDER"   , _TL("Order by"), _TL(""), "");
	Parameters.Add_Bool      ("", "DISTINCT", _TL("Distinct"), _TL("")    );
}
Ejemplo n.º 10
0
//---------------------------------------------------------
CPanSharp_IHS::CPanSharp_IHS(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("IHS Sharpening"));

	Set_Author		("O.Conrad (c) 2011");

	Set_Description	(_TW(
		"Intensity, hue, saturation (IHS) sharpening."
	));

	Add_Reference("Haydn, R., Dalke, G. W., Henkel, J., Bare, J. E.", "1982",
		"Application of the IHS color transform to the processing of multisensor data and image enhancement",
		"Proceedings of the International Symposium on Remote Sensing of Arid and Semi-Arid Lands, "
		"Cairo, Egypt (Environmental Research Institute, Ann Arbor, Mich., 1982), pp. 599–616."
	);

	//-----------------------------------------------------
	Parameters.Add_Grid("", "R", _TL("Red"  ), _TL(""), PARAMETER_INPUT);
	Parameters.Add_Grid("", "G", _TL("Green"), _TL(""), PARAMETER_INPUT);
	Parameters.Add_Grid("", "B", _TL("Blue" ), _TL(""), PARAMETER_INPUT);

	Parameters.Add_Grid_System("", "PAN_SYSTEM"	, _TL("High Resolution Grid System"),
		_TL("")
	);

	Parameters.Add_Grid("PAN_SYSTEM",
		"PAN"		, _TL("Panchromatic Channel"),
		_TL(""),
		PARAMETER_INPUT, false
	);

	Parameters.Add_Grid("PAN_SYSTEM", "R_SHARP", _TL("Red"  ), _TL(""), PARAMETER_OUTPUT, false);
	Parameters.Add_Grid("PAN_SYSTEM", "G_SHARP", _TL("Green"), _TL(""), PARAMETER_OUTPUT, false);
	Parameters.Add_Grid("PAN_SYSTEM", "B_SHARP", _TL("Blue" ), _TL(""), PARAMETER_OUTPUT, false);

	Parameters.Add_Grid_List("",
		"SHARPEN"	, _TL("Sharpened Channels"),
		_TL(""),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Choice("",
		"RESAMPLING", _TL("Resampling"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|",
			_TL("nearest neighbour"),
			_TL("bilinear"),
			_TL("cubic convolution")
		), 2
	);

	Parameters.Add_Choice("",
		"PAN_MATCH"	, _TL("Panchromatic Channel Matching"),
		_TL(""),
		CSG_String::Format("%s|%s|",
			_TL("normalized"),
			_TL("standardized")
		), 0
	);
}
//---------------------------------------------------------
CLand_Surface_Temperature::CLand_Surface_Temperature(void)
{
	//-----------------------------------------------------
	Set_Name	(_TL("Land Surface Temperature"));

	Set_Author	(SG_T("(c) 2008 by O.Conrad"));

	Set_Description(_TW(
		"References:\n"
		"Bohner, J., Antonic, O. (2008): "
		"'Land-suface parameters specific to topo-climatology'. "
		"in: Hengl, T., Reuter, H. (Eds.): 'Geomorphometry - Concepts, Software, Applications', in press\n"
	));


	//-----------------------------------------------------
	Parameters.Add_Grid(
		NULL	, "DEM"			, _TL("Elevation [m]"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL	, "SWR"			, _TL("Short Wave Radiation [kW/m2]"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL	, "LAI"			, _TL("Leaf Area Index"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL	, "LST"			, _TL("Land Surface Temperature [Deg.Celsius]"),
		_TL(""),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Value(
		NULL	, "Z_REFERENCE"	, _TL("Elevation at Reference Station [m]"),
		_TL(""),
		PARAMETER_TYPE_Double	, 0.0
	);

	Parameters.Add_Value(
		NULL	, "T_REFERENCE"	, _TL("Temperature at Reference Station [Deg.Celsius]"),
		_TL(""),
		PARAMETER_TYPE_Double	, 0.0
	);

	Parameters.Add_Value(
		NULL	, "T_GRADIENT"	, _TL("Temperature Gradient [Deg.Celsius/km]"),
		_TL(""),
		PARAMETER_TYPE_Double	, 6.5
	);

	Parameters.Add_Value(
		NULL	, "C_FACTOR"	, _TL("C Factor"),
		_TL(""),
		PARAMETER_TYPE_Double	, 1.0
	);
}
Ejemplo n.º 12
0
//---------------------------------------------------------
CChannelNetwork::CChannelNetwork(void)
{
	CSG_Parameter	*pNode;

	//-----------------------------------------------------
	Set_Name(_TL("Channel Network"));

	Set_Author		(SG_T("(c) 2001 by O.Conrad"));

	Set_Description	(_TW(
		"This module derives a channel network based on gridded digital elevation data.\n"
		"Use the initiation options to determine under which conditions channels shall start.\n"
		"\n")
	);


	//-----------------------------------------------------
	// Input...

	Parameters.Add_Grid(
		NULL	, "ELEVATION"	, _TL("Elevation"),
		_TL("A grid that contains elevation data."),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL	, "SINKROUTE"	, _TL("Flow Direction"),
		_TW(
		"An optional grid that provides information about flow directions. \n"
		"Values between 1 to 8 force the flow of a cell to be given to one its adjacent neighbor cells "
		"(1->NE, 2->E, 3->SE, 4->S, 5->SW, 6->W, 7->NW, 8->N). "
		"In case of other values the algorithm will use its own routing scheme. \n"
		"This option is in particular useful to supply the algorithm with routes that lead the flow through closed depression. "),
		PARAMETER_INPUT_OPTIONAL
	);


	//-----------------------------------------------------
	// Output...

	Parameters.Add_Grid(
		NULL	, "CHNLNTWRK"	, _TL("Channel Network"),
		_TW("If a cell is part of a channel its value equals the channel order. "
		"Otherwise the cell is marked as no-data."),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Grid(
		NULL	, "CHNLROUTE"	, _TL("Channel Direction"),
		_TW("If a cell is part of a channel then its value shows the flow direction of the channel "
		"(1->NE, 2->E, 3->SE, 4->S, 5->SW, 6->W, 7->NW, 8->N). "
		"Otherwise the cell is marked as no-data."),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Shapes(
		NULL	, "SHAPES"		, _TL("Channel Network"),
		_TL("This shapes layer will contain the resulting channel network in vector format (lines)."),
		PARAMETER_OUTPUT		, SHAPE_TYPE_Line
	);


	//-----------------------------------------------------
	// Initiation...

	pNode	= Parameters.Add_Grid(
		NULL	, "INIT_GRID"	, _TL("Initiation Grid"),
		_TW("Dependent on the chosen 'Initiation Type' and 'Initiation Threshold' "
		"the values of this grid control where a channel is initiated."),
		PARAMETER_INPUT
	);

	Parameters.Add_Choice(
		pNode	, "INIT_METHOD"	, _TL("Initiation Type"),
		_TL("Options:\n - Less than\n - Equals\n - Greater than\nControls under which condition a channel is initiated."),

		CSG_String::Format(SG_T("%s|%s|%s|"),
			_TL("Less than"),
			_TL("Equals"),
			_TL("Greater than")
		), 2
	);

	Parameters.Add_Value(
		pNode	, "INIT_VALUE"	, _TL("Initiation Threshold"),
		_TL("Dependent on the chosen 'Initiation Grid' and 'Initiation Type' this value controls under which condition a channel is initiated."),
		PARAMETER_TYPE_Double	, 0.0
	);

	//-----------------------------------------------------
	pNode	= Parameters.Add_Grid(
		NULL	, "DIV_GRID"	, _TL("Divergence"),
		_TL("Tracing: Convergence"),
		PARAMETER_INPUT_OPTIONAL
	);

	Parameters.Add_Value(
		pNode	, "DIV_CELLS"	, _TL("Tracing: Max. Divergence"),
		_TL("Tracing: Stop after x cells with divergent flow"),
		PARAMETER_TYPE_Int		, 5, 1, true
	);

	//-----------------------------------------------------
	Parameters.Add_Grid(
		NULL	, "TRACE_WEIGHT", _TL("Tracing: Weight"),
		_TL("Tracing: Weight"),
		PARAMETER_INPUT_OPTIONAL
	);

	Parameters.Add_Value(
		NULL	, "MINLEN"		, _TL("Min. Segment Length"),
		_TL("Minimum Segment Length (Cells)"),
		PARAMETER_TYPE_Int		, 10
	);
}
Ejemplo n.º 13
0
//---------------------------------------------------------
CBSL_Interpreter::CBSL_Interpreter(bool bFile)
{
	m_bFile			= bFile;

	//-----------------------------------------------------
	Set_Name		(m_bFile ? _TL("BSL from File") : _TL("BSL"));

	Set_Author		(SG_T("SAGA User Group Associaton (c) 2009"));

	Set_Description	(_TW(
		"Boehner's Simple Language (BSL) is a macro script language for grid cell based calculations. "
		"BSL has been developed by C. Trachinow and J. Boehner originally as part of the grid analysis "
		"software SADO, 'System fuer die Analyse Diskreter Oberflaechen'. \n"
		"\n"
		"References:\n"
		"Boehner, J., Koethe, R., Trachinow, C. (1997): "
		"Weiterentwicklung der automatischen Reliefanalyse auf der Basis von digitalen Gelaendemodellen. – "
		"Göttinger Geogr. Abh. 100: 3-21."
	));

	//-----------------------------------------------------
	Parameters.Add_Grid_List(
		NULL, "OUTPUT"	, _TL("Output"),
		_TL(""),
		PARAMETER_OUTPUT_OPTIONAL
	);

	if( m_bFile )
	{
		Parameters.Add_FilePath(
			NULL, "BSL"		, _TL("BSL Script"),
			_TL(""),
			CSG_String::Format(SG_T("%s|%s|%s|%s|%s|%s"),
				_TL("BSL Files (*.bsl)")	, SG_T("*.bsl"),
				_TL("Text Files (*.txt)")	, SG_T("*.txt"),
				_TL("All Files")			, SG_T("*.*")
			)
		);
	}
	else
	{
		Parameters.Add_String(
			NULL, "BSL"		, _TL("BSL Script"),
			_TL(""),
			_TW(
				"Matrix R(), NIR(), NDVI, RANGE;\n"
				"Point p;\n"
				"\n"
				"NDVI  = R;\n"
				"RANGE = R;\n"
				"\n"
				"foreach p in R do\n"
				"{\n"
				"  NDVI[p]  = (NIR[p] - R[p]) / (NIR[p] + R[p]);\n"
				"  RANGE[p] = max8(p, R) - min8(p, R);\n"
				"}\n"
				"\n"
				"showMatrix(NDVI);\n"
				"showMatrix(RANGE);\n"
			), true
		);
	}

	Parameters.Add_Value(
		NULL, "PROGRESS"	, _TL("Show Progress"),
		_TL(""),
		PARAMETER_TYPE_Bool, true
	);
}
Ejemplo n.º 14
0
//---------------------------------------------------------
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
	);
}
Ejemplo n.º 15
0
//---------------------------------------------------------
CGrid_Merge::CGrid_Merge(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Mosaicking"));

	Set_Author		("O.Conrad (c) 2003-12");

	Set_Description	(_TW(
		"Merges multiple grids into one single grid."
	));

	//-----------------------------------------------------
	Parameters.Add_Grid_List(
		NULL	, "GRIDS"		, _TL("Input Grids"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_String(
		NULL	, "NAME"		, _TL("Name"),
		_TL(""),
		_TL("Mosaic")
	);

	Parameters.Add_Choice(
		NULL	, "TYPE"		, _TL("Data Storage Type"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|%s|%s|%s|%s|%s|%s|",
			_TL("1 bit"),
			_TL("1 byte unsigned integer"),
			_TL("1 byte signed integer"),
			_TL("2 byte unsigned integer"),
			_TL("2 byte signed integer"),
			_TL("4 byte unsigned integer"),
			_TL("4 byte signed integer"),
			_TL("4 byte floating point"),
			_TL("8 byte floating point")
		), 7
	);

	Parameters.Add_Choice(
		NULL	, "INTERPOL"	, _TL("Interpolation"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|%s|%s|",
			_TL("Nearest Neighbor"),
			_TL("Bilinear Interpolation"),
			_TL("Inverse Distance Interpolation"),
			_TL("Bicubic Spline Interpolation"),
			_TL("B-Spline Interpolation")
		), 0
	);

	Parameters.Add_Choice(
		NULL	, "OVERLAP"		, _TL("Overlapping Areas"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|%s|%s|%s|%s|",
			_TL("first"),
			_TL("last"),
			_TL("minimum"),
			_TL("maximum"),
			_TL("mean"),
			_TL("blend boundary"),
			_TL("feathering")
		), 1
	);

	Parameters.Add_Value(
		NULL	, "BLEND_DIST"	, _TL("Blending Distance"),
		_TL("blending distance given in map units"),
		PARAMETER_TYPE_Double, 10.0, 0.0, true
	);

	Parameters.Add_Choice(
		NULL	, "MATCH"		, _TL("Match"),
		_TL(""),
		CSG_String::Format("%s|%s|",
			_TL("none"),
			_TL("regression"),
			_TL("histogram match")
		), 0
	);

	//-----------------------------------------------------
	m_Grid_Target.Create(&Parameters, true, NULL, "TARGET_");
}
Ejemplo n.º 16
0
//---------------------------------------------------------
COpenCV_NNet::COpenCV_NNet(void)
{
	CSG_Parameter	*pNodeTrainData, *pNodeTrainAreas, *pNodeTopology, *pNodeActFun, *pNodeRPROP, *pNodeBPROP, *pNodeData;

	Set_Name		(_TL("Neural Networks (OpenCV)"));

	Set_Author		(SG_T("Luca Piras"));

	Set_Description	(_TW(
		"Integration of the OpenCV Neural Networks library.\n"
		"http://docs.opencv.org/modules/ml/doc/neural_networks.html"
	));

	#pragma region
	//---------------------------------------------------------
	pNodeTrainData = Parameters.Add_Table(
		NULL, "TRAIN_INPUT_TABLE", _TL("Train INPUT"),
		_TL("Input data to train the network."), PARAMETER_INPUT
	);

	Parameters.Add_Parameters(
		pNodeTrainData	, "TRAIN_FEATURES_TABLE", _TL("Select training output features"),
		_TL("Select the features that should be used as the OUTPUT features.")
	);

	Parameters.Add_Table(
		NULL, "EVAL_INPUT_TABLE", _TL("Prediction INPUT"),
		_TL("Input data for the trained network."), PARAMETER_INPUT
	);

	Parameters.Add_Table(
		NULL, "EVAL_OUTPUT_TABLE", _TL("OUTPUT"),
		_TL("Predicted responses (probabilities) for corresponding samples."), PARAMETER_OUTPUT
	);
	#pragma endregion Table INPUT and OUTPUT section

	#pragma region
	//---------------------------------------------------------
	Parameters.Add_Grid_List(NULL ,"TRAIN_INPUT_GRIDS", _TL("Train INPUT"),
		_TL("Input grids to train the network."),
		PARAMETER_INPUT
	);

	pNodeTrainAreas	= Parameters.Add_Shapes(
		NULL, "TRAIN_INPUT_AREAS" , _TL("Select training areas"),
		_TL("The areas used to train the neural network."),
		PARAMETER_INPUT, SHAPE_TYPE_Polygon
	);

	// TODO: Have to make a vector representation from the class identifier
	Parameters.Add_Table_Field(
		pNodeTrainAreas	, "TRAIN_INPUT_AREAS_CLASS_FIELD", _TL("Select class identifier"),
		_TL("The class field used to classify the shape. All classes will be vectorized.")
	);

	Parameters.Add_Grid(
		NULL, "EVAL_OUTPUT_GRID_CLASSES", _TL("OUTPUT classes"),
		_TL("These are the winner class vectors."),
		PARAMETER_OUTPUT, true, SG_DATATYPE_Short
	);

	Parameters.Add_Grid(
		NULL, "EVAL_OUTPUT_GRID_CERTAINTY", _TL("OUTPUT certainty"),
		_TL("These are the probabilities for the winner classes given by the neural network."),
		PARAMETER_OUTPUT_OPTIONAL
	);
	#pragma endregion Grid INPUT and OUTPUT section

	#pragma region
	//---------------------------------------------------------
	// Let the user select on which type of data we will operate
	Parameters.Add_Choice(
		NULL	, "DATA_TYPE" , _TL("Data type"),
		_TL("Choose the type of data used in this model."),
		CSG_String::Format(SG_T("%s|%s|"),
			_TL("Table"),	
			_TL("Grid")
		)
	);

	pNodeTopology = Parameters.Add_Node(
		NULL, "NETWORK_TOPOLOGY", _TL("Network topology"),
		_TL("In this section you can define the topology of the neural network.")
	);

	Parameters.Add_Value(
		pNodeTopology	, "NNET_LAYER"	, _TL("Number of layers"),
		_TL("You can specify the number of layers in the network (including input and output layer)."),
		PARAMETER_TYPE_Int, 3, 1, true
	);

	Parameters.Add_Value(
		pNodeTopology	, "NNET_NEURONS"	, _TL("Number of neurons"),
		_TL("You can specify the number of neurons in each layer of the network."),
		PARAMETER_TYPE_Int, 3, 1, true
	);

	Parameters.Add_Value(
		NULL	, "MAX_ITER"	, _TL("Maximum number of iterations"),
		_TL("Termination criteria of the training algorithm. You can specify the maximum number of iterations."),
		PARAMETER_TYPE_Int, 1000
	);

	Parameters.Add_Value(
		NULL	, "EPSILON"	, _TL("Error change (epsilon)"),
		_TL("Termination criteria of the training algorithm. You can specify how much the error could change between the iterations to make the algorithm continue (epsilon)."),
		PARAMETER_TYPE_Double, 0.01
	);

	pNodeActFun =  Parameters.Add_Choice(
		NULL	, "ACTIVATION_FUNCTION"		, _TL("Activation function"),
		_TL("Choose the activation function used by the neronal network."),
		CSG_String::Format(SG_T("%s|%s|%s|"),
			_TL("Identity"),	
			_TL("Sigmoid"),
			_TL("Gaussian")
		), 1
	);
 
	Parameters.Add_Value(
		pNodeActFun	, "ALPHA"	, _TL("Alpha"),
		_TL("This is the alpha parameter value for the sigmoid function."),
		PARAMETER_TYPE_Double, 1
	);

	Parameters.Add_Value(
		pNodeActFun	, "BETA"	, _TL("Beta"),
		_TL("This is the beta parameter value for the sigmoid function."),
		PARAMETER_TYPE_Double, 1
	);

	Parameters.Add_Choice(
		NULL	, "TRAINING_METHOD"		, _TL("Training method"),
		_TL("Choose the training method used for the neronal network."),
		CSG_String::Format(SG_T("%s|%s|"),
			_TL("Resilent propagation (RPROP)"),	
			_TL("Backpropagation algorithm")
		), 1
	);

	pNodeRPROP = Parameters.Add_Node(
		NULL, "RPROP_PARAMS", _TL("RPROP parameters"),
		_TL("This section contains all parameters used by the RPROP algorithm.")
	);

	Parameters.Add_Value(
		pNodeRPROP	, "RP_DW0"	, _TL("Initial update value"),
		_TL("Initial value delta_0 of update-values delta_ij."),
		PARAMETER_TYPE_Double, 0
	);

	Parameters.Add_Value(
		pNodeRPROP	, "RP_DW_PLUS"	, _TL("Increase factor"),
		_TL("Increase factor n_plus. Must be > 1."),
		PARAMETER_TYPE_Double, 1.2, 1.01, true
	);

	Parameters.Add_Value(
		pNodeRPROP	, "RP_DW_MINUS"	, _TL("Decrease factor"),
		_TL("Decrease factor n_minus. Must be < 1."),
		PARAMETER_TYPE_Double, 0.5, 0.01, true, 0.99, true
	);

	Parameters.Add_Value(
		pNodeRPROP, "RP_DW_MIN"	, _TL("Update values lower limit"),
		_TL("Corresponds to delta_min. Must be > 0"),
		PARAMETER_TYPE_Double, 0.1, 0.01, true
	);

	Parameters.Add_Value(
		pNodeRPROP	, "RP_DW_MAX"	, _TL("Update values upper limit"),
		_TL("Corresponds to delta_max. Must be > 1"),
		PARAMETER_TYPE_Double, 1.1, 1.01, true
	);

	pNodeBPROP = Parameters.Add_Node(
		NULL, "BPROP_PARAMS", _TL("Backpropagation parameters"),
		_TL("This section contains all parameters used by the backpropagation algorithm.")
	);

	Parameters.Add_Value(
		pNodeBPROP	, "BP_DW_SCALE"	, _TL("Weight gradient term"),
		_TL("Strength of the weight gradient term. The recommended value is about 0.1."),
		PARAMETER_TYPE_Double, 0.1
	);

	Parameters.Add_Value(
		pNodeBPROP	, "BP_MOMENT_SCALE"	, _TL("Moment term"),
		_TL("Strength of the momentum term (the difference between weights on the 2 previous iterations). This parameter provides some inertia to smooth the random fluctuations of the weights. It can vary from 0 (the feature is disabled) to 1 and beyond. The value 0.1 or so is good enough."),
		PARAMETER_TYPE_Double, 0.1
	);

	pNodeData = Parameters.Add_Node(
		NULL, "DATA", _TL("Data options"),
		_TL("Specifie options used for the training and test data.")
	);

	Parameters.Add_Table(
		pNodeData, "WEIGHTS", _TL("Sample weights"),
		_TL("Optional floating-point vector of weights for each sample. Some samples may be more important than others for training."), PARAMETER_INPUT_OPTIONAL
	);

	Parameters.Add_Table(
		pNodeData, "INDICES", _TL("Indices"),
		_TL("Optional integer vector indicating the samples (rows of inputs and outputs) that are taken into account."), PARAMETER_INPUT_OPTIONAL
	);

	Parameters.Add_Value(
		pNodeData	, "UPDATE_WEIGHTS"	, _TL("Update the network weights"),
		_TL(""),
		PARAMETER_TYPE_Bool, false
	);

	Parameters.Add_Value(
		pNodeData	, "NO_INPUT_SCALE"	, _TL("No INPUT vector normalization"),
		_TL("If false, the training algorithm normalizes each input feature independently, shifting its mean value to 0 and making the standard deviation equal to 1."),
		PARAMETER_TYPE_Bool, true
	);

	Parameters.Add_Value(
		pNodeData	, "NO_OUTPUT_SCALE"	, _TL("No OUTPUT vector normalization"),
		_TL("If false, the training algorithm normalizes each output feature independently, by transforming it to the certain range depending on the used activation function."),
		PARAMETER_TYPE_Bool, true
	);
	#pragma endregion NNet options
}
Ejemplo n.º 17
0
//---------------------------------------------------------
CCRS_Transform_Grid::CCRS_Transform_Grid(bool bList)
{
	CSG_Parameter	*pNode;

	m_bList	= bList;

	//-----------------------------------------------------
	Set_Name		(m_bList
		? _TL("Coordinate Transformation (Grid List)")
		: _TL("Coordinate Transformation (Grid)")
	);

	Set_Author		(SG_T("O. Conrad (c) 2010"));

	Set_Description	(_TW(
		"Coordinate transformation for grids.\n"
	));

	Set_Description	(Get_Description() + "\n" + CSG_CRSProjector::Get_Description());

	//-----------------------------------------------------
	if( m_bList )
	{
		pNode	= Parameters.Add_Grid_List(
			NULL	, "SOURCE"		, _TL("Source"),
			_TL(""),
			PARAMETER_INPUT
		);

		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 System"), _TL("")), false);
		m_Grid_Target.Add_Parameters_System(Add_Parameters("GET_SYSTEM", _TL("Select Grid System")      , _TL("")));
	}

	//-----------------------------------------------------
	else
	{
		pNode	= Parameters.Add_Grid(
			NULL	, "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("Select Grid")      , _TL("")));
	}

	//-----------------------------------------------------
	Parameters.Add_Value(
		pNode	, "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(
		pNode	, "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(
		pNode	, "TARGET_TYPE"	, _TL("Target"),
		_TL(""),
		CSG_String::Format(SG_T("%s|%s|%s|"),
			_TL("user defined grid system"),
			_TL("existing grid system"),
			_TL("points")
		), 0
	);

	Parameters.Add_Value(
		pNode	, "TARGET_AREA"	, _TL("Use Target Area Polygon"),
		_TL(""),
		PARAMETER_TYPE_Bool, false
	);

	//-----------------------------------------------------
	CSG_Parameters	*pParameters	= Add_Parameters("POINTS", _TL("Points"), _TL(""));

	pParameters->Add_Shapes(
		NULL	, "POINTS"		, _TL("Points"),
		_TL(""),
		PARAMETER_OUTPUT, SHAPE_TYPE_Point
	);
}
Ejemplo n.º 18
0
//---------------------------------------------------------
CFilter_Multi_Dir_Lee::CFilter_Multi_Dir_Lee(void)
{
	//-----------------------------------------------------
	Set_Name(_TL("Multi Direction Lee Filter"));

	Set_Author(_TL("Copyrights (c) 2003 by Andre Ringeler"));

	Set_Description	(_TW(
		"The module searches for the minium variance within 16 directions "
		"and applies a Lee Filter in the direction of minimum variance. The "
		"filter is edge-preserving and can be used to remove speckle noise "
		"from SAR images or to smooth DTMs. Applied to DTMs, this filter "
		"will preserve slope breaks and narrow valleys.\n\n"
		"For more details, please refer to:\n"
		"Lee, J.S. (1980): Digital image enhancement and noise filtering by use of local statistics. "
        "IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-2: 165-168\n\n"
        "Lee, J.S., Papathanassiou, K.P., Ainsworth, T.L., Grunes, M.R., Reigber, A. (1998): A "
        "New Technique for Noise Filtering of SAR Interferometric Phase Images. IEEE "
        "Transactions on Geosciences and Remote Sensing 36(5): 1456-1465.\n\n"
        "Selige, T., Böhner, J., Ringeler, A. (2006): Processing of SRTM X-SAR Data to correct interferometric "
        "elevation models for land surface process applications. In: Böhner, J., McCloy, K.R., Strobl, J. [Eds.]: "
        "SAGA - Analysis and Modelling Applications. Göttinger Geographische Abhandlungen, Vol. 115: 97-104 "
        "<a href=\"http://downloads.sourceforge.net/saga-gis/gga115_09.pdf\">&lt;PDF&gt;</a>\n"
        "\n\n"
		)
	);


	//-----------------------------------------------------
	Parameters.Add_Grid(
		NULL, "INPUT"		, _TL("Grid"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL, "RESULT"		, _TL("Filtered Grid"),
		_TL(""),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Grid(
		NULL, "STDDEV"		, _TL("Minimum Standard Deviation"),
		_TL(""),
		PARAMETER_OUTPUT_OPTIONAL
	);

	Parameters.Add_Grid(
		NULL, "DIR"			, _TL("Direction of Minimum Standard Deviation"),
		_TL(""),
		PARAMETER_OUTPUT_OPTIONAL
	);

	Parameters.Add_Value(
		NULL, "NOISE_ABS"	, _TL("Estimated Noise (absolute)"),
		_TL("Estimated noise in units of input data"),
		PARAMETER_TYPE_Double, 1.0
	);

	Parameters.Add_Value(
		NULL, "NOISE_REL"	, _TL("Estimated Noise (relative)"),
		_TL("Estimated noise relative to mean standard deviation"),
		PARAMETER_TYPE_Double, 1.0
	);

	Parameters.Add_Value(
		NULL, "WEIGHTED"	, _TL("Weighted"),
		_TL(""),
		PARAMETER_TYPE_Bool, true
	);

	Parameters.Add_Choice(
		NULL, "METHOD"		, _TL("Method"),
		_TL(""),
		CSG_String::Format(SG_T("%s|%s|%s|"),
			_TL("noise variance given as absolute value"),
			_TL("noise variance given relative to mean standard deviation"),
			_TL("original calculation (Ringeler)")
		), 1
	);

	//-----------------------------------------------------
	for(int i=1; i<8; i++)	// Mirror the last 8  filter directions
	{
		for(int y=0; y<9; y++)
		{
			for(int x=0; x<9; x++)
			{
				Filter_Directions[i + 8][y][x] = Filter_Directions[i][y][8 - x];
			}
		}
	}
}
//---------------------------------------------------------
CSet_Grid_Georeference::CSet_Grid_Georeference(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Define Georeference for Grids"));

	Set_Author		(SG_T("O.Conrad (c) 2013"));

	Set_Description	(_TW(
		"This tool simply allows definition of grid's cellsize and position. "
		"It does not perform any kind of warping but might be helpful, if the "
		"grid has lost this information or is already aligned with the "
		"coordinate system. "
	));

	//-----------------------------------------------------
	Parameters.Add_Grid_List(
		NULL	, "GRIDS"		, _TL("Grids"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid_List(
		NULL	, "REFERENCED"	, _TL("Referenced Grids"),
		_TL(""),
		PARAMETER_OUTPUT, false
	);

	//-----------------------------------------------------
	Parameters.Add_Choice(
		NULL	, "DEFINITION"	,_TL("Definition"),
		_TL(""),
		CSG_String::Format(SG_T("%s|%s|%s|%s|%s|%s|"),
			_TL("cellsize and lower left center coordinates"),
			_TL("cellsize and lower left corner coordinates"),
			_TL("cellsize and upper left center coordinates"),
			_TL("cellsize and upper left corner coordinates"),
			_TL("lower left and upper right center coordinates"),
			_TL("lower left and upper right corner coordinates")
		), 0
	);

	Parameters.Add_Value(
		NULL	, "SIZE"		, _TL("Cellsize"),
		_TL(""),
		PARAMETER_TYPE_Double, 1.0, 0.0, true
	);

	Parameters.Add_Value(
		NULL	, "XMIN"		, _TL("Left"),
		_TL(""),
		PARAMETER_TYPE_Double
	);

	Parameters.Add_Value(
		NULL	, "YMIN"		, _TL("Lower"),
		_TL(""),
		PARAMETER_TYPE_Double
	);

	Parameters.Add_Value(
		NULL	, "XMAX"		, _TL("Right"),
		_TL(""),
		PARAMETER_TYPE_Double
	);

	Parameters.Add_Value(
		NULL	, "YMAX"		, _TL("Upper"),
		_TL(""),
		PARAMETER_TYPE_Double
	);
}
Ejemplo n.º 20
0
//---------------------------------------------------------
CGridding_Spline_CSA::CGridding_Spline_CSA(void)
	: CGridding_Spline_Base()
{
	//-----------------------------------------------------
	Set_Name		(_TL("Cubic Spline Approximation"));

	Set_Author		(SG_T("O. Conrad (c) 2008"));

	Set_Description	(_TW(
		"This module approximates irregular scalar 2D data in specified points using "
		"C1-continuous bivariate cubic spline."
		"\n"
		"Minimal Number of Points:"
		"                minimal number of points locally involved"
		"                in spline calculation (normally = 3)\n"
		"\n"
		"Maximal Number of Points:"
		"npmax:          maximal number of points locally involved"
		"                in spline calculation (required > 10,"
		"                recommended 20 < npmax < 60)"
		"\n"
		"Tolerance:"
		"                relative tolerance multiple in fitting"
		"                spline coefficients: the higher this"
		"                value, the higher degree of the locally"
		"                fitted spline (recommended 80 < k < 200)\n"
		"\n"
		"Points per square:"
		"                average number of points per square"
		"                (increase if the point distribution is strongly non-uniform"
		"                to get larger cells)\n"
		"\n"
 		"Author:         Pavel Sakov,"
 		"                CSIRO Marine Research\n"
		"\n"
 		"Purpose:        2D data approximation with bivariate C1 cubic spline."
 		"                A set of library functions + standalone utility.\n"
 		"\n"
 		"Description:    See J. Haber, F. Zeilfelder, O.Davydov and H.-P. Seidel,"
 		"                Smooth approximation and rendering of large scattered data"
 		"                sets, in 'Proceedings of IEEE Visualization 2001'"
 		"                (Th.Ertl, K.Joy and A.Varshney, Eds.), pp.341-347, 571,"
 		"                IEEE Computer Society, 2001.\n"
 		"<a target=\"_blank\" href=\"http://www.uni-giessen.de/www-Numerische-Mathematik/davydov/VIS2001.ps.gz\">"
		"www.uni-giessen.de/www-Numerische-Mathematik/davydov/VIS2001.ps.gz</a>\n"

 		"<a target=\"_blank\" href=\"http://www.math.uni-mannheim.de/~lsmath4/paper/VIS2001.pdf.gz\">"
		"www.math.uni-mannheim.de/~lsmath4/paper/VIS2001.pdf.gz</a>\n"
	));

	//-----------------------------------------------------
	Parameters.Add_Value(
		NULL	, "NPMIN"		, _TL("Minimal Number of Points"),
		_TL(""),
		PARAMETER_TYPE_Int		, 3, 0, true
	);

	Parameters.Add_Value(
		NULL	, "NPMAX"		, _TL("Maximal Number of Points"),
		_TL(""),
		PARAMETER_TYPE_Int		, 20, 11, true, 59, true
	);

	Parameters.Add_Value(
		NULL	, "NPPC"		, _TL("Points per Square"),
		_TL(""),
		PARAMETER_TYPE_Double	, 5, 1, true
	);

	Parameters.Add_Value(
		NULL	, "K"			, _TL("Tolerance"),
		_TL("Spline sensitivity, reduce to get smoother results, recommended: 80 < Tolerance < 200"),
		PARAMETER_TYPE_Int		, 140, 0, true
	);
}
Ejemplo n.º 21
0
CImage_VI_Slope::CImage_VI_Slope(void){

	Set_Name(_TL("Vegetation Index[slope based]"));
	Set_Author(_TL("Copyrights (c) 2004 by Victor Olaya"));
	Set_Description	(_TW(
		"(c) 2004 by Victor Olaya. Slope-based Vegetation Indexes"));

	Parameters.Add_Grid(NULL, 
						"NIR", 
						_TL("Near Infrared Band"), 
						_TL(""), 
						PARAMETER_INPUT);

	Parameters.Add_Grid(NULL, 
						"RED", 
						_TL("Red Band"), 
						_TL(""), 
						PARAMETER_INPUT);

		
	Parameters.Add_Grid(NULL, 
						"NDVI", 
						_TL("Normalized Difference Vegetation Index"), 
						_TL(""), 
						PARAMETER_OUTPUT, 
						true, 
						SG_DATATYPE_Double);
	
	Parameters.Add_Grid(NULL, 
						"RATIO", 
						_TL("Ratio Vegetation Index"), 
						_TL(""), 
						PARAMETER_OUTPUT_OPTIONAL, 
						true, 
						SG_DATATYPE_Double);

	Parameters.Add_Grid(NULL, 
						"TVI", 
						_TL("Transformed Vegetation Index"), 
						_TL(""), 
						PARAMETER_OUTPUT_OPTIONAL, 
						true, 
						SG_DATATYPE_Double);

	Parameters.Add_Grid(NULL, 
						"CTVI", 
						_TL("Corrected Transformed Vegetation Index"), 
						_TL(""), 
						PARAMETER_OUTPUT_OPTIONAL, 
						true, 
						SG_DATATYPE_Double);

	Parameters.Add_Grid(NULL, 
						"TTVI", 
						_TL("Thiam's Transformed Vegetation Index"), 
						_TL(""), 
						PARAMETER_OUTPUT_OPTIONAL, 
						true, 
						SG_DATATYPE_Double);

	Parameters.Add_Grid(NULL, 
						"NRATIO", 
						_TL("Normalized Ratio Vegetation Index"), 
						_TL(""), 
						PARAMETER_OUTPUT_OPTIONAL, 
						true, 
						SG_DATATYPE_Double);

}//constructor
Ejemplo n.º 22
0
//---------------------------------------------------------
CGeoref_Shapes::CGeoref_Shapes(void)
{
	CSG_Parameter	*pNode;

	//-----------------------------------------------------
	Set_Name		(_TL("Warping Shapes"));

	Set_Author		(SG_T("O.Conrad (c) 2006"));

	Set_Description	(_TW(
		"Georeferencing of shapes layers. Either choose the attribute fields (x/y) "
		"with the projected coordinates for the reference points (origin) or supply a "
		"additional points layer with correspondend points in the target projection. "
	));

	//-----------------------------------------------------
	pNode	= Parameters.Add_Shapes(
		NULL	, "REF_SOURCE"	, _TL("Reference Points (Origin)"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Shapes(
		NULL	, "REF_TARGET"	, _TL("Reference Points (Projection)"),
		_TL(""),
		PARAMETER_INPUT_OPTIONAL
	);

	Parameters.Add_Table_Field(
		pNode	, "XFIELD"		, _TL("x Position"),
		_TL("")
	);

	Parameters.Add_Table_Field(
		pNode	, "YFIELD"		, _TL("y Position"),
		_TL("")
	);

	Parameters.Add_Choice(
		NULL	, "METHOD"		, _TL("Method"),
		_TL(""),
		GEOREF_METHODS_CHOICE, 0
	);

	Parameters.Add_Value(
		NULL	, "ORDER"		,_TL("Polynomial Order"),
		_TL(""),
		PARAMETER_TYPE_Int, 3, 1, true
	);

	//-----------------------------------------------------
	Parameters.Add_Shapes(
		NULL	, "INPUT"		, _TL("Input"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Shapes(
		NULL	, "OUTPUT"		, _TL("Output"),
		_TL(""),
		PARAMETER_OUTPUT
	);
}
Ejemplo n.º 23
0
//---------------------------------------------------------
CPolygon_Dissolve::CPolygon_Dissolve(void)
{
	CSG_Parameter	*pNode;

	//-----------------------------------------------------
	Set_Name		(_TL("Polygon Dissolve"));

	Set_Author		("O.Conrad (c) 2008");

	Set_Description	(_TW(
		"Merges polygons, which share the same attribute value, and "
		"(optionally) dissolves borders between adjacent polygon parts. "
		"If no attribute or combination of attributes is chosen, all polygons will be merged. "
		"\nUses the free and open source software library <b>Clipper</b> created by Angus Johnson.\n"
		"<a target=\"_blank\" href=\"http://www.angusj.com/delphi/clipper.php\">Clipper Homepage</a>\n"
		"<a target=\"_blank\" href=\"http://sourceforge.net/projects/polyclipping/\">Clipper at SourceForge</a>\n"
	));

	//-----------------------------------------------------
	pNode	= Parameters.Add_Shapes(
		NULL	, "POLYGONS"	, _TL("Polygons"),
		_TL(""),
		PARAMETER_INPUT, SHAPE_TYPE_Polygon
	);

	Parameters.Add_Table_Field(pNode, "FIELD_1", _TL("1. Attribute"), _TL(""), true);
	Parameters.Add_Table_Field(pNode, "FIELD_2", _TL("2. Attribute"), _TL(""), true);
	Parameters.Add_Table_Field(pNode, "FIELD_3", _TL("3. Attribute"), _TL(""), true);

	Parameters.Add_Shapes(
		NULL	, "DISSOLVED"	, _TL("Dissolved Polygons"),
		_TL(""),
		PARAMETER_OUTPUT, SHAPE_TYPE_Polygon
	);

	Parameters.Add_Value(
		NULL	, "BND_KEEP"	, _TL("Keep Boundaries"),
		_TL(""),
		PARAMETER_TYPE_Bool, false
	);

	pNode	= Parameters.Add_Table_Fields(
		pNode	, "STAT_FIELDS"	, _TL("Statistics"),
		_TL("")
	);

	Parameters.Add_Value(pNode, "STAT_SUM", _TL("Sum"      ), _TL(""), PARAMETER_TYPE_Bool, false);
	Parameters.Add_Value(pNode, "STAT_AVG", _TL("Mean"     ), _TL(""), PARAMETER_TYPE_Bool, true );
	Parameters.Add_Value(pNode, "STAT_MIN", _TL("Minimum"  ), _TL(""), PARAMETER_TYPE_Bool, false);
	Parameters.Add_Value(pNode, "STAT_MAX", _TL("Maximum"  ), _TL(""), PARAMETER_TYPE_Bool, false);
	Parameters.Add_Value(pNode, "STAT_RNG", _TL("Range"    ), _TL(""), PARAMETER_TYPE_Bool, false);
	Parameters.Add_Value(pNode, "STAT_DEV", _TL("Deviation"), _TL(""), PARAMETER_TYPE_Bool, false);
	Parameters.Add_Value(pNode, "STAT_VAR", _TL("Variance" ), _TL(""), PARAMETER_TYPE_Bool, false);
	Parameters.Add_Value(pNode, "STAT_LST", _TL("Listing"  ), _TL(""), PARAMETER_TYPE_Bool, false);
	Parameters.Add_Value(pNode, "STAT_NUM", _TL("Count"    ), _TL(""), PARAMETER_TYPE_Bool, false);

	Parameters.Add_Choice(
		pNode, "STAT_NAMING"	, _TL("Field Naming"),
		_TL(""), 
		CSG_String::Format(SG_T("%s|%s|%s|%s|"),
			_TL("variable type + original name"),
			_TL("original name + variable type"),
			_TL("original name"),
			_TL("variable type")
		), 0
	);
}
//---------------------------------------------------------
CGrid_Value_Replace::CGrid_Value_Replace(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Change Grid Values"));

	Set_Author		("O.Conrad (c) 2001");

	Set_Description	(_TW(
		"Changes values of a grid according to the rules of a user defined lookup table. "
		"Values or value ranges that are not listed in the lookup table remain unchanged. "
		"If the target is not set, the changes will be stored to the original grid. "
	));

	//-----------------------------------------------------
	Parameters.Add_Grid(NULL,
		"INPUT"		, _TL("Grid"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(NULL,
		"OUTPUT"	, _TL("Changed Grid"),
		_TL(""),
		PARAMETER_OUTPUT_OPTIONAL
	);

	Parameters.Add_Choice(NULL,
		"METHOD"	, _TL("Replace Condition"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|",
			_TL("identity"),
			_TL("range"),
			_TL("synchronize look-up table classification")
		)
	);

	//-----------------------------------------------------
	CSG_Table	*pLUT;

	pLUT	= Parameters.Add_FixedTable(NULL,
		"IDENTITY"	, _TL("Lookup Table"),
		_TL("")
	)->asTable();

	pLUT->Add_Field(_TL("New Value"), SG_DATATYPE_Double);
	pLUT->Add_Field(_TL("Value"    ), SG_DATATYPE_Double);
	pLUT->Add_Record();

	pLUT	= Parameters.Add_FixedTable(NULL,
		"RANGE"		, _TL("Lookup Table"),
		_TL("")
	)->asTable();

	pLUT->Add_Field(_TL("New Value"), SG_DATATYPE_Double);
	pLUT->Add_Field(_TL("Minimum"  ), SG_DATATYPE_Double);
	pLUT->Add_Field(_TL("Maximum"  ), SG_DATATYPE_Double);
	pLUT->Add_Record();

	Parameters.Add_Grid(NULL,
		"GRID"		, _TL("Grid Classification"),
		_TL("Synchronize with look-up table classification of another grid (gui only)."),
		PARAMETER_INPUT
	);
}
Ejemplo n.º 25
0
//---------------------------------------------------------
CKriging_Universal::CKriging_Universal(void)
	: CKriging_Universal_Global()
{
	CSG_Parameter	*pNode;

	//-----------------------------------------------------
	Set_Name		(_TL("Universal Kriging"));

	Set_Author		(SG_T("O.Conrad (c) 2008"));

	Set_Description	(_TW(
		"Universal Kriging for grid interpolation from irregular sample points."
	));

	//-----------------------------------------------------
	CSG_Parameter	*pSearch	= Parameters.Add_Node(
		NULL	, "NODE_SEARCH"			, _TL("Search Options"),
		_TL("")
	);

	pNode	= Parameters.Add_Choice(
		pSearch	, "SEARCH_RANGE"		, _TL("Search Range"),
		_TL(""),
		CSG_String::Format(SG_T("%s|%s|"),
			_TL("local"),
			_TL("global")
		)
	);

	Parameters.Add_Value(
		pNode	, "SEARCH_RADIUS"		, _TL("Maximum Search Distance"),
		_TL("local maximum search distance given in map units"),
		PARAMETER_TYPE_Double	, 1000.0, 0, true
	);

	pNode	= Parameters.Add_Choice(
		pSearch	, "SEARCH_POINTS_ALL"	, _TL("Number of Points"),
		_TL(""),
		CSG_String::Format(SG_T("%s|%s|"),
			_TL("maximum number of nearest points"),
			_TL("all points within search distance")
		)
	);

	Parameters.Add_Value(
		pNode	, "SEARCH_POINTS_MIN"	, _TL("Minimum"),
		_TL("minimum number of points to use"),
		PARAMETER_TYPE_Int, 4, 1, true
	);

	Parameters.Add_Value(
		pNode	, "SEARCH_POINTS_MAX"	, _TL("Maximum"),
		_TL("maximum number of nearest points"),
		PARAMETER_TYPE_Int, 20, 1, true
	);

	Parameters.Add_Choice(
		pNode	, "SEARCH_DIRECTION"	, _TL("Search Direction"),
		_TL(""),
		CSG_String::Format(SG_T("%s|%s|"),
			_TL("all directions"),
			_TL("quadrants")
		)
	);
}
Ejemplo n.º 26
0
//---------------------------------------------------------
CGraticuleBuilder::CGraticuleBuilder(void)
{
	Set_Name		(_TL("Create Graticule"));

	Set_Author		("V.Olaya (c) 2004");

	Set_Description	(_TW(
		"(c) 2004 by Victor Olaya. "
	));

	//-----------------------------------------------------
	Parameters.Add_Shapes(
		NULL	, "GRATICULE_LINE"	, _TL("Graticule"),
		_TL(""),
		PARAMETER_OUTPUT, SHAPE_TYPE_Line
	);

	Parameters.Add_Shapes(
		NULL	, "GRATICULE_RECT"	, _TL("Graticule"),
		_TL(""),
		PARAMETER_OUTPUT, SHAPE_TYPE_Polygon
	);

	Parameters.Add_Choice(
		NULL	, "TYPE"			, _TL("Type"),
		_TL(""),
		CSG_String::Format("%s|%s|",
			_TL("Lines"),
			_TL("Rectangles")
		), 0
	);

	//-----------------------------------------------------
	Parameters.Add_Shapes(
		NULL	, "EXTENT"			, _TL("Extent"), 
		_TL(""),
		PARAMETER_INPUT_OPTIONAL
	);
				
	Parameters.Add_Range(
		NULL	, "EXTENT_X"		, _TL("Width"),
		_TL(""),
		-180.0, 180.0
	);

	Parameters.Add_Range(
		NULL	, "EXTENT_Y"		, _TL("Height"),
		_TL(""),
		-90.0, 90.0
	);

	Parameters.Add_Value(
		NULL	, "DIVISION_X"		, _TL("Division Width"),
		_TL(""), 
		PARAMETER_TYPE_Double, 10.0, 0.0, true
	);

	Parameters.Add_Value(
		NULL	, "DIVISION_Y"		, _TL("Division Height"),
		_TL(""), 
		PARAMETER_TYPE_Double, 10.0, 0.0, true
	);

	Parameters.Add_Choice(
		NULL	, "ALIGNMENT"		, _TL("Alignment"),
		_TL("Determines how the graticule is aligned to the extent, if division sizes do not fit."), 
		CSG_String::Format("%s|%s|%s|%s|%s|",
			_TL("bottom-left"),
			_TL("top-left"),
			_TL("bottom-right"),
			_TL("top-right"),
			_TL("centered")
		), 0
	);
}
Ejemplo n.º 27
0
//---------------------------------------------------------
CPanSharp_PCA::CPanSharp_PCA(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Principal Component Based Image Sharpening"));

	Set_Author		("O.Conrad (c) 2011");

	Set_Description	(_TW(
		"Principal component based image sharpening."
	));

	//-----------------------------------------------------
	Parameters.Add_Grid_System("",
		"LO_RES"	, _TL("Low Resolution"),
		_TL("")
	);

	Parameters.Add_Grid_List("LO_RES",
		"GRIDS"		, _TL("Original Channels"),
		_TL(""),
		PARAMETER_INPUT, false
	);

	Parameters.Add_Grid("",
		"PAN"		, _TL("Panchromatic Channel"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid_List("",
		"SHARPEN"	, _TL("Sharpened Channels"),
		_TL(""),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Choice("",
		"METHOD"	, _TL("Method"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|",
			_TL("correlation matrix"),
			_TL("variance-covariance matrix"),
			_TL("sums-of-squares-and-cross-products matrix")
		), 1
	);

	Parameters.Add_Choice("",
		"RESAMPLING", _TL("Resampling"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|",
			_TL("nearest neighbour"),
			_TL("bilinear"),
			_TL("cubic convolution")
		), 2
	);

	Parameters.Add_Choice("",
		"PAN_MATCH"	, _TL("Panchromatic Channel Matching"),
		_TL(""),
		CSG_String::Format("%s|%s|",
			_TL("normalized"),
			_TL("standardized")
		), 1
	);

	Parameters.Add_Bool("",
		"OVERWRITE"	, _TL("Overwrite"),
		_TL("overwrite previous output if adequate"),
		true
	);
}
Ejemplo n.º 28
0
//---------------------------------------------------------
CResection::CResection(void)
{
	Set_Name		(_TL("Resection (Terrestrial)"));

	Set_Author		(SG_T("HfT Stuttgart (c) 2013"));

	Set_Description	(_TW(
		"Single Image Spatial Resection (Terrestrial): from at least 3 image points with known "
		"coordinates, the Cardan angles of the image orientation and the coordinates of the "
		"perspective center are calculated by a least-squares adjustment. The Cardan angles "
		"refer to the following transformation between image coordinates (x_image) and global "
		"coordinates (X_Global): \n\t x_image = R_1(omega) * R_2(kappa) * R_3(alpha) * X_Global "
		"\n Here R_1, R_2, R_3 denote rotation matrices of a right-handed (passive) coordinate "
		"transformation.\n\nThe inputs consist of a point cloud containing the identical points "
		"with their pixel indices as additional attributes. The origin of pixels is in the lower "
		"left corner of the image. The interior orientation parameters of the camera is to be "
		"provided. These include Focal Length (mm), Pixel Size (um), Principal Point Offsets (pixels) "
		"and optionally the Radial Distortion Parameters. The distortion model being used is as follows: "
		"\n	 x_d = x_u (1 - dR)"
		"\n	 y_d = y_u (1 - dR) "
		"\n where, dR = K1 * r_u ^ 2 + K2 * r_u ^ 4 + K3 * r_u ^ 6,"
		"\n r_u ^ 2  = x_u ^ 2 + y_u ^ 2,"
		"\n x_u, y_u are the undistorted (corrected) image coordinates in mm,"
		"\n x_d, y_d are the distorted (observed) image coordinates in mm,"
		"\n K1 is in [mm ^ -2], K2 is in [mm ^ -4],  K3 is in [mm ^ -6]."
		"\nApproximate coordinates in [m] for the Projection Center and the center of image are also "
		"to be provided.\n\nFollowing the adjustment the results are written to a text file. The main "
		"contents of the text file are: for each iteration the Sum of Squared Residuals, the A-Posteriori "
		"Standard Deviation (Sigma Naught) and the Condition of Normal Matrix, and the final estimated "
		"exterior orientation parameters (Xc, Yc, Zc, Omega, Kappa, Alpha).\n\n Optionally the Principal "
		"Point Offsets can be estimated. This requires at least 4 image points as input."
		"\n\n[Warning] The module is dedicated to the terrestrial case which means the viewing direction "
		"must be sufficiently different from the vertical direction."
		"\nThe estimation of Principal Point Offsets is not recommended if the condition of the Normal "
		"Matrix is less than 10 ^ -7."
		"\n\n"
	));

	//-----------------------------------------------------
	Parameters.Add_PointCloud(
		NULL	, "POINTS"		, _TL("Measured Points (PC)"),
		_TL("List of Measured Points as PC"),
		PARAMETER_INPUT
	);

	Parameters.Add_Node(NULL, "INT ORI", _TL("Interior Orientation Parameters"), _TL("Internal Orientation Parameters"));
		Parameters.Add_Value (Parameters("INT ORI"), "F", _TL ("Focal Length (mm)"), _TL ("Focal Length in mm"), PARAMETER_TYPE_Double);
		Parameters.Add_Value (Parameters("INT ORI"), "W", _TL ("Pixel Width (um)"), _TL ("Pixel Width in micro meters"), PARAMETER_TYPE_Double);
		Parameters.Add_Value (Parameters("INT ORI"), "EST_OFFSETS", _TL ("Estimate Principal Point Offsets?"), _TL ("Do you wish to estimate Principal Point Offsets?"), PARAMETER_TYPE_Bool, false);
		Parameters.Add_Value (Parameters("INT ORI"), "ppX", _TL ("Principal Point Offset in X (pixels)"), _TL ("Principal Point Offset in X"), PARAMETER_TYPE_Double);
		Parameters.Add_Value (Parameters("INT ORI"), "ppY", _TL ("Principal Point Offset in Y (pixels)"), _TL ("Principal Point Offset in Y"), PARAMETER_TYPE_Double);
		Parameters.Add_Value (Parameters("INT ORI"), "GIVE_DISTORTIONS", _TL ("Provide Radial Distortion Parameters?"), _TL ("Do you wish to provide the Radial Distortion Parameters?"), PARAMETER_TYPE_Bool, false);
		Parameters.Add_Value (Parameters("INT ORI"), "K1", _TL ("K1"), _TL ("K1"), PARAMETER_TYPE_Double, 0.0);
		Parameters.Add_Value (Parameters("INT ORI"), "K2", _TL ("K2"), _TL ("K2"), PARAMETER_TYPE_Double, 0.0);
		Parameters.Add_Value (Parameters("INT ORI"), "K3", _TL ("K3"), _TL ("K3"), PARAMETER_TYPE_Double, 0.0);

	Parameters.Add_Node(NULL, "PROJ CENTER", _TL("Approximate Coordinates of Projection Center"), _TL("Approximate Coordinates of Projection Center"));
		Parameters.Add_Value (Parameters("PROJ CENTER"), "Xc", _TL ("X"), _TL ("Approximate Coordinate"), PARAMETER_TYPE_Double);
		Parameters.Add_Value (Parameters("PROJ CENTER"), "Yc", _TL ("Y"), _TL ("Approximate Coordinate"), PARAMETER_TYPE_Double);
		Parameters.Add_Value (Parameters("PROJ CENTER"), "Zc", _TL ("Z"), _TL ("Approximate Coordinate"), PARAMETER_TYPE_Double);

	Parameters.Add_Node(NULL, "TARGET", _TL("Approximate Coordinates of Target Point"), _TL("Approximate Coordinates of Target Point"));
		Parameters.Add_Value (Parameters("TARGET"), "Xt", _TL ("X"), _TL ("Approximate Coordinate"), PARAMETER_TYPE_Double);
		Parameters.Add_Value (Parameters("TARGET"), "Yt", _TL ("Y"), _TL ("Approximate Coordinate"), PARAMETER_TYPE_Double);
		Parameters.Add_Value (Parameters("TARGET"), "Zt", _TL ("Z"), _TL ("Approximate Coordinate"), PARAMETER_TYPE_Double);

	Parameters.Add_FilePath(
		NULL	, "OUTPUT FILE"	, _TL("Output Text File"),
		_TL("The file to write the Calculation Results to."),
		CSG_String::Format(SG_T("%s|%s"),
			_TL("Text Files (*.txt)")	, SG_T("*.txt")
		), NULL, true
	);
	
}
Ejemplo n.º 29
0
//---------------------------------------------------------
CFlow_RecursiveUp::CFlow_RecursiveUp(void)
{
	Set_Name		(_TL("Catchment Area (Recursive)"));

	Set_Author		(SG_T("O.Conrad (c) 2001"));

	Set_Description	(_TW(
		"Recursive upward processing of cells for calculation of flow accumulation and related parameters. "
		"This set of algorithms processes recursively all upwards connected cells until each cell of the DEM has been processed.\n\n"

		"References:\n\n"

		"Deterministic 8\n"
		"- O'Callaghan, J.F. / Mark, D.M. (1984):\n"
		"    'The extraction of drainage networks from digital elevation data',\n"
		"    Computer Vision, Graphics and Image Processing, 28:323-344\n\n"

		"Rho 8:\n"
		"- Fairfield, J. / Leymarie, P. (1991):\n"
		"    'Drainage networks from grid digital elevation models',\n"
		"    Water Resources Research, 27:709-717\n\n"

		"Deterministic Infinity:\n"
		"- Tarboton, D.G. (1997):\n"
		"    'A new method for the determination of flow directions and upslope areas in grid digital elevation models',\n"
		"    Water Resources Research, Vol.33, No.2, p.309-319\n\n"

		"Multiple Flow Direction:\n"
		"- Freeman, G.T. (1991):\n"
		"    'Calculating catchment area with divergent flow based on a regular grid',\n"
		"    Computers and Geosciences, 17:413-22\n\n"

		"- Quinn, P.F. / Beven, K.J. / Chevallier, P. / Planchon, O. (1991):\n"
		"    'The prediction of hillslope flow paths for distributed hydrological modelling using digital terrain models',\n"
		"    Hydrological Processes, 5:59-79\n\n")
	);


	//-----------------------------------------------------
	// Input...

	Parameters.Add_Grid(
		NULL	, "TARGETS"		, _TL("Target Areas"),
		_TL(""),
		PARAMETER_INPUT_OPTIONAL
	);


	//-----------------------------------------------------
	// Output...

	Parameters.Add_Grid(
		NULL	, "FLOWLEN"		, _TL("Flow Path Length"),
		_TL(""),
		PARAMETER_OUTPUT_OPTIONAL
	);


	//-----------------------------------------------------
	// Method...

	Parameters.Add_Choice(
		NULL	, "Method"		, _TL("Method"),
		_TL(""),
		CSG_String::Format(SG_T("%s|%s|%s|%s|"),
			_TL("Deterministic 8"),
			_TL("Rho 8"),
			_TL("Deterministic Infinity"),
			_TL("Multiple Flow Direction")
		), 3
	);


	//-----------------------------------------------------
	// Options...

	Parameters.Add_Value(
		NULL	, "CONVERGENCE"	, _TL("Convergence"),
		_TL("Convergence factor for Multiple Flow Direction Algorithm (Freeman 1991)"),
		PARAMETER_TYPE_Double	, 1.1
	);

	
	//-----------------------------------------------------
	// Initialisations...

	Flow	= NULL;
}
//---------------------------------------------------------
CChannelNetwork_Distance::CChannelNetwork_Distance(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Overland Flow Distance to Channel Network"));

	Set_Author		(SG_T("O.Conrad (c) 2001-14"));

	Set_Description	(_TW(
		"This module calculates overland flow distances to a channel network "
		"based on gridded digital elevation data and channel network information. "
		"The flow algorithm may be either Deterministic 8 (O'Callaghan & Mark 1984) "
		"or Multiple Flow Direction (Freeman 1991). Sediment Delivery Rates (SDR) "
		"according to Ali & De Boer (2010) can be computed optionally. "
		"\n\nReferences:\n"
		"- Ali, K. F., De Boer, D. H. (2010): Spatially distributed erosion and sediment yield modeling in the upper Indus River basin."
		" Water Resources Research, 46(8), W08504. doi:10.1029/2009WR008762\n"
		"- Freeman, G.T., 1991: Calculating catchment area with divergent flow based on a regular grid."
		" Computers and Geosciences, 17:413-22.\n"
		"- O'Callaghan, J.F., Mark, D.M., 1984: The extraction of drainage networks from digital elevation data."
		" Computer Vision, Graphics and Image Processing, 28:323-344.\n"
		"- Nobre, A.D., Cuartas, L.A., Hodnett, M., Renno, C.D., Rodrigues, G., Silveira, A., Waterloo, M., Saleska S. (2011): Height Above the Nearest Drainage - a hydrologically relevant new terrain model."
		" Journal of Hydrology, Vol. 404, Issues 1-2, pp. 13-29, ISSN 0022-1694, 10.1016/j.jhydrol.2011.03.051."
		" <a target=\"_blank\" href=\"http://www.sciencedirect.com/science/article/pii/S0022169411002599\">online</a>\n"
	));


	//-----------------------------------------------------
	Parameters.Add_Grid(
		NULL	, "ELEVATION"	, _TL("Elevation"),
		_TL("A grid that contains elevation data."),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL	, "CHANNELS"	, _TL("Channel Network"),
		_TW("A grid providing information about the channel network. It is assumed that no-data cells are not part "
		"of the channel network. Vice versa all others cells are recognised as channel network members."),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL	, "ROUTE"		, _TL("Preferred Routing"),
		_TL("Downhill flow is bound to preferred routing cells, where these are not no-data. Helps to model e.g. small ditches, that are not well represented in the elevation data."),
		PARAMETER_INPUT_OPTIONAL
	);

	//-----------------------------------------------------
	Parameters.Add_Grid(
		NULL	, "DISTANCE"	, _TL("Overland Flow Distance"),
		_TW("The overland flow distance in map units. "
		"It is assumed that the (vertical) elevation data use the same units as the (horizontal) grid coordinates."),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Grid(
		NULL	, "DISTVERT"	, _TL("Vertical Overland Flow Distance"),
		_TL("This is the vertical component of the overland flow"),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Grid(
		NULL	, "DISTHORZ"	, _TL("Horizontal Overland Flow Distance"),
		_TL("This is the horizontal component of the overland flow"),
		PARAMETER_OUTPUT
	);

	//-----------------------------------------------------
	Parameters.Add_Grid(
		NULL	, "TIME"		, _TL("Flow Travel Time"),
		_TL("flow travel time to channel expressed in hours based on Manning's Equation"),
		PARAMETER_OUTPUT_OPTIONAL
	);

	Parameters.Add_Grid(
		NULL	, "SDR"			, _TL("Sediment Yield Delivery Ratio"),
		_TL("This is the horizontal component of the overland flow"),
		PARAMETER_OUTPUT_OPTIONAL
	);

	//-----------------------------------------------------
	Parameters.Add_Grid(
		NULL	, "FIELDS"		, _TL("Fields"),
		_TL("If set, output is given about the number of fields a flow path visits downhill. For D8 only."),
		PARAMETER_INPUT_OPTIONAL
	);

	Parameters.Add_Grid(
		NULL	, "PASSES"		, _TL("Fields Visited"),
		_TL("Number of fields a flow path visits downhill starting at a cell. For D8 only."),
		PARAMETER_OUTPUT, true, SG_DATATYPE_Short
	);

	//-----------------------------------------------------
	Parameters.Add_Choice(
		NULL	, "METHOD"		, _TL("Flow Algorithm"),
		_TL("Choose a flow routing algorithm that shall be used for the overland flow distance calculation:\n- D8\n- MFD"),
		CSG_String::Format(SG_T("%s|%s|"),
			_TL("D8"),
			_TL("MFD")
		), 1
	);

	Parameters.Add_Value(
		NULL	, "FLOW_B"		, _TL("Beta"),
		_TL("catchment specific parameter for sediment delivery ratio calculation"),
		PARAMETER_TYPE_Double, 1.0, 0.0, true
	);

	Parameters.Add_Grid_or_Const(
		NULL	, "FLOW_K"		, _TL("Manning-Strickler Coefficient"),
		_TL("Manning-Strickler coefficient for flow travel time estimation (reciprocal of Manning's Roughness Coefficient)"),
		20.0, 0.0, true
	);

	Parameters.Add_Grid_or_Const(
		NULL	, "FLOW_R"		, _TL("Flow Depth"),
		_TL("flow depth [m] for flow travel time estimation"),
		0.05, 0.0, true
	);
}