//---------------------------------------------------------
CKriging_Simple::CKriging_Simple(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Simple Kriging"));

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

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

	//-----------------------------------------------------
}
Example #2
0
//---------------------------------------------------------
COpenCV_ML_NBayes::COpenCV_ML_NBayes(void)
	: COpenCV_ML(true)
{
	Set_Name		(_TL("Normal Bayes Classification (OpenCV)"));

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

	Set_Description	(_TW(
		"Integration of the OpenCV Machine Learning library for "
		"Normal Bayes classification of gridded features.\n"
		"<a href=\"http://docs.opencv.org\">Open Source Computer Vision</a>"
	));
}
//---------------------------------------------------------
CKriging_Ordinary_Global::CKriging_Ordinary_Global(void)
	: CKriging_Base()
{
	Set_Name		(_TL("Ordinary Kriging (VF, Global)"));

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

	Set_Description	(_TW(
		"Ordinary Kriging for grid interpolation from irregular sample points. "
		"This implementation does not use a maximum search radius. The weighting "
		"matrix is generated once globally for all points."
	));
}
Example #4
0
//---------------------------------------------------------
COpenCV_ML_SVM::COpenCV_ML_SVM(void)
	: COpenCV_ML(false)
{
	Set_Name		(_TL("Support Vector Machine Classification (OpenCV)"));

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

	Set_Description	(_TW(
		"Integration of the OpenCV Machine Learning library for "
		"Support Vector Machine classification of gridded features.\n"
		"<a href=\"http://docs.opencv.org\">Open Source Computer Vision</a>"
	));

	//-----------------------------------------------------
	CSG_Parameter	*pNode;

	pNode	= Parameters.Add_Choice(
		NULL	, "SVM_TYPE"	, _TL("SVM Type"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|%s|%s|",
			_TL("c-support vector classification"),
			_TL("nu support vector classification"),
			_TL("distribution estimation (one class)"),
			_TL("epsilon support vector regression"),
			_TL("nu support vector regression")
		), 0
	);

	Parameters.Add_Double(pNode, "C" , _TL("C" ), _TL(""), 1.0, 0.0, true);
	Parameters.Add_Double(pNode, "NU", _TL("Nu"), _TL(""), 0.5, 0.0, true);
	Parameters.Add_Double(pNode, "P" , _TL("P" ), _TL(""), 0.5, 0.0, true);

	pNode	= Parameters.Add_Choice(
		NULL	, "KERNEL"		, _TL("Kernel Type"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|%s|%s|%s|",
			_TL("linear"),
			_TL("polynomial"),
			_TL("radial basis function"),
			_TL("sigmoid"),
			_TL("exponential chi2"),
			_TL("histogram intersection"),
			_TL("custom")
		), 1
	);

	Parameters.Add_Double(pNode, "COEF0" , _TL("Coefficient 0"), _TL(""), 1.0, 0.0, true);
	Parameters.Add_Double(pNode, "DEGREE", _TL("Degree"       ), _TL(""), 0.5, 0.0, true);
	Parameters.Add_Double(pNode, "GAMMA" , _TL("Gamma"        ), _TL(""), 1.0, 0.0, true);
}
//---------------------------------------------------------
CGSPoints_Semi_Variances::CGSPoints_Semi_Variances(void)
{
	CSG_Parameter	*pNode;

	//-----------------------------------------------------
	Set_Name		(_TL("Variogram"));

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

	Set_Description(
		_TL("")
	);

	//-----------------------------------------------------
	pNode	= Parameters.Add_Shapes(
		NULL	, "POINTS"		, _TL("Points"),
		_TL(""),
		PARAMETER_INPUT, SHAPE_TYPE_Point
	);

	Parameters.Add_Table_Field(
		pNode	, "FIELD"		, _TL("Attribute"),
		_TL("")
	);

	//-----------------------------------------------------
	Parameters.Add_Table(
		NULL	, "RESULT"		, _TL("Sample Variogram"),
		_TL(""),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Value(
		NULL	, "DISTCOUNT"	, _TL("Initial Number of Distance Classes"),
		_TL(""),
		PARAMETER_TYPE_Int		, 100, 1, true
	);

	Parameters.Add_Value(
		NULL	, "DISTMAX"		, _TL("Maximum Distance"),
		_TL(""),
		PARAMETER_TYPE_Double	, 0.0, 0.0, true
	);

	Parameters.Add_Value(
		NULL	, "NSKIP"		, _TL("Skip Number"),
		_TL(""),
		PARAMETER_TYPE_Int, 1, 1, true
	);
}
Example #6
0
//---------------------------------------------------------
void CTable_Trend_Base::Initialise(void)
{
	//-----------------------------------------------------
	Set_Author		(SG_T("(c) 2006 by O.Conrad"));

	Set_Description	(_TW(
		""
	));

	//-----------------------------------------------------
	CSG_Parameter	*pNode	= Parameters("TABLE");

	Parameters.Add_Table_Field(
		pNode	, "FIELD_X"		, _TL("X Values"),
		_TL("")
	);

	Parameters.Add_Table_Field(
		pNode	, "FIELD_Y"		, _TL("Y Values"),
		_TL("")
	);

	Parameters.Add_String(
		NULL	, "FORMULA"		, _TL("Formula"),
		_TL(""),
		SG_T("m * x + b")
	);

	Parameters.Add_Choice(
		NULL	, "FORMULAS"	, _TL("Pre-defined Formulas"),
		_TL(""),

		CSG_String::Format(SG_T("%s|%s|%s|%s|%s|%s|%s|%s|"),
			_TL("Linear: a + b * x"),
			_TL("Quadric: a + b * x + c * x^2"),
			_TL("Cubic: a + b * x + c * x^2 + d * x^3"),
			_TL("Logarithmic: a + b * ln(x)"),
			_TL("Power: a + b * x^c"),
			_TL("a + b / x"),
			_TL("a + b * (1 - exp(-x / c))"),
			_TL("a + b * (1 - exp(-(x / c)^2))")
		), 0
	);

	Parameters.Add_Table(
		NULL	, "TREND"		, _TL("Table (with Trend)"),
		_TL(""),
		PARAMETER_OUTPUT_OPTIONAL
	);
}
Example #7
0
//---------------------------------------------------------
CFilter_Rank::CFilter_Rank(void)
{
	//-----------------------------------------------------
	// 1. Info...

	Set_Name		(_TL("Rank Filter"));

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

	Set_Description	(_TW(
		"Rank filter for grids. Set rank to fifty percent to apply a median filter."
	));


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

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

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

	Parameters.Add_Choice(
		NULL, "MODE"		, _TL("Search Mode"),
		_TL(""),
		CSG_String::Format(SG_T("%s|%s|"),
			_TL("Square"),
			_TL("Circle")
		), 1
	);

	Parameters.Add_Value(
		NULL, "RADIUS"		, _TL("Radius"),
		_TL(""),
		PARAMETER_TYPE_Int, 1, 1, true
	);

	Parameters.Add_Value(
		NULL, "RANK"		, _TL("Rank [Percent]"),
		_TL(""),
		PARAMETER_TYPE_Double, 50.0, 0.0, true, 100.0, true
	);
}
Example #8
0
//---------------------------------------------------------
CA2WiTh::CA2WiTh(void)
{
	// 1. Info...
	Set_Name(_TL("Average With Thereshold 2"));
	Set_Author(_TL("Alessandro Perego"));
	Set_Description(_TL("Average 2 With Thereshold for Grids calculates average in X and Y distances unsing only the values that differ form central pixel less than a specified threshold. Each value has a weight which is inversely proportional to the distance (method 1)."));

	// 2. Parameters...
	Parameters.Add_Grid(NULL, "INPUT", _TL("Input"), _TL("This must be your input data of type grid."), PARAMETER_INPUT);
	Parameters.Add_Grid(NULL, "RESULT", _TL("AWT Grid"), _TL("New grid filtered with the A2WiTh module"), PARAMETER_OUTPUT);
	Parameters.Add_Value(NULL, "RX", _TL("Radius X"), _TL(""), PARAMETER_TYPE_Int, 1, 1, true);
	Parameters.Add_Value(NULL, "RY", _TL("Radius Y"), _TL(""), PARAMETER_TYPE_Int, 1, 1, true);
	Parameters.Add_Value(NULL, "THRESH", _TL("Threshold"), _TL("The values in the specified radius is used in the average calculation only if its difference with the central value is lesser or equal to this threshold."), PARAMETER_TYPE_Double, 2.0);
}
Example #9
0
//---------------------------------------------------------
CA1WiTh::CA1WiTh(void)
{
	// 1. Info...
	Set_Name(_TL("Average With Thereshold 1"));
	Set_Author(_TL("Alessandro Perego"));
	Set_Description(_TL("Average With Thereshold for Grids calculates average in X and Y distances unsing only the values that differ form central pixel less than a specified threshold. It's useful to remove noise whit a known maximum reducing the loss of informations"));

	// 2. Parameters...
	Parameters.Add_Grid(NULL, "INPUT", _TL("Input"), _TL("This must be your input data of type grid."), PARAMETER_INPUT);
	Parameters.Add_Grid(NULL, "RESULT", _TL("AWT Grid"), _TL("New grid filtered with the A1WiTh tool"), PARAMETER_OUTPUT);
	Parameters.Add_Value(NULL, "RX", _TL("Radius X"), _TL(""), PARAMETER_TYPE_Int, 1, 1, true);
	Parameters.Add_Value(NULL, "RY", _TL("Radius Y"), _TL(""), PARAMETER_TYPE_Int, 1, 1, true);
	Parameters.Add_Value(NULL, "THRESH", _TL("Threshold"), _TL("The values in the specified radius is used in the average calculation only if its difference with the central value is lesser or equal to this threshold."), PARAMETER_TYPE_Double, 2.0);
}
//---------------------------------------------------------
CCRS_Transform_Shapes::CCRS_Transform_Shapes(bool bList)
{
	m_bList	= bList;

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

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

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

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

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

		Parameters.Add_Shapes_List(
			NULL	, "TARGET"	, _TL("Target"),
			_TL(""),
			PARAMETER_OUTPUT_OPTIONAL
		);
	}

	//-----------------------------------------------------
	else
	{
		Parameters.Add_Shapes(
			NULL	, "SOURCE"	, _TL("Source"),
			_TL(""),
			PARAMETER_INPUT
		);

		Parameters.Add_Shapes(
			NULL	, "TARGET"	, _TL("Target"),
			_TL(""),
			PARAMETER_OUTPUT
		);
	}
}
Example #11
0
CGrid_CVA::CGrid_CVA(void){

	Set_Name(_TL("Change Vector Analysis"));
	Set_Author(_TL("Copyrights (c) 2004 by Victor Olaya"));
	Set_Description	(_TW(
		"(c) 2004 by Victor Olaya. Change Vector Analysis"));

	Parameters.Add_Grid(NULL, 
						"A1", 
						_TL("Grid A. Init"), 
						_TL(""), 
						PARAMETER_INPUT);

	Parameters.Add_Grid(NULL, 
						"A2", 
						_TL("Grid A. Final"), 
						_TL(""), 
						PARAMETER_INPUT);

	Parameters.Add_Grid(NULL, 
						"B1", 
						_TL("Grid B. Init"), 
						_TL(""), 
						PARAMETER_INPUT);

	Parameters.Add_Grid(NULL, 
						"B2", 
						_TL("Grid B. Final"), 
						_TL(""), 
						PARAMETER_INPUT);
	
	Parameters.Add_Grid(NULL, 
						"DIST", 
						_TL("Distance"), 
						_TL(""), 
						PARAMETER_OUTPUT, 
						true, 
						SG_DATATYPE_Double);

	Parameters.Add_Grid(NULL, 
						"ANGLE", 
						_TL("Angle"), 
						_TL(""), 
						PARAMETER_OUTPUT, 
						true, 
						SG_DATATYPE_Double);


}//constructor
Example #12
0
//---------------------------------------------------------
CKernel_Density::CKernel_Density(void)
{
	CSG_Parameter	*pNode;

	//-----------------------------------------------------
	Set_Name		(_TL("Kernel Density Estimation"));

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

	Set_Description	(_TW(
		"Kernel density estimation. If any point is currently in selection only selected points are taken into account.\n"
		"\n"
		"References:\n"
		"- Fotheringham, A.S., Brunsdon, C., Charlton, M. (2000): Quantitative Geography. Sage. 270p.\n"
		"- Lloyd, C.D. (2010): Spatial data analysis - An introduction for GIS users. Oxford. 206p.\n"
	));


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

	Parameters.Add_Table_Field(
		pNode	, "POPULATION"	, _TL("Population"),
		_TL(""),
		true
	);

	Parameters.Add_Value(
		NULL	, "RADIUS"		, _TL("Radius"),
		_TL(""),
		PARAMETER_TYPE_Double, 1.0, 0.0, true
	);

	Parameters.Add_Choice(
		NULL	, "KERNEL"		, _TL("Kernel"),
		_TL(""),
		CSG_String::Format(SG_T("%s|%s|"),
			_TL("quartic kernel"),
			_TL("gaussian kernel")
		), 0
	);

	//-----------------------------------------------------
	m_Grid_Target.Create(&Parameters, true, NULL, "TARGET_");
}
//---------------------------------------------------------
CExercise_02::CExercise_02(void)
{
	//-----------------------------------------------------
	// Give some information about your module...

	Set_Name	(_TL("02: Pixel by pixel operations with two grids"));

	Set_Author	(_TL("Copyrights (c) 2003 by Olaf Conrad"));

	Set_Description	(_TW(
		"Pixel by pixel operations with two grids.\n"
		"(c) 2003 by Olaf Conrad, Goettingen\n"
		"email: [email protected]")
	);


	//-----------------------------------------------------
	// Define your parameters list...

	Parameters.Add_Grid(
		NULL, "INPUT_A"	, _TL("First input grid"),
		_TL("This must be your input data of type grid."),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL, "INPUT_B"	, _TL("Second input grid"),
		_TL("This must be your input data of type grid."),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL, "OUTPUT"	, _TL("Output"),
		_TL("This will contain your output data of type grid."),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Choice(
		NULL, "METHOD"	, _TL("Method"),
		_TL("Choose a method"),

		CSG_String::Format(SG_T("%s|%s|%s|%s|"),
			_TL("Addition|"),
			_TL("Subtraction"),
			_TL("Multiplication"),
			_TL("Division")
		)
	);
}
//---------------------------------------------------------
CExercise_01::CExercise_01(void)
{
	//-----------------------------------------------------
	// Give some information about your tool...

	Set_Name	(_TL("01: My first tool"));

	Set_Author	(_TL("Copyrights (c) 2003 by Olaf Conrad"));

	Set_Description	(_TW(
		"(c) 2003 by Olaf Conrad, Goettingen\n"
		"email: [email protected]")
	);


	//-----------------------------------------------------
	// Define your parameters list...

	Parameters.Add_Grid(
		NULL, "INPUT"	, _TL("Input"),
		_TL("This must be your input data of type grid."),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL, "OUTPUT"	, _TL("Output"),
		_TL("This will contain your output data of type grid."),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Value(
		NULL, "FACTOR"	, _TL("Factor"),
		_TL("Type in a value that shall be used for the chosen mathematical operation."),
		PARAMETER_TYPE_Double,
		1.0
	);

	Parameters.Add_Choice(
		NULL, "METHOD"	, _TL("Method"),
		_TL("Choose a method"),

		CSG_String::Format(SG_T("%s|%s|%s|%s|"),
			_TL("Addition"),
			_TL("Subtraction"),
			_TL("Multiplication"),
			_TL("Division")
		)
	);
}
Example #15
0
//---------------------------------------------------------
CANGMAP::CANGMAP(void)
{
	Set_Name		(_TL("ANGMAP"));

	Set_Author		(SG_T("A. G&uuml;nther (c) 2013"));

	Set_Description	(_TW(
		"\n"
		"This module computes the acute angle raster between the topographic surface defined by slope and aspect rasters internally derived from input elevation raster, and a structural plane defined by diop direction- and dip grids. "
		"Optionally, the dip direction and dip of the cutting line linears between the two planes can be calculated"
		"\n"
		"Reference: "
		"<a href=\"http://www.sciencedirect.com/science/article/pii/S0098300403000864\">G&uuml;nther, A. (2003). SLOPEMAP: programs for automated mapping of geometrical and kinematical properties of hard rock hill slopes. Computers & Geosciences, 29, 865 - 875</a>.\n"

	));

	Parameters.Add_Grid(
		NULL, "DEM", "Elevation", "A Digital Elvation Model (DEM)", PARAMETER_INPUT
		);
	
	Parameters.Add_Grid(
		NULL, "C", "Dip grid (degrees) ", "A grid representing the dip of the structure plane (in degrees)", PARAMETER_INPUT_OPTIONAL
		);

	Parameters.Add_Grid(
		NULL, "D", "Dip direction grid (degrees) ", "A grid representing the dip direction of the structure plane (in degrees)", PARAMETER_INPUT_OPTIONAL
		);	
	
	Parameters.Add_Value(
		NULL, "fB", "Global structure dip (degrees)", "Constant value if no raster set", PARAMETER_TYPE_Double, 45.0			//Initialisierung eines fixen wertes vs Grid für dip
		);

	Parameters.Add_Value(
		NULL, "fC", "Global structure dip direction (degrees)", "Constant value if no raster set", PARAMETER_TYPE_Double, 90.0			//Initialisierung eines fixen wertes vs Grid für dipdir
		);

	Parameters.Add_Grid(
		NULL, "E", "Angle", "Acute angle (degrees) grid", PARAMETER_OUTPUT
		);

	Parameters.Add_Grid(
		NULL, "F", "CL dipdir", "Dip direction cutting line (degrees)",PARAMETER_OUTPUT_OPTIONAL
		);

	Parameters.Add_Grid(
		NULL, "G", "CL dip", "Dip cutting line (degrees)",PARAMETER_OUTPUT_OPTIONAL
		);

}
//---------------------------------------------------------
CGSGrid_Residuals::CGSGrid_Residuals(void)
{
	//-----------------------------------------------------
	// 1. Info...

	Set_Name		(_TL("Residual Analysis (Grid)"));

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

	Set_Description	(_TW("Relations of each grid cell to its neighborhood. "
		"Wilson & Gallant (2000) used this type of calculation in terrain analysis.\n"
		"\n"
		"Reference:\n"
		"- Wilson, J.P., Gallant, J.C., [Eds.] (2000): "
		"'Terrain analysis - principles and applications', "
		"New York, John Wiley & Sons, Inc.\n"
	));


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

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

	Parameters.Add_Grid(	NULL, "MEAN"	, _TL("Mean Value")					, _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid(	NULL, "DIFF"	, _TL("Difference from Mean Value")	, _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid(	NULL, "STDDEV"	, _TL("Standard Deviation")			, _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid(	NULL, "RANGE"	, _TL("Value Range")				, _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid(	NULL, "MIN"		, _TL("Minimum Value")				, _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid(	NULL, "MAX"		, _TL("Maximum Value")				, _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid(	NULL, "DEVMEAN"	, _TL("Deviation from Mean Value")	, _TL(""), PARAMETER_OUTPUT);
	Parameters.Add_Grid(	NULL, "PERCENT"	, _TL("Percentile")					, _TL(""), PARAMETER_OUTPUT);

	Parameters.Add_Choice(	NULL, "MODE"	, _TL("Search Mode")				, _TL(""),
		CSG_String::Format(SG_T("%s|%s|"),
			_TL("Square"),
			_TL("Circle")
		), 1
	);

	Parameters.Add_Value(	NULL, "RADIUS"	, _TL("Radius (Cells)")				, _TL(""), PARAMETER_TYPE_Int, 7, 1, true);

	Parameters.Add_Value(	NULL, "BCENTER"	, _TL("Include Center Cell")		, _TL(""), PARAMETER_TYPE_Bool, true);

	Parameters.Add_Parameters(
		NULL, "WEIGHTING"	, _TL("Weighting"),
		_TL("")
	)->asParameters()->Assign(m_Cells.Get_Weighting().Get_Parameters());
}
Example #17
0
//---------------------------------------------------------
CXYZ_Export::CXYZ_Export(void)
{
	//-----------------------------------------------------
	// 1. Info...

	Set_Name		(_TL("Export Grid to XYZ"));

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

	Set_Description	(_TW(
		"Export grid to a table (text format), that contains for each grid cell "
		"the x/y-coordinates and additionally data from selected grids.\n"
		"Optionally, it is possible to skip NoData cells from the output. In this "
		"case, the first input grid will perform like a mask.\n\n")
	);


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

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

	Parameters.Add_FilePath(
		NULL	, "FILENAME"	, _TL("File Name"),
		_TL(""),
		CSG_String::Format(
			SG_T("%s|*.xyz|%s|*.txt|%s|*.*"),
			_TL("XYZ files (*.xyz)"),
			_TL("Text files (*.txt)"),
			_TL("All Files")
		), NULL, true
	);

	Parameters.Add_Value(
		NULL	, "CAPTION"		, _TL("Write Field Names"),
		_TL(""),
		PARAMETER_TYPE_Bool, true
	);

	Parameters.Add_Value(
		NULL	, "EX_NODATA"	, _TL("Exclude NoData Cells"),
		_TL(""),
		PARAMETER_TYPE_Bool, false
	);
}
Example #18
0
//---------------------------------------------------------
CPit_Eliminator::CPit_Eliminator(void)
{
	Set_Name		(_TL("Sink Removal"));

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

	Set_Description	(_TW(
		""
	));

	Parameters.Add_Grid(
		NULL, "DEM"			, _TL("DEM"),
		_TL("Digital Elevation Model that has to be processed"),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid(
		NULL, "SINKROUTE"	, _TL("Sink Route"),
		_TL(""),
		PARAMETER_INPUT_OPTIONAL
	);

	Parameters.Add_Grid(
		NULL, "DEM_PREPROC", _TL("Preprocessed DEM"),
		_TL("Preprocessed DEM. If this is not set changes will be stored in the original DEM grid."),
		PARAMETER_OUTPUT_OPTIONAL
	);

	Parameters.Add_Choice(
		NULL, "METHOD"		, _TL("Method"),
		_TL(""),
		CSG_String::Format(SG_T("%s|%s|"),
			_TL("Deepen Drainage Routes"),
			_TL("Fill Sinks")
		), 1
	);

	Parameters.Add_Value(
		NULL	, "THRESHOLD"	, _TL("Threshold"),
		_TL(""),
		PARAMETER_TYPE_Bool
	);

	Parameters.Add_Value(
		NULL	, "THRSHEIGHT"	, _TL("Threshold Height"),
		_TL(""),
		PARAMETER_TYPE_Double	, 100
	);
}
Example #19
0
//---------------------------------------------------------
CGrid_Color_Rotate::CGrid_Color_Rotate(void)
{
	Set_Name		(_TL("Color Palette Rotation"));

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

	Set_Description	(_TW(
		"The 'Color Palette Rotator' rotates the grids color palette. "
	));

	Parameters.Add_Grid(	NULL, "GRID"	, _TL("Grid")	, _TL(""), PARAMETER_INPUT);
	Parameters.Add_Colors(	NULL, "COLORS"	, _TL("Colors")	, _TL(""));
	Parameters.Add_Value(	NULL, "DIR"		, _TL("Down")	, _TL(""), PARAMETER_TYPE_Bool, true);

}
//---------------------------------------------------------
Cdirectional1::Cdirectional1(void)
{
	// 1. Info...
	Set_Name(_TL("Directional Average"));
	Set_Author(_TL("Alessandro Perego"));
	Set_Description(_TL("directional1 average for Grids"));

	// 2. Parameters...
	Parameters.Add_Grid(NULL, "INPUT", _TL("Input"), _TL("This must be your input data of type grid."), PARAMETER_INPUT);
	Parameters.Add_Grid(NULL, "RESULT", _TL("Output Grid"), _TL("New grid filtered with the directional1 tool"), PARAMETER_OUTPUT);
	Parameters.Add_Value(NULL, "ANG", _TL("Angle (in degrees)"), _TL("0 is horizontal, 90 is vertical."), PARAMETER_TYPE_Double, 0.0);
	Parameters.Add_Value(NULL, "R1", _TL("Main Radius"), _TL(""), PARAMETER_TYPE_Double, 1);
	Parameters.Add_Value(NULL, "R2", _TL("Transversal radius"), _TL(""), PARAMETER_TYPE_Double, 0.5);
	
}
//---------------------------------------------------------
CGrid_Fill_Interactive::CGrid_Fill_Interactive(void)
{
	Set_Name		(_TL("Change Grid Values - Flood Fill"));

	Set_Author		("A.Ringeler (c) 2005, O.Conrad (c) 2006");

	Set_Description	(_TW(
		"Interactively use the flood fill method for replacement of grid cell values "
		"starting at the positions clicked with the left mouse button. "
		"If the target grid is not set, the changes will be applied to the original grid. "
	));

	//-----------------------------------------------------
	Parameters_Add(Parameters);
}
Example #22
0
//---------------------------------------------------------
CGrid_To_Points_Random::CGrid_To_Points_Random()
{
	Set_Name		(_TL("Grid Values to Points (randomly)"));

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

	Set_Description	(_TW(
		"Extract randomly points from gridded data."
	));

	Parameters.Add_Grid(	NULL, "GRID"	, _TL("Grid")		, _TL(""), PARAMETER_INPUT);
	Parameters.Add_Value(	NULL, "FREQ"	, _TL("Frequency")	, _TL("One per x"), PARAMETER_TYPE_Int, 100, 1, true);

	Parameters.Add_Shapes(	NULL, "POINTS"	, _TL("Points")		, _TL(""), PARAMETER_OUTPUT, SHAPE_TYPE_Point);
}
//---------------------------------------------------------
CGrid_Gaps_Resampling::CGrid_Gaps_Resampling(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Close Gaps with Stepwise Resampling"));

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

	Set_Description	(_TW(
		"Close gaps of a grid data set (i.e. eliminate no data values). "
		"If the target is not set, the changes will be stored to the original grid. "
	));

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

	Parameters.Add_Grid("",
		"MASK"			, _TL("Mask"),
		_TL(""),
		PARAMETER_INPUT_OPTIONAL
	);

	Parameters.Add_Grid("",
		"RESULT"		, _TL("Result"),
		_TL(""),
		PARAMETER_OUTPUT_OPTIONAL
	);

	Parameters.Add_Choice("",
		"RESAMPLING"	, _TL("Resampling"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|%s|",
			_TL("Nearest Neighbour"),
			_TL("Bilinear Interpolation"),
			_TL("Bicubic Spline Interpolation"),
			_TL("B-Spline Interpolation")
		), 3
	);

	Parameters.Add_Double("",
		"GROW"			, _TL("Grow Factor"),
		_TL(""),
		2.0, 1.0, true
	);
}
Example #24
0
CStreamNet::CStreamNet(void)
{

	#ifdef _WIN32
		CSG_String UserHomeDir = CSG_String(getenv("USERPROFILE"));
	#else
		CSG_String UserHomeDir = CSG_String(getenv("HOME"));
	#endif

	CSG_String DefaultTempDir = SG_File_Make_Path(UserHomeDir, CSG_String("Saga_GIS_tmp"));

	// INFO
	Set_Name(_TL("Stream Reach and Watershed"));
	Set_Author(SG_T("S. Masoud-Ansari, J. Tunnicliffe, D. Tarboton"));
	Set_Description	(CSG_String("This tool produces a vector network and shapefile from the stream raster grid. The flow direction grid is used to connect flow paths along the stream raster. The Strahler order of each stream segment is computed. The subwatershed draining to each stream segment (reach) is also delineated and labeled with the value identifier that corresponds to the WSNO (watershed number) attribute in the Stream Reach Shapefile.\n\nThis tool orders the stream network according to the Strahler ordering system. Streams that don't have any other streams draining in to them are order 1. When two stream reaches of different order join the order of the downstream reach is the order of the highest incoming reach. When two reaches of equal order join the downstream reach order is increased by 1. When more than two reaches join the downstream reach order is calculated as the maximum of the highest incoming reach order or the second highest incoming reach order + 1. This generalizes the common definition to cases where more than two reaches join at a point. The network topological connectivity is stored in the Stream Network Tree file, and coordinates and attributes from each grid cell along the network are stored in the Network Coordinates file.\n\nThe stream raster grid is used as the source for the stream network, and the flow direction grid is used to trace connections within the stream network. Elevations and contributing area are used to determine the elevation and contributing area attributes in the network coordinate file. Points in the outlets shapefile are used to logically split stream reaches to facilitate representing watersheds upstream and downstream of monitoring points. The program uses the attribute field \"id\" in the outlets shapefile as identifiers in the Network Tree file. This tool then translates the text file vector network representation in the Network Tree and Coordinates files into a shapefile. Further attributes are also evaluated. The program has an option to delineate a single watershed by representing the entire area draining to the Stream Network as a single value in the output watershed grid."));

	// GRIDS
	Parameters.Add_Grid(NULL, "FEL_INPUT"	, _TL("Input Pit Filled Elevation"), _TL("This input is a grid of elevation values. This is usually the output of the \"Pit Remove\" tool, in which case it is elevations with pits removed. Pits are low elevation areas in digital elevation models (DEMs) that are completely surrounded by higher terrain. They are generally taken to be artifacts that interfere with the processing of flow across DEMs, so are removed by raising their elevation to the point where they just drain. This step is not essential if you have reason to believe that the pits in your DEM are real. Elevation values are used in this function to compute the slope of stream segments. Not removing pits can result in negative (i.e. uphill) stream segment slopes."), PARAMETER_INPUT);
	Parameters.Add_Grid(NULL, "FLOWD8_INPUT"	, _TL("Input D8 Flow Direction"), _TL("This input is a grid of flow directions that are encoded using the D8 method where all flow from a cells goes to a single neighboring cell in the direction of steepest descent."), PARAMETER_INPUT);
	Parameters.Add_Grid(NULL, "AREAD8_INPUT"	, _TL("Input D8 Drainage Area"), _TL("A grid giving the contributing area value in terms of the number of grid cells (or the summation of weights) for each cell taken as its own contribution plus the contribution from upslope neighbors that drain in to it using the D8 algorithm. This is usually the output of the \"D8 Contributing Area\" tool and is used to determine the contributing area attribute in the Network Coordinate file."), PARAMETER_INPUT);
	Parameters.Add_Grid(NULL, "SRC_INPUT"	, _TL("Input Stream Raster"), _TL("An indicator grid indicating streams, by using a grid cell value of 1 on streams and 0 off streams. Several of the \"Stream Network Analysis\" tools produce this type of grid. The Stream Raster Grid is used as the source for the stream network."), PARAMETER_INPUT);

	Parameters.Add_Grid(NULL, "ORD_OUTPUT"	, _TL("Output Stream Order"), _TL("The Stream Order Grid has cells values of streams ordered according to the Strahler order system. The Strahler ordering system defines order 1 streams as stream reaches that don't have any other reaches draining in to them. When two stream reaches of different order join the order of the downstream reach is the order of the highest incoming reach. When two reaches of equal order join the downstream reach order is increased by 1. When more than two reaches join the downstream reach order is calculated as the maximum of the highest incoming reach order or the second highest incoming reach order + 1. This generalizes the common definition to cases where more than two reaches join at a point. This generalizes the common definition to cases where more than two flow paths join at a point."), PARAMETER_OUTPUT);
	Parameters.Add_Grid(NULL, "W_OUTPUT"	, _TL("Output Watershed"), _TL("This output grid identified each reach watershed with a unique ID number, or in the case where the delineate single watershed option was checked, the entire area draining to the stream network is identified with a single ID."), PARAMETER_OUTPUT);

	// SHAPES
	Parameters.Add_Shapes(NULL, "OUTLET_INPUT"	, _TL("Input Outlet Points (Optional)"), CSG_String("Point shapes defining points of interest. If this is used, the tool will only deliiniate the stream network upstream of these outlets. Additionally, the points are used to logically split stream reaches to facilitate representing watersheds upstream and downstream of monitoring points. Points must have an integer attribute field \"id\" as it is for identifiers in the Network Tree file."), PARAMETER_INPUT_OPTIONAL);
	Parameters.Add_Shapes(NULL, "NET_OUTPUT"	, _TL("Output Stream Reach"), _TL("This output is a polyline shapefile giving the links in a stream network. The columns in the attribute table are:\n\nLINKNO- Link Number. A unique number associated with each link (segment of channel between junctions). This is arbitrary and will vary depending on number of processes used.\n\nDSLINKNO - Link Number of the downstream link. -1 indicates that this does not exist.\n\nUSLINKNO1 - Link Number of first upstream link. (-1 indicates no link upstream, i.e. for a source link)\n\nUSLINKNO2 - Link Number of second upstream link. (-1 indicates no second link upstream, i.e. for a source link or an internal monitoring point where the reach is logically split but the network does not bifurcate.)\n\nDSNODEID - Node identifier for node at downstream end of stream reach. This identifier corresponds to the \"id\" attribute from the Outlets shapefile used to designate nodes.\n\nOrder - Strahler Stream Order\n\nLength - Length of the link. The units are the horizontal map units of the underlying DEM grid.\n\nMagnitude - Shreve Magnitude of the link. This is the total number of sources upstream\n\nDS_Cont_Ar - Drainage area at the downstream end of the link. Generally this is one grid cell upstream of the downstream end because the drainage area at the downstream end grid cell includes the area of the stream being joined.\n\nDrop - Drop in elevation from the start to the end of the link\n\nSlope - Average slope of the link (computed as drop/length)\n\nStraight_L - Straight line distance from the start to the end of the link\n\nUS_Cont_Ar - Drainage area at the upstream end of the link\n\nWSNO - Watershed number. Cross reference to the *w.shp and *w grid files giving the identification number of the watershed draining directly to the link.\n\nDOUT_END - Distance to the eventual outlet (i.e. the most downstream point in the stream network) from the downstream end of the link.\n\nDOUT_START - Distance to the eventual outlet from the upstream end of the link\n\nDOUT_MID - Distance to the eventual outlet from the midpoint of the link"), PARAMETER_OUTPUT);
	
	// TABLES
	Parameters.Add_Table(NULL, "TREE_OUTPUT", _TL("Output Network Connectivity Tree"), _TL("This output is a text file that details the network topological connectivity is stored in the Stream Network Tree file. Columns are as follows:\n\nLink Number (Arbitrary - will vary depending on number of processes used)\n\nStart Point Number in Network coordinates (*coord.dat) file (Indexed from 0)\n\nEnd Point Number in Network coordinates (*coord.dat) file (Indexed from 0)\n\nNext (Downstream) Link Number. Points to Link Number. -1 indicates no links downstream, i.e. a terminal link\n\nFirst Previous (Upstream) Link Number. Points to Link Number. -1 indicates no upstream links.\n\nSecond Previous (Upstream) Link Numbers. Points to Link Number. -1 indicates no upstream links. Where only one previous link is -1, it indicates an internal monitoring point where the reach is logically split, but the network does not bifurcate.\n\nStrahler Order of Link\n\nMonitoring point identifier at downstream end of link. -1 indicates downstream end is not a monitoring point.\n\nNetwork magnitude of the link, calculated as the number of upstream sources (following Shreve)."), PARAMETER_OUTPUT); 
	Parameters.Add_Table(NULL, "COORD_OUTPUT", _TL("Output Network Coordinates"), _TL("This output is a text file that contains the coordinates and attributes of points along the stream network. Columns are as follows:\n\nX coordinate\n\nY Coordinate\n\nDistance along channels to the downstream end of a terminal link\n\nElevation\n\nContributing area"), PARAMETER_OUTPUT); 

	// Booleans
	Parameters.Add_Value(
		NULL, "SW"		, _TL("Delineate Single Watershed"),
		_TL("This option causes the tool to delineate a single watershed by representing the entire area draining to the Stream Network as a single value in the output watershed grid. Otherwise a seperate watershed is delineated for each stream reach."),
		PARAMETER_TYPE_Bool, false
	);

	// VALUES
	Parameters.Add_Value(NULL, "NPROC"	, _TL("Number of Processes"), _TL("The number of stripes that the domain will be divided into and the number of MPI parallel processes that will be spawned to evaluate each of the stripes"), PARAMETER_TYPE_Int, SG_Get_Max_Num_Procs_Omp(), 1, true, SG_Get_Max_Num_Procs_Omp(), true);

	// Other
	Parameters.Add_FilePath(NULL, "TEMP_DIR", _TL("Temp File Directory"), _TL("Directory used for storing temporary files during processing."), NULL, DefaultTempDir, false, true, false); 
	

}
Example #25
0
//---------------------------------------------------------
CXYZ_Export::CXYZ_Export(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Export Shapes to XYZ"));

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

	Set_Description	(_TW(
		"XYZ export filter for shapes. "
	));

	//-----------------------------------------------------
	Parameters.Add_Shapes("",
		"POINTS"	, _TL("Shapes"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Table_Field("POINTS",
		"FIELD"		, _TL("Attribute"),
		_TL(""),
		true
	);

	Parameters.Add_Bool("",
		"HEADER"	, _TL("Save Table Header"),
		_TL(""),
		true
	);

	Parameters.Add_Choice("",
		"SEPARATE"	, _TL("Separate Line/Polygon Points"),
		_TL(""),
		CSG_String::Format("%s|%s|%s|",
			_TL("none"), SG_T("*"), _TL("number of points")
		), 0
	);

	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, true
	);
}
//---------------------------------------------------------
CGrid_RGB_Split::CGrid_RGB_Split(void)
{
	//-----------------------------------------------------
	Set_Name		(_TL("Split RGB Composite"));

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

	Set_Description	(_TW(
		"Split red-green-blue channels of an rgb coded grid. "
	));

	//-----------------------------------------------------
	Parameters.Add_Grid("",
		"RGB"	, _TL("RGB Composite"),
		_TL(""),
		PARAMETER_INPUT
	);

	Parameters.Add_Grid("",
		"R"		, _TL("Red"),
		_TL(""),
		PARAMETER_OUTPUT, true, SG_DATATYPE_Byte
	);

	Parameters.Add_Grid("",
		"G"		, _TL("Green"),
		_TL(""),
		PARAMETER_OUTPUT, true, SG_DATATYPE_Byte
	);

	Parameters.Add_Grid("",
		"B"		, _TL("Blue"),
		_TL(""),
		PARAMETER_OUTPUT, true, SG_DATATYPE_Byte
	);

	Parameters.Add_Grid("",
		"A"		, _TL("Alpha"),
		_TL(""),
		PARAMETER_OUTPUT_OPTIONAL, true, SG_DATATYPE_Byte
	);

	Parameters.Add_Bool("",
		"NODATA", _TL("Ignore No Data"),
		_TL(""),
		true
	);
}
//---------------------------------------------------------
CFilter_Resample::CFilter_Resample(void)
{
	//-----------------------------------------------------
	// 1. Info...

	Set_Name		(_TL("Resampling Filter"));

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

	Set_Description	(_TW(
		"Resampling filter for grids. Resamples in a first step the "
		"given grid to desired resampling cell size, expressed as "
		"multiple of the original cell size (scale factor). This is an up-scaling "
		"through which cell values are aggregated as cell area weighted "
		"means. Second step is the down-scaling to original cell size "
		"using spline interpolation. Specially for larger search distances "
		"this is a comparably fast alternative for simple low and high "
		"pass filter operations. "
	));


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

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

	Parameters.Add_Grid(
		NULL, "LOPASS"		, _TL("Low Pass Filter"),
		_TL(""),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Grid(
		NULL, "HIPASS"		, _TL("High Pass Filter"),
		_TL(""),
		PARAMETER_OUTPUT
	);

	Parameters.Add_Value(
		NULL, "SCALE"		, _TL("Scale Factor"),
		_TL(""),
		PARAMETER_TYPE_Double, 10.0, 1.0, true
	);
}
//---------------------------------------------------------
CSelection_Delete::CSelection_Delete(void)
{	
	Set_Name		(_TL("Delete Selection from Shapes Layer"));

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

	Set_Description	(_TW(
		"Deletes selected shapes from shapes layer."
	));

	Parameters.Add_Shapes(
		NULL	, "INPUT"	, _TL("Input"), 
		_TL(""),
		PARAMETER_INPUT
	);
}
Example #29
0
//---------------------------------------------------------
CTable_List::CTable_List(void)
{
	Set_Name		(_TL("List Tables"));

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

	Set_Description	(_TW(
		"Lists all tables of an ODBC data source."
	));

	Parameters.Add_Table(
		NULL	, "TABLES"		, _TL("Tables"),
		_TL(""),
		PARAMETER_OUTPUT
	);
}
//---------------------------------------------------------
CSelection_Invert::CSelection_Invert(void)
{	
	Set_Name		(_TL("Invert Selection of Shapes Layer"));

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

	Set_Description	(_TW(
		"Deselects selected and selects unselected shapes of given shapes layer."
	));

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