コード例 #1
0
//---------------------------------------------------------
bool CGridding_Spline_MBA::_Set_MBA_Refinement(double dCell)
{
	bool	bContinue;
	int		nCells;
	CSG_Grid	A, B, *Phi, *Psi, *pTmp;

	for(bContinue=true, Psi=&A, Phi=&B, nCells=1; bContinue; nCells*=2, dCell/=2.0)
	{
		bContinue	= _Get_Phi(*Phi, dCell, nCells);

		if( nCells > 1 )
		{
			_Set_MBA_Refinement(Psi, Phi);
		}

		pTmp	= Phi;	Phi	= Psi;	Psi	= pTmp;

		if( m_bUpdate )
		{
			BA_Set_Grid(*Psi);	DataObject_Update(m_pGrid, true);
		}
	}

	BA_Set_Grid(*Psi);

	return( true );
}
コード例 #2
0
//---------------------------------------------------------
bool CGridding_Spline_MBA::_Set_MBA(double dCell)
{
	bool	bContinue;
	int		nCells;
	CSG_Grid	Phi;

	for(bContinue=true, nCells=1; bContinue; nCells*=2, dCell/=2.0)
	{
		bContinue	= _Get_Phi(Phi, dCell, nCells);

		BA_Set_Grid	(Phi, nCells > 1);

		if( m_bUpdate )
		{
			DataObject_Update(m_pGrid, true);
		}
	}

	return( true );
}
コード例 #3
0
//---------------------------------------------------------
bool CGridding_Spline_BA::On_Execute(void)
{
	bool	bResult	= false;
	int		nx, ny;
	double	d;
	CSG_Grid	Phi;

	if( Initialise(m_Points, true) )
	{
		d		= m_pGrid->Get_Cellsize() * Parameters("LEVEL")->asDouble();
		nx		= (int)((m_pGrid->Get_XRange()) / d);
		ny		= (int)((m_pGrid->Get_YRange()) / d);
		Phi.Create(SG_DATATYPE_Float, nx + 4, ny + 4, d, m_pGrid->Get_XMin(), m_pGrid->Get_YMin());

		BA_Get_Phi	(Phi);
		BA_Set_Grid	(Phi);

		bResult	= true;
	}

	m_Points.Clear();

	return( bResult );
}