您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DataObject_Update函数代码示例

51自学网 2021-06-01 20:25:08
  C++
这篇教程C++ DataObject_Update函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DataObject_Update函数的典型用法代码示例。如果您正苦于以下问题:C++ DataObject_Update函数的具体用法?C++ DataObject_Update怎么用?C++ DataObject_Update使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DataObject_Update函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Parameters

//---------------------------------------------------------bool CDVWK_SoilMoisture::On_Execute(void){	int			Day, x, y, i, LandUseID;	CSG_Grid	*pGrid;	//-----------------------------------------------------	if( pClimate->Get_Record_Count() > 0 )	{		pFK_mm		= Parameters("STA_FC")		->asGrid();		FK_mm_Def	= Parameters("STA_FC_DEF")	->asDouble();		pPWP_mm		= Parameters("STA_PWP")		->asGrid();		PWP_mm_Def	= Parameters("STA_PWP_DEF")	->asDouble();		pWi_mm		= Parameters("DYN_W")		->asGrid();		DataObject_Set_Colors(pWi_mm, 100, SG_COLORS_YELLOW_BLUE);		//-------------------------------------------------		pLandUse	= SG_Create_Grid(pWi_mm, pCropCoeff->Get_Record_Count() < 127 ? SG_DATATYPE_Char : SG_DATATYPE_Int);		pLandUse->Assign(Parameters("LANDUSE_DEF")->asInt());		if( (pGrid = Parameters("LANDUSE")->asGrid()) != NULL )		{			for(y=0; y<Get_NY(); y++)			{				for(x=0; x<Get_NX(); x++)				{					LandUseID	= pGrid->asInt(x, y);					for(i=0; i<pCropCoeff->Get_Record_Count(); i++)					{						if( LandUseID == pCropCoeff->Get_Record(i)->asInt(0) )						{							pLandUse->Set_Value(x, y, i);							break;						}					}				}			}		}		//-------------------------------------------------		DataObject_Update(pWi_mm, 0, pFK_mm ? pFK_mm->Get_ZMax() : FK_mm_Def, true);		for(Day=0; Day<365 && Set_Progress(Day, 365); Day++)		{			Step_Day(Day);			DataObject_Update(pWi_mm, true);		}		//-------------------------------------------------		delete(pLandUse);		return( true );	}	return( false );}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:60,


示例2: Get_Insolation

//---------------------------------------------------------bool CSADO_SolarRadiation::Get_Insolation(void){	//-----------------------------------------------------	if( Initialise() )	{		if( m_bMoment )		{			Get_Insolation(m_Day_A, m_Hour);			Finalise();		}		//-------------------------------------------------		else		{			for(int Day=m_Day_A; Day<=m_Day_B && Process_Get_Okay(false); Day+=m_dDays)			{				for(double Hour=m_Hour; Hour<24.0 && Process_Get_Okay(false); Hour+=m_dHour)				{					Process_Set_Text(CSG_String::Format(SG_T("%s: %d(%d-%d), %s: %f"), _TL("Day"), Day, m_Day_A, m_Day_B, _TL("Hour"), Hour));					if( m_bUpdateDirect )	m_pSumDirect->Assign(0.0);					if( m_bUpdateDiffus )	m_pSumDiffus->Assign(0.0);					if( m_bUpdateTotal )	m_pSumTotal ->Assign(0.0);					if( Get_Insolation(Day, Hour) )					{						if( m_bUpdateDirect )						{							m_TmpDirect	+= *m_pSumDirect;							DataObject_Update(m_pSumDirect);						}						if( m_bUpdateDiffus )						{							m_TmpDiffus	+= *m_pSumDiffus;							DataObject_Update(m_pSumDiffus);						}						if( m_bUpdateTotal )						{							m_TmpTotal	+= *m_pSumTotal;							DataObject_Update(m_pSumTotal);						}					}				}			}			Finalise(m_dHour / (24.0 * (1 + m_Day_B - m_Day_A)));	// *m_pSumDirect	*= m_dHour / D->size();		}	}	//-----------------------------------------------------	return( true );}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:56,


示例3: Error_Set

//---------------------------------------------------------bool CLife::On_Execute(void){	//-----------------------------------------------------	m_pLife	= m_Grid_Target.Get_Grid("LIFE", SG_DATATYPE_Byte);	if( !m_pLife )	{		Error_Set(_TL("could not create target grid"));		return( false );	}	//-----------------------------------------------------	m_nColors	= Parameters("FADECOLOR")->asInt();	for(int y=0; y<m_pLife->Get_NY(); y++)	{		for(int x=0; x<m_pLife->Get_NX(); x++)		{			m_pLife->Set_Value(x, y, CSG_Random::Get_Uniform(0, 100) < 50 ? 0 : m_nColors);		}	}	//-----------------------------------------------------	m_pLife->Set_Name(_TL("Conway's Game of Life"));	m_pLife->Set_NoData_Value(-1);	DataObject_Add       (m_pLife);	DataObject_Set_Colors(m_pLife, 11, SG_COLORS_WHITE_BLUE);	DataObject_Update    (m_pLife, 0, m_nColors, SG_UI_DATAOBJECT_SHOW);	//-----------------------------------------------------	int		i;	m_Count.Create(m_pLife->Get_System(), SG_DATATYPE_Byte);	for(i=1; Process_Get_Okay(true) && Next_Cycle(i > m_nColors); i++)	{		Process_Set_Text(CSG_String::Format("%s: %d", _TL("Life Cycle"), i));		DataObject_Update(m_pLife, 0, m_nColors);	}	m_Count.Destroy();	//-----------------------------------------------------	if( is_Progress() )	{		Message_Add(CSG_String::Format("/n%s %d %s/n", _TL("Dead after"), i, _TL("Life Cycles")), false);	}	return( true );}
开发者ID:Fooway,项目名称:SAGA-GIS-git-mirror,代码行数:54,


示例4: Parameters

//---------------------------------------------------------bool CGrid_Profile::On_Execute(void){	m_pDEM		= Parameters("DEM")		->asGrid();	m_pValues	= Parameters("VALUES")	->asGridList();	m_pPoints	= Parameters("POINTS")	->asShapes();	m_pLine		= Parameters("LINE")	->asShapes();	m_bAdd		= false;	DataObject_Update(m_pDEM , SG_UI_DATAOBJECT_SHOW_NEW_MAP);	DataObject_Update(m_pLine, SG_UI_DATAOBJECT_SHOW_LAST_MAP);	return( true );}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:15,


示例5: DataObject_Update

//---------------------------------------------------------bool CKinWav_D8::Gauges_Set_Flow(double Time){	if( m_pGauges_Flow && m_pGauges_Flow->Get_Field_Count() == m_pGauges->Get_Count() + 1 )	{		CSG_Table_Record	*pRecord	= m_pGauges_Flow->Add_Record();		pRecord->Set_Value(0, Time);		for(int i=0; i<m_pGauges->Get_Count(); i++)		{			double	Flow;			if( m_pFlow->Get_Value(m_pGauges->Get_Shape(i)->Get_Point(0), Flow) )			{				pRecord->Set_Value(i + 1, Flow);			}		}		DataObject_Update(m_pGauges_Flow);		return( true );	}	return( false );}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:26,


示例6: return

bool CIsochronesVar::On_Execute_Position(CSG_Point ptWorld, TSG_Module_Interactive_Mode Mode){	int iX, iY;	if(	Mode != MODULE_INTERACTIVE_LDOWN || !Get_Grid_Pos(iX, iY) )	{		return( false );	}		m_pTime->Assign((double)0);	writeTimeOut(iX, iY, iX, iY);	for(int y=0; y<Get_NY() && Set_Progress(y); y++){		for(int x=0; x<Get_NX(); x++){			m_pTime->Set_Value(x,y,m_pTime->asDouble(x,y)/3600.);        }// for    }// for	ZeroToNoData();	DataObject_Update(m_pTime, true);	return (true);}//method
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:26,


示例7: switch

//---------------------------------------------------------bool CGrid_Profile::On_Execute_Position(CSG_Point ptWorld, TSG_Module_Interactive_Mode Mode){	switch( Mode )	{	default:		break;	case MODULE_INTERACTIVE_LDOWN:		if( !m_bAdd )		{			m_bAdd	= true;			m_pLine->Create(SHAPE_TYPE_Line, CSG_String::Format(SG_T("Profile [%s]"), m_pDEM->Get_Name()));			m_pLine->Add_Field("ID"	, SG_DATATYPE_Int);			m_pLine->Add_Shape()->Set_Value(0, 1);		}		m_pLine->Get_Shape(0)->Add_Point(Get_System()->Fit_to_Grid_System(ptWorld));		DataObject_Update(m_pLine);		break;	case MODULE_INTERACTIVE_RDOWN:		Set_Profile();		m_bAdd	= false;		break;	}	return( true );}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:30,


示例8: switch

//---------------------------------------------------------bool CSelect_Points::On_Execute_Position(CSG_Point ptWorld, TSG_Tool_Interactive_Mode Mode){	switch( Mode )	{	case TOOL_INTERACTIVE_LUP:		m_pSelection->Del_Records();		if( m_bAddCenter )		{			m_pSelection->Add_Shape()->Add_Point(ptWorld);		}		if( m_Search.Select_Nearest_Points(ptWorld.Get_X(), ptWorld.Get_Y(), m_MaxPoints, m_Radius, m_Quadrant) )		{			for(int i=0; i<m_Search.Get_Selected_Count(); i++)			{				CSG_Shape	*pPoint	= m_pSelection->Add_Shape(m_pPoints->Get_Shape((int)m_Search.Get_Selected_Z(i)));				pPoint->Set_Value(m_pSelection->Get_Field_Count() - 2, i + 1);				pPoint->Set_Value(m_pSelection->Get_Field_Count() - 1, m_Search.Get_Selected_Distance(i));			}		}		DataObject_Update(m_pSelection);		break;	default:		break;	}	return( true );}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:34,


示例9: DataObject_Get_Colors

void Cdodproperror::ApplyColors(CSG_Grid* from, CSG_Grid* to){		CSG_Colors colors;		DataObject_Get_Colors(from, colors);		DataObject_Set_Colors(to, colors);		DataObject_Update(to, false);	}
开发者ID:sina-masoud-ansari,项目名称:saga-gis,代码行数:7,


示例10: Parameters

//---------------------------------------------------------void CHillslope_Evolution_FTCS::Set_Difference(void){	CSG_Grid	*pDiff	= Parameters("DIFF")->asGrid();	if( pDiff )	{		CSG_Grid	*pDEM	= Parameters("DEM")->asGrid();		#pragma omp parallel for		for(int i=0; i<Get_NCells(); i++)		{			if( pDEM->is_NoData(i) )			{				pDiff->Set_NoData(i);			}			else			{				pDiff->Set_Value(i, m_pDEM->asDouble(i) - pDEM->asDouble(i));			}		}		if( Parameters("UPDATE")->asBool() )		{			DataObject_Update(pDiff, SG_UI_DATAOBJECT_SHOW);		}	}}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:28,


示例11: return

bool CSinuosity::On_Execute_Position(CSG_Point ptWorld, TSG_Module_Interactive_Mode Mode){			int iX, iY;	if(	Mode != MODULE_INTERACTIVE_LDOWN || !Get_Grid_Pos(iX, iY) )	{		return( false );	}//	if( !m_pDEM->is_InGrid_byPos(ptWorld.Get_X(), ptWorld.Get_Y()) ){//		return false;//	}//if//	iX	= (int) ((ptWorld.Get_X() - m_pDEM->Get_XMin()) / m_pDEM->Get_Cellsize());//	iY	= (int) ((ptWorld.Get_Y() - m_pDEM->Get_YMin()) / m_pDEM->Get_Cellsize());	m_iX = iX;	m_iY = iY;	m_pSinuosity->Assign((double)0);		writeDistOut(iX, iY, iX, iY);	ZeroToNoData();	calculateSinuosity();	DataObject_Update(m_pSinuosity);    	return true;}//method
开发者ID:Fooway,项目名称:SAGA-GIS-git-mirror,代码行数:30,


示例12: switch

//---------------------------------------------------------bool CMine_Sweeper::MakeBoard(int level){	int		i, x, y;	CSG_Colors	Colors;	switch( level )	{		case 0:	Mine_NX = 8;	Mine_NY = 8;	N_Mines=10;			break;				case 1: Mine_NX = 16;	Mine_NY = 16;	N_Mines=40;			break;				case 2: Mine_NX = 30;	Mine_NY = 16;	N_Mines=99;			break;	}	pInput	= SG_Create_Grid(SG_DATATYPE_Int,SPRITE_SIZE*Mine_NX, SPRITE_SIZE*Mine_NY);	pInput->Set_Name(_TL("Mine Sweeper"));	Parameters("GRID")->Set_Value(pInput);	//-----------------------------------------------------	CSG_Parameter	*pLUT	= DataObject_Get_Parameter(pInput, "LUT");	if( pLUT && pLUT->asTable() )	{		pLUT->asTable()->Del_Records();		for(i=0; i<16; i++)		{			CSG_Table_Record	*pRecord	= pLUT->asTable()->Add_Record();						pRecord->Set_Value(0, SG_GET_RGB(mine_res_color[i*3], mine_res_color[i*3+1], mine_res_color[i*3+2]));			pRecord->Set_Value(3, i);		}		DataObject_Set_Parameter(pInput, pLUT);		DataObject_Set_Parameter(pInput, "COLORS_TYPE", 1);	// Color Classification Type: Lookup Table	}	Colors.Set_Count(16);	for ( i=0;i<16; i++)	{		Colors.Set_Color(i, SG_GET_RGB(mine_res_color[i*3],	mine_res_color[i*3+1],	mine_res_color[i*3+2]));	}	DataObject_Set_Colors(pInput, Colors);	DataObject_Update(pInput, 0.0, 15.0, true);	//-----------------------------------------------------	for(  y = 0; y <  Mine_NY; y++)		for(  x = 0; x <  Mine_NX; x++)	{		SetSprite(x,y,SPRITE_CLOSE);	}	pInput->Set_Value(0, 0);	return true;			}
开发者ID:Fooway,项目名称:SAGA-GIS-git-mirror,代码行数:60,


示例13: Parameters

//---------------------------------------------------------bool CFilter_Rank::On_Execute(void){	int			x, y;	double		Rank;	CSG_Grid	*pResult;	//-----------------------------------------------------	m_pInput	= Parameters("INPUT" )->asGrid();	pResult		= Parameters("RESULT")->asGrid();	Rank		= Parameters("RANK"  )->asInt() / 100.0;	//-----------------------------------------------------	m_Kernel.Set_Radius(Parameters("RADIUS")->asInt(), Parameters("MODE")->asInt() == 0);	//-----------------------------------------------------	if( !pResult || pResult == m_pInput )	{		pResult	= SG_Create_Grid(m_pInput);	}	else	{		pResult->Set_Name(CSG_String::Format(SG_T("%s [%s: %.1f]"), m_pInput->Get_Name(), _TL("Rank"), 100.0 * Rank));		pResult->Set_NoData_Value(m_pInput->Get_NoData_Value());	}	//-----------------------------------------------------	for(y=0; y<Get_NY() && Set_Progress(y); y++)	{		#pragma omp parallel private(x)		for(x=0; x<Get_NX(); x++)		{			double	Value;			if( Get_Value(x, y, Rank, Value) )			{				pResult->Set_Value(x, y, Value);			}			else			{				pResult->Set_NoData(x, y);			}		}	}	//-----------------------------------------------------	if( !Parameters("RESULT")->asGrid() || Parameters("RESULT")->asGrid() == m_pInput )	{		m_pInput->Assign(pResult);		delete(pResult);		DataObject_Update(m_pInput);	}	m_Kernel.Destroy();	return( true );}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:60,


示例14: if

//---------------------------------------------------------bool CGeoref_Grid_Move::On_Execute_Position(CSG_Point ptWorld, TSG_Module_Interactive_Mode Mode){	if( Mode == MODULE_INTERACTIVE_LDOWN )	{		m_Down	= ptWorld;	}	else if( Mode == MODULE_INTERACTIVE_LUP )	{		if( m_Down != ptWorld )		{			if( m_pSource == NULL )			{				m_pSource	= new CSG_Grid(*m_pGrid);				m_pSource	->Set_Name(m_pGrid->Get_Name());				m_Move		= m_Down - ptWorld;			}			else			{				m_Move	+= m_Down - ptWorld;			}			//---------------------------------------------			int		x, y, ix, iy, dx, dy;			dx		= (int)(0.5 + m_Move.Get_X() / m_pSource->Get_Cellsize());			dy		= (int)(0.5 + m_Move.Get_Y() / m_pSource->Get_Cellsize());			for(y=0, iy=dy; y<m_pGrid->Get_NY() && Set_Progress(y, m_pGrid->Get_NY()); y++, iy++)			{				if( iy >= 0 && iy < m_pSource->Get_NY() )				{					for(x=0, ix=dx; x<m_pGrid->Get_NX(); x++, ix++)					{						if( ix >= 0 && ix < m_pSource->Get_NX() )						{							m_pGrid->Set_Value(x, y, m_pSource->asDouble(ix, iy));						}						else						{							m_pGrid->Set_NoData(x, y);						}					}				}				else				{					for(x=0; x<m_pGrid->Get_NX(); x++)					{						m_pGrid->Set_NoData(x, y);					}				}			}			DataObject_Update(m_pGrid);		}	}	return( true );}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:60,


示例15: switch

//---------------------------------------------------------bool CShapes_Cut_Interactive::On_Execute_Position(CSG_Point ptWorld, TSG_Module_Interactive_Mode Mode){	switch( Mode )	{	//-----------------------------------------------------	case MODULE_INTERACTIVE_LDOWN:		if( m_bDown == false )		{			m_bDown	= true;			m_pDown	= ptWorld;		}		return( true );	//-----------------------------------------------------	case MODULE_INTERACTIVE_LUP:		if( m_bDown == true )		{			m_bDown	= false;			CSG_Rect	r(m_pDown, ptWorld);			if( Get_Extent(r) )			{				if( Cut_Set_Extent(r, m_pExtent, true) )				{					DataObject_Update(m_pExtent);				}				if( Cut_Shapes(r, m_Method, m_pShapes, m_pCut) )				{					DataObject_Update(m_pCut);				}				else				{					Message_Add(_TL("No shapes in selection"));				}			}		}		return( true );	}	return( true );}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:46,


示例16: Parameters

//---------------------------------------------------------bool CAddCoordinates::On_Execute(void){	CSG_Shapes	*pShapes	= Parameters("OUTPUT")->asShapes();	if( pShapes )	{		pShapes->Assign(Parameters("INPUT")->asShapes());	}	else	{		pShapes	= Parameters("INPUT")->asShapes();	}	//-----------------------------------------------------	int	xField	= pShapes->Get_Field_Count();	pShapes->Add_Field("X", SG_DATATYPE_Double);	int	yField	= pShapes->Get_Field_Count();	pShapes->Add_Field("Y", SG_DATATYPE_Double);	int zField	= 0, mField	= 0;	if( pShapes->Get_Vertex_Type() != SG_VERTEX_TYPE_XY )	{		zField	= pShapes->Get_Field_Count();		pShapes->Add_Field("Z", SG_DATATYPE_Double);		if( pShapes->Get_Vertex_Type() == SG_VERTEX_TYPE_XYZM )		{			mField	= pShapes->Get_Field_Count();			pShapes->Add_Field("M", SG_DATATYPE_Double);		}	}	//-----------------------------------------------------	for(int i=0; i<pShapes->Get_Count(); i++)	{		CSG_Shape	*pShape	= pShapes->Get_Shape(i);		pShape->Set_Value(xField, pShape->Get_Point(0).x);		pShape->Set_Value(yField, pShape->Get_Point(0).y);		if( pShapes->Get_Vertex_Type() != SG_VERTEX_TYPE_XY )		{			pShape->Set_Value(zField, pShape->Get_Z(0));			if( pShapes->Get_Vertex_Type() == SG_VERTEX_TYPE_XYZM )			{				pShape->Set_Value(mField, pShape->Get_M(0));			}		}	}	DataObject_Update(pShapes);	return( true );}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:57,


示例17: Parameters

//---------------------------------------------------------bool CPolygon_Geometrics::On_Execute(void){	//-------------------------------------------------	int	bParts	= Parameters("BPARTS")	->asBool() ? 0 : -1;	int	bPoints	= Parameters("BPOINTS")	->asBool() ? 0 : -1;	int	bLength	= Parameters("BLENGTH")	->asBool() ? 0 : -1;	int	bArea	= Parameters("BAREA")	->asBool() ? 0 : -1;	if( bParts && bPoints && bLength && bArea )	{		Error_Set(_TL("no properties selected"));		return( false );	}	//-------------------------------------------------	CSG_Shapes	*pPolygons	= Parameters("POLYGONS")->asShapes();	if(	!pPolygons->is_Valid() || pPolygons->Get_Count() <= 0 )	{		Error_Set(_TL("invalid lines layer"));		return( false );	}	if( Parameters("OUTPUT")->asShapes() && Parameters("OUTPUT")->asShapes() != pPolygons )	{		pPolygons	= Parameters("OUTPUT")->asShapes();		pPolygons->Create(*Parameters("POLYGONS")->asShapes());	}	//-------------------------------------------------	if( !bParts )	{	bParts	= pPolygons->Get_Field_Count();	pPolygons->Add_Field(SG_T("NPARTS")   , SG_DATATYPE_Int   );	}	if( !bPoints )	{	bPoints	= pPolygons->Get_Field_Count();	pPolygons->Add_Field(SG_T("NPOINTS")  , SG_DATATYPE_Int   );	}	if( !bLength )	{	bLength	= pPolygons->Get_Field_Count();	pPolygons->Add_Field(SG_T("PERIMETER"), SG_DATATYPE_Double);	}	if( !bArea )	{	bArea	= pPolygons->Get_Field_Count();	pPolygons->Add_Field(SG_T("AREA")     , SG_DATATYPE_Double);	}	//-------------------------------------------------	for(int i=0; i<pPolygons->Get_Count() && Set_Progress(i, pPolygons->Get_Count()); i++)	{		CSG_Shape	*pPolygon	= pPolygons->Get_Shape(i);		if( bParts  >= 0 )	pPolygon->Set_Value(bParts , pPolygon->Get_Part_Count());		if( bPoints >= 0 )	pPolygon->Set_Value(bPoints, pPolygon->Get_Point_Count());		if( bLength >= 0 )	pPolygon->Set_Value(bLength, ((CSG_Shape_Polygon *)pPolygon)->Get_Perimeter());		if( bArea   >= 0 )	pPolygon->Set_Value(bArea  , ((CSG_Shape_Polygon *)pPolygon)->Get_Area());	}	//-------------------------------------------------	if( pPolygons == Parameters("POLYGONS")->asShapes() )	{		DataObject_Update(pPolygons);	}	return( true );}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:57,


示例18: Parameters

//---------------------------------------------------------bool CSelectByTheme::On_Execute(void){	bool		*WasSelected;	int			i, iMethod, iCondition;	CSG_Shapes	*pShapes, *pShapes2;	pShapes		= Parameters("SHAPES")		->asShapes();	pShapes2	= Parameters("SHAPES2")		->asShapes();	iCondition	= Parameters("CONDITION")	->asInt();	iMethod		= Parameters("METHOD")		->asInt();	//-----------------------------------------------------	if( iMethod == METHOD_SELECT_FROM_SEL )	{		WasSelected	= new bool[pShapes->Get_Count()];		for(i=0; i<pShapes->Get_Count() && Set_Progress(i, pShapes->Get_Count()); i++)		{			WasSelected[i]	= pShapes->Get_Record(i)->is_Selected();		}	}	if( iMethod != METHOD_ADD_TO_SEL )	{		pShapes->Select();	}	//-----------------------------------------------------	if( Select(pShapes, pShapes2, iCondition, false) )	{		for(i=0; i<m_Selection.size() && Set_Progress(i, m_Selection.size()); i++)		{			int	iSelection	= m_Selection[i];			if( !pShapes->Get_Record(iSelection)->is_Selected() )			{				if( iMethod != METHOD_SELECT_FROM_SEL || WasSelected[iSelection] )				{					((CSG_Table *)pShapes)->Select(iSelection, true);				}			}		}	}	//-----------------------------------------------------	if( iMethod == METHOD_SELECT_FROM_SEL )	{		delete(WasSelected);	}	Message_Add(CSG_String::Format(SG_T("%s: %d"), _TL("selected shapes"), m_Selection.size()));	DataObject_Update(pShapes);	return( true );}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:57,


示例19: Parameters

bool CSinuosity::On_Execute(void){	m_pDEM			= Parameters("DEM")->asGrid(); 	m_pSinuosity	= Parameters("SINUOS")->asGrid();	DataObject_Update(m_pSinuosity, true);	return true;}//method
开发者ID:Fooway,项目名称:SAGA-GIS-git-mirror,代码行数:10,


示例20: DataObject_Update

//---------------------------------------------------------bool CFlow_AreaUpslope_Interactive::On_Execute_Position(CSG_Point ptWorld, TSG_Module_Interactive_Mode Mode){	if(	Mode == MODULE_INTERACTIVE_LDOWN && m_Calculator.Get_Area(Get_xGrid(), Get_yGrid()) )	{		DataObject_Update(Parameters("AREA")->asGrid(), 0.0, 100.0, true);		return( true );	}	return( false );}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:12,


示例21: Set_Profile

//---------------------------------------------------------bool CGrid_Profile::Set_Profile(void){	int			i;	TSG_Point	A, B;	CSG_Shape	*pLine;	//-----------------------------------------------------	m_pPoints->Create(SHAPE_TYPE_Point, CSG_String::Format(_TL("Profile [%s]"), m_pDEM->Get_Name()));	m_pPoints->Add_Field("ID"						, SG_DATATYPE_Int);	m_pPoints->Add_Field(_TL("Distance")			, SG_DATATYPE_Double);	m_pPoints->Add_Field(_TL("Distance Overland")	, SG_DATATYPE_Double);	m_pPoints->Add_Field("X"						, SG_DATATYPE_Double);	m_pPoints->Add_Field("Y"						, SG_DATATYPE_Double);	m_pPoints->Add_Field("Z"						, SG_DATATYPE_Double);	for(i=0; i<m_pValues->Get_Count(); i++)	{		m_pPoints->Add_Field(m_pValues->asGrid(i)->Get_Name(), SG_DATATYPE_Double);	}	//-----------------------------------------------------	if( (pLine = m_pLine->Get_Shape(0)) != NULL && pLine->Get_Point_Count(0) > 1 )	{		B	= pLine->Get_Point(0);		for(i=1; i<pLine->Get_Point_Count(0); i++)		{			A	= B;			B	= pLine->Get_Point(i);			Set_Profile(A, B);		}	}	//-----------------------------------------------------	DataObject_Update(m_pLine);	DataObject_Update(m_pPoints);	return( m_pPoints->Get_Count() > 0 );}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:42,


示例22: Parameters

//---------------------------------------------------------bool CLine_Properties::On_Execute(void){	//-------------------------------------------------	int	bParts	= Parameters("BPARTS")	->asBool() ? 0 : -1;	int	bPoints	= Parameters("BPOINTS")	->asBool() ? 0 : -1;	int	bLength	= Parameters("BLENGTH")	->asBool() ? 0 : -1;	if( bParts && bPoints && bLength )	{		Error_Set(_TL("no properties selected"));		return( false );	}	//-------------------------------------------------	CSG_Shapes	*pLines	= Parameters("LINES")->asShapes();	if(	!pLines->is_Valid() || pLines->Get_Count() <= 0 )	{		Error_Set(_TL("invalid lines layer"));		return( false );	}	if( Parameters("OUTPUT")->asShapes() && Parameters("OUTPUT")->asShapes() != pLines )	{		pLines	= Parameters("OUTPUT")->asShapes();		pLines->Create(*Parameters("LINES")->asShapes());	}	//-------------------------------------------------	if( !bParts )	{	bParts	= pLines->Get_Field_Count();	pLines->Add_Field(SG_T("NPARTS") , SG_DATATYPE_Int   );	}	if( !bPoints )	{	bPoints	= pLines->Get_Field_Count();	pLines->Add_Field(SG_T("NPOINTS"), SG_DATATYPE_Int   );	}	if( !bLength )	{	bLength	= pLines->Get_Field_Count();	pLines->Add_Field(SG_T("LENGTH") , SG_DATATYPE_Double);	}	//-------------------------------------------------	for(int i=0; i<pLines->Get_Count() && Set_Progress(i, pLines->Get_Count()); i++)	{		CSG_Shape	*pLine	= pLines->Get_Shape(i);		if( bParts  >= 0 )	pLine->Set_Value(bParts , pLine->Get_Part_Count());		if( bPoints >= 0 )	pLine->Set_Value(bPoints, pLine->Get_Point_Count());		if( bLength >= 0 )	pLine->Set_Value(bLength, ((CSG_Shape_Line *)pLine)->Get_Length());	}	//-------------------------------------------------	if( pLines == Parameters("LINES")->asShapes() )	{		DataObject_Update(pLines);	}	return( true );}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:54,


示例23: Parameters

//---------------------------------------------------------bool CSelection_Invert::On_Execute(void){	CSG_Shapes	*pInput;	pInput	= Parameters("INPUT") ->asShapes();	pInput->Inv_Selection();	DataObject_Update(pInput);	return( true );}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:13,


示例24: DataObject_Set_Colors

//---------------------------------------------------------bool CKinWav_D8::Initialize(double Roughness){	m_Flow_Last	.Create(*Get_System(), SG_DATATYPE_Float);	m_Alpha		.Create(*Get_System(), SG_DATATYPE_Float);	m_Direction	.Create(*Get_System(), SG_DATATYPE_Char);	m_Direction	.Set_NoData_Value(-1);	m_pFlow->Assign(0.0);	DataObject_Set_Colors(m_pFlow, 100, SG_COLORS_WHITE_BLUE);	DataObject_Update(m_pFlow, 0.0, 100.0, SG_UI_DATAOBJECT_SHOW);	//-----------------------------------------------------	for(int y=0; y<Get_NY() && Set_Progress(y); y++)	{		for(int x=0; x<Get_NX(); x++)		{			if( !m_pDEM->is_NoData(x, y) )			{				int		i, ix, iy, iMax;				double	z, d, dMax;				for(i=0, iMax=-1, dMax=0.0, z=m_pDEM->asDouble(x, y); i<8; i++)				{					ix	= Get_xTo(i, x);					iy	= Get_yTo(i, y);					if( is_InGrid(ix, iy) && (d = (z - m_pDEM->asDouble(ix, iy)) / Get_Length(i)) > dMax )					{						dMax	= d;						iMax	= i;					}				}				if( iMax < 0 )				{					m_Direction	 .Set_NoData(x, y);				}				else				{					m_Direction	.Set_Value(x, y, iMax);					m_Alpha		.Set_Value(x, y, pow(Roughness / sqrt(dMax), Beta_0));					if( m_Alpha.asDouble(x, y) > 10 )						m_Alpha.Set_Value(x, y, 10);				}			}		}	}	return( true );}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:53,


示例25: return

//---------------------------------------------------------bool CLandsat_Import::On_Execute(void){	CSG_Strings	Files;	if( !Parameters("FILES")->asFilePath()->Get_FilePaths(Files) || Files.Get_Count() <= 0 )	{		return( false );	}	//-----------------------------------------------------	CSG_Parameter_Grid_List	*pBands	= Parameters("BANDS")->asGridList();	pBands->Del_Items();	for(int i=0; i<Files.Get_Count(); i++)	{		Message_Add(CSG_String::Format(SG_T("%s: %s"), _TL("loading"), SG_File_Get_Name(Files[i], false).c_str()));		CSG_Grid	*pBand	= Get_Band(Files[i]);		if( pBand )		{			pBands->Add_Item(pBand);			DataObject_Add(pBand);			DataObject_Set_Colors(pBand, 11, SG_COLORS_BLACK_WHITE);		}	}	//-----------------------------------------------------	if( Parameters("SHOW_RGB")->is_Enabled() && Parameters("SHOW_RGB")->asBool() )	{		CSG_Grid	*pR	= pBands->asGrid(Parameters("SHOW_R")->asInt());		CSG_Grid	*pG	= pBands->asGrid(Parameters("SHOW_G")->asInt());		CSG_Grid	*pB	= pBands->asGrid(Parameters("SHOW_B")->asInt());		if( pR && pG && pB )		{			DataObject_Set_Parameter(pR, "COLORS_TYPE" , 5);	// _TL("RGB Overlay")	// CLASSIFY_OVERLAY			DataObject_Set_Parameter(pR, "OVERLAY_MODE", 0);	// _TL("red=this, green=1, blue=2")			DataObject_Set_Parameter(pR, "OVERLAY_G"   , pG);			DataObject_Set_Parameter(pR, "OVERLAY_B"   , pB);			DataObject_Update(pR, true);		}	}	//-----------------------------------------------------	return( true );}
开发者ID:sinozope,项目名称:SAGA-GIS-git-mirror,代码行数:51,


示例26: SetSprite

void CMine_Sweeper::Show_GameBoard(bool ShowMines){	int x,y;	if (ShowMines)	{		for(  y = 0; y <  Mine_NY; y++)			for(  x = 0; x <  Mine_NX; x++)		{			if(GameBoard->asInt(x, y) & isBomb)			{				if (FlagBoard->asInt(x,y) == FLAG)					SetSprite(x,y,SPRITE_FLAG);				else					SetSprite(x,y,SPRITE_BOMB);			}			else			{				if (GameBoard->asInt(x, y) == isOpen )					SetSprite(x,y,SPRITE_NUMMER(Get_Number_of_Bombs(x,y)));				else								SetSprite(x,y,SPRITE_CLOSE);			}						if (GameBoard->asInt(x, y) & isBumm) SetSprite(x,y,SPRITE_BOMB_BUMM);			if ( !(GameBoard->asInt(x, y) & isBomb) && (FlagBoard->asInt(x,y) == FLAG)) 				SetSprite(x,y,SPRITE_BOMB_NO);		}	}	else	for(  y = 0; y <  Mine_NY; y++)		for(  x = 0; x <  Mine_NX; x++)	{		if(GameBoard->asInt(x, y) == isOpen)		{			SetSprite(x,y,SPRITE_NUMMER(Get_Number_of_Bombs(x,y)));		}		else		{			if(FlagBoard->asInt(x,y))			SetSprite(x,y,FlagBoard->asInt(x,y));			else			SetSprite(x,y,SPRITE_CLOSE);		}	}	DataObject_Update(pInput, 0.0, 15.0);}
开发者ID:Fooway,项目名称:SAGA-GIS-git-mirror,代码行数:49,



注:本文中的DataObject_Update函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ DataSend函数代码示例
C++ DataException函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。