29 #include "../../dataaccess/utils/Utils.h"
30 #include "../../geometry/GeometryProperty.h"
31 #include "../../memory/DataSet.h"
32 #include "../../raster/Raster.h"
47 KernelMap::iterator it = m_kMap.begin();
49 while(it != m_kMap.end())
51 delete it->second.first;
60 assert(m_inputParams.get());
61 assert(m_outputParams.get());
72 std::auto_ptr<te::rst::Raster> raster = buildRaster(m_inputParams.get(), m_kTree,
"GDAL");
75 runRasterKernel(m_inputParams.get(), m_kTree, m_kMap, raster.get());
80 std::auto_ptr<te::da::DataSetType> dsType = createDataSetType(m_inputParams->m_dsType.get());
83 std::auto_ptr<te::mem::DataSet> dataSet = runDataSetKernel(m_inputParams.get(), m_kTree, m_kMap, dsType.get());
86 saveDataSet(dataSet.get(), dsType.get());
92 m_inputParams.reset(inParams);
121 int id = atoi(strId.c_str());
127 m_kTree.insert(*box,
id);
131 if(!m_inputParams->m_intensityAttrName.empty())
136 std::pair<te::gm::Geometry*, double> pair(g, value);
138 m_kMap.insert(KernelMap::value_type(
id, pair));
Utility functions for the data access module.
A class that models the description of a dataset.
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.
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.
This file contains a class that represents the kernel map operation.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
virtual std::auto_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value.
KernelOutputType
Defines the kernel result storage mode.
A dataset is the unit of information manipulated by the data access module of TerraLib.
virtual void execute()
Function to execute the kernel operation.
It describes a primary key (pk) constraint.
virtual bool moveBeforeFirst()=0
It moves the internal pointer to a position before the first item in the collection.
KernelMapOperation()
Default constructor.
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)
~KernelMapOperation()
Virtual destructor.
virtual std::auto_ptr< te::dt::AbstractData > getValue(std::size_t i) const
Method for retrieving any other type of data value stored in the data source.
void setInputParameters(te::sa::KernelInputParams *inParams)
const std::string & getName() const
It returns the property name.