This class provide cellular spaces operations. More...
#include <CellSpaceOperations.h>
Public Types | |
enum | CellSpaceType { CELLSPACE_POLYGONS, CELLSPACE_POINTS } |
Public Member Functions | |
CellularSpacesOperations () | |
void | createCellSpace (te::da::DataSourceInfoPtr outputSource, const std::string &name, te::map::AbstractLayerPtr layerBase, double resX, double resY, bool useMask, CellSpaceType type=CELLSPACE_POLYGONS) |
It create a Cellular Space. More... | |
void | createCellSpace (te::da::DataSourceInfoPtr outputSource, const std::string &name, const double resX, const double resY, const te::gm::Envelope &env, const int srid, const CellSpaceType type=CELLSPACE_POLYGONS) |
It create a Cellular Space. More... | |
~CellularSpacesOperations () | |
Private Member Functions | |
void | addCell (te::mem::DataSet *ds, int col, int row, te::gm::Geometry *geom) |
Add a cell in the memory dataset. More... | |
te::da::DataSetType * | createCellularDataSetType (const std::string &name, int srid, CellSpaceType type) |
Create the DataSetType of the cellular space. More... | |
te::sam::rtree::Index< size_t, 8 > * | getRtree (te::map::AbstractLayerPtr layerBase) |
Get a RTree with the geometries envelopes of layer. More... | |
This class provide cellular spaces operations.
Definition at line 66 of file CellSpaceOperations.h.
Enumerator | |
---|---|
CELLSPACE_POLYGONS |
Polygons Type. |
CELLSPACE_POINTS |
Points Type. |
Definition at line 71 of file CellSpaceOperations.h.
te::cellspace::CellularSpacesOperations::CellularSpacesOperations | ( | ) |
Definition at line 44 of file CellSpaceOperations.cpp.
te::cellspace::CellularSpacesOperations::~CellularSpacesOperations | ( | ) |
Definition at line 48 of file CellSpaceOperations.cpp.
|
private |
Add a cell in the memory dataset.
ds | DataSet where the cell will be added. |
col | Column number. |
row | Row number. |
geom | Geometry that will be added. |
Definition at line 180 of file CellSpaceOperations.cpp.
References te::mem::DataSet::add(), te::mem::DataSetItem::setGeometry(), te::mem::DataSetItem::setInt32(), and te::mem::DataSetItem::setString().
void te::cellspace::CellularSpacesOperations::createCellSpace | ( | te::da::DataSourceInfoPtr | outputSource, |
const std::string & | name, | ||
te::map::AbstractLayerPtr | layerBase, | ||
double | resX, | ||
double | resY, | ||
bool | useMask, | ||
CellSpaceType | type = CELLSPACE_POLYGONS |
||
) |
It create a Cellular Space.
name | Name of the DataSet. |
layerbase | Layer base for cellular space creation. |
resX | Resolution X. |
resY | Resolution Y. |
useMask | If will use poligons as mask. |
type | Celluar space type (polygon, points or raster). |
Definition at line 52 of file CellSpaceOperations.cpp.
References te::da::GetFirstSpatialPropertyPos(), te::gm::GetGeomFromEnvelope(), te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::da::DataSourceFactory::make(), te::common::TaskProgress::pulse(), te::common::TaskProgress::setTotalSteps(), and te::common::TaskProgress::useTimer().
void te::cellspace::CellularSpacesOperations::createCellSpace | ( | te::da::DataSourceInfoPtr | outputSource, |
const std::string & | name, | ||
const double | resX, | ||
const double | resY, | ||
const te::gm::Envelope & | env, | ||
const int | srid, | ||
const CellSpaceType | type = CELLSPACE_POLYGONS |
||
) |
It create a Cellular Space.
name | Name of the DataSet. |
resX | Resolution X. |
resY | Resolution Y. |
env | Envelope base to creation. |
srid | SRID of the envelope. |
type | Celluar space type (polygon, points or raster). |
Definition at line 164 of file CellSpaceOperations.cpp.
|
private |
Create the DataSetType of the cellular space.
name | DataSetType name. |
srid | DataSetType SRID. |
type | Celluar space type (polygon, points or raster). |
Definition at line 217 of file CellSpaceOperations.cpp.
References te::da::DataSetType::add(), te::dt::INT32_TYPE, te::gm::PointType, te::gm::PolygonType, and te::da::PrimaryKey::setProperties().
|
private |
Get a RTree with the geometries envelopes of layer.
layerBase | Layer base. |
Definition at line 193 of file CellSpaceOperations.cpp.
References te::da::GetFirstSpatialPropertyPos(), and te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::insert().