29 #include "../../dataaccess/utils/Utils.h" 30 #include "../../geometry/GeometryProperty.h" 31 #include "../../memory/DataSet.h" 32 #include "../../raster/Raster.h" 44 KernelMap::iterator itA =
m_kMapA.begin();
48 delete itA->second.first;
55 KernelMap::iterator itB =
m_kMapB.begin();
59 delete itB->second.first;
119 std::size_t kernelIdx = dsTypeOut->getPropertyPosition(
m_outputParams->m_outputAttrName);
164 int id = atoi(strId.c_str());
179 std::pair<te::gm::Geometry*, double> pairA((
te::gm::Geometry*)g->clone(), valueA);
181 m_kMapA.insert(KernelMap::value_type(
id, pairA));
190 std::pair<te::gm::Geometry*, double> pairB((
te::gm::Geometry*)g->clone(), valueB);
192 m_kMapB.insert(KernelMap::value_type(
id, pairB));
std::unique_ptr< te::sa::KernelInputParams > m_inputParamsB
Kernel input parameters B.
TESAEXPORT void GridRatioKernel(te::sa::KernelOutputParams *params, te::rst::Raster *rasterA, te::rst::Raster *rasterB, te::rst::Raster *rasterOut)
Evaluates kernel ratio value using a raster as output data.
virtual std::unique_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value.
TESAEXPORT void DataSetRatioKernel(te::sa::KernelOutputParams *params, te::mem::DataSet *dsA, te::mem::DataSet *dsB, te::mem::DataSet *dsOut, int kernelIdx, int geomIdx)
Evaluates kernel ratio value using a dataset as output data.
te::sa::KernelMap m_kMapB
Kernel map with input data B.
virtual void execute()
Function to execute the kernel operation.
te::sa::KernelTree m_kTree
Attribute used to locate near geometries.
A class that models the description of a dataset.
te::sa::KernelMap m_kMapA
Kernel map with input data A.
This file contains a class that represents the kernel ratio operation.
void saveDataSet(te::da::DataSet *dataSet, te::da::DataSetType *dsType)
std::unique_ptr< te::mem::DataSet > runDataSetKernel(te::sa::KernelInputParams *inputParams, te::sa::KernelTree &kTree, te::sa::KernelMap &kMap, te::da::DataSetType *dsType)
void setInputParameters(te::sa::KernelInputParams *inParamsA, te::sa::KernelInputParams *inParamsB)
PrimaryKey * getPrimaryKey() const
It returns the primary key associated to the dataset type.
const std::vector< te::dt::Property * > & getProperties() const
It returns the properties that take part of the primary key.
std::unique_ptr< te::sa::KernelInputParams > m_inputParamsA
Kernel input parameters A.
void runRasterKernel(te::sa::KernelInputParams *inputParams, te::sa::KernelTree &kTree, te::sa::KernelMap &kMap, te::rst::Raster *raster)
~KernelRatioOperation()
Virtual destructor.
virtual bool moveNext()=0
It moves the internal pointer to the next item of the collection.
An Envelope defines a 2D rectangular region.
virtual std::string getAsString(std::size_t i, int precision=0) const
Method for retrieving a data value as a string plain representation.
Utility functions for the data access module.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
KernelOutputType
Defines the kernel result storage mode.
A dataset is the unit of information manipulated by the data access module of TerraLib.
std::unique_ptr< te::sa::KernelOutputParams > m_outputParams
Attribute with the kernel output parameters.
void insert(const te::gm::Envelope &mbr, const DATATYPE &data)
It inserts an item into the tree.
virtual std::unique_ptr< te::dt::AbstractData > getValue(std::size_t i) const
Method for retrieving any other type of data value stored in the data source.
It describes a primary key (pk) constraint.
KernelRatioOperation()
Default constructor.
virtual bool moveBeforeFirst()=0
It moves the internal pointer to a position before the first item in the collection.
std::unique_ptr< te::mem::DataSet > createDataSet(te::da::DataSet *inputDataSet, te::da::DataSetType *dsType)
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
TESAEXPORT double GetDataValue(te::dt::AbstractData *ad)
Function used to get the numeric value from a gpm property.
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
std::unique_ptr< te::da::DataSetType > createDataSetType(te::da::DataSetType *dsType)
std::unique_ptr< te::rst::Raster > buildRaster(te::sa::KernelInputParams *inputParams, te::sa::KernelTree &kTree, std::string driver)
const std::string & getName() const
It returns the property name.