te::vp::BufferQuery Class Reference

A concrete class to compute the buffer operation. More...

#include <BufferQuery.h>

Inheritance diagram for te::vp::BufferQuery:
te::vp::BufferOp

Public Member Functions

 BufferQuery ()
 Default constructor. More...
 
virtual bool paramsAreValid ()
 It verifies if the parameters are valid. More...
 
bool run () throw (te::common::Exception)
 It executes the operation. More...
 
void setInput (te::da::DataSourcePtr inDsrc, std::string inDsetName, std::unique_ptr< te::da::DataSetTypeConverter > converter, const te::da::ObjectIdSet *oidSet=0)
 It sets the input data will be calculated. More...
 
void setOutput (te::da::DataSourcePtr outDsrc, std::string dsname)
 It sets the output parameters that will be used to persist operation result. More...
 
void setParams (const double &distance, const int &newSrid, const int &bufferPolygonRule, const int &bufferBoundariesRule, const bool &copyInputColumns, const int &levels, const int &attributePosition=-1)
 It sets the input parameters that will be consumed to execute the operation. More...
 
 ~BufferQuery ()
 Destructor. More...
 

Protected Member Functions

std::vector< std::vector< te::gm::Geometry * > > dissolveQuery (te::da::DataSet *dsQuery, const int &levels)
 It dissolves the bounders between buffers. More...
 
te::da::DataSetTypeGetDataSetType ()
 It builds the output DataSetType. More...
 
void prepareDataSet (te::da::DataSet *dataSetQuery, te::mem::DataSet *outputDataSet, const int &sourceSRID)
 It prepare the dataset to be persisted. More...
 
void prepareDataSet (std::vector< std::vector< te::gm::Geometry * > > vecDissolvedGeom, te::mem::DataSet *outputDataSet, const int &sourceSRID, const double &distance)
 It prepare the dataset to be persisted with dissolved geometries. More...
 

Protected Attributes

int m_attributePosition
 The buffer can be calculated by attribute values. The attribute must be numeric type. More...
 
int m_bufferBoundariesRule
 The buffer boundary rule (DISSOLVE = 0 and NOT_DISSOLVE = 1). More...
 
int m_bufferPolygonRule
 The buffer polygon rule (INSIDE_OUTSIDE = 0, ONLY_OUTSIDE = 1, ONLY_INSIDE = 2). More...
 
std::unique_ptr< te::da::DataSetTypeConverterm_converter
 The input datasettype. More...
 
bool m_copyInputColumns
 Copy columns from input DataSet. More...
 
double m_distance
 The fixed distance. More...
 
std::string m_inDsetName
 The input dataset name. More...
 
te::da::DataSourcePtr m_inDsrc
 The input datasource. More...
 
int m_levels
 The number of levels buffer will have. More...
 
int m_newSRID
 A new SRID if it's necessary to transform the data. More...
 
const te::da::ObjectIdSetm_oidSet
 The input objectid set. More...
 
std::string m_outDsetName
 The output dataset name. More...
 
te::da::DataSourcePtr m_outDsrc
 The output datasource. More...
 

Detailed Description

A concrete class to compute the buffer operation.

Definition at line 61 of file BufferQuery.h.

Constructor & Destructor Documentation

te::vp::BufferQuery::BufferQuery ( )
default

Default constructor.

te::vp::BufferQuery::~BufferQuery ( )
default

Destructor.

Member Function Documentation

bool te::vp::BufferOp::paramsAreValid ( )
virtualinherited

It verifies if the parameters are valid.

Returns
A Boolean value that means if the operation successfully completed or not.

Definition at line 85 of file BufferOp.cpp.

References te::vp::BufferOp::m_converter, te::vp::BufferOp::m_outDsetName, and te::vp::BufferOp::m_outDsrc.

Referenced by BufferOGRToOGR(), BufferOGRToPGIS(), BufferPGISToOGR(), BufferPGISToPGIS(), and te::vp::BufferDialog::onOkPushButtonClicked().

void te::vp::BufferQuery::prepareDataSet ( std::vector< std::vector< te::gm::Geometry * > >  vecDissolvedGeom,
te::mem::DataSet outputDataSet,
const int sourceSRID,
const double &  distance 
)
protected

It prepare the dataset to be persisted with dissolved geometries.

Parameters
vecDissolvedGeomA vecter with dissolved geometries by level.
outputDataSetThe dataSet prepared to be persisted.
distanceThe buffer distance.
Note
The outDSet is updated with dissolved buffers.

Definition at line 529 of file BufferQuery.cpp.

References te::mem::DataSet::add(), te::gm::MultiPolygonType, te::mem::DataSetItem::setDouble(), te::mem::DataSetItem::setGeometry(), and te::mem::DataSetItem::setInt32().

void te::vp::BufferOp::setInput ( te::da::DataSourcePtr  inDsrc,
std::string  inDsetName,
std::unique_ptr< te::da::DataSetTypeConverter converter,
const te::da::ObjectIdSet oidSet = 0 
)
inherited

It sets the input data will be calculated.

Parameters
inDsrcWhere data is located.
inDsetNameDataSet name.
converterDataSetTypeConverterr.
oidSetObjectIdSet - It is necessary if has need to execute with a set of specific objects

Definition at line 51 of file BufferOp.cpp.

References te::vp::BufferOp::m_converter, te::vp::BufferOp::m_inDsetName, te::vp::BufferOp::m_inDsrc, and te::vp::BufferOp::m_oidSet.

Referenced by BufferOGRToOGR(), BufferOGRToPGIS(), BufferPGISToOGR(), BufferPGISToPGIS(), and te::vp::BufferDialog::onOkPushButtonClicked().

void te::vp::BufferOp::setOutput ( te::da::DataSourcePtr  outDsrc,
std::string  dsname 
)
inherited

It sets the output parameters that will be used to persist operation result.

Parameters
outDsrcWhere data is will be persisted.
dsnameThe name os output data.
Note
The output name must be different from other data that is already in dataSource.

Definition at line 79 of file BufferOp.cpp.

References te::vp::BufferOp::m_outDsetName, and te::vp::BufferOp::m_outDsrc.

Referenced by BufferOGRToOGR(), BufferOGRToPGIS(), BufferPGISToOGR(), BufferPGISToPGIS(), and te::vp::BufferDialog::onOkPushButtonClicked().

void te::vp::BufferOp::setParams ( const double &  distance,
const int newSrid,
const int bufferPolygonRule,
const int bufferBoundariesRule,
const bool copyInputColumns,
const int levels,
const int attributePosition = -1 
)
inherited

It sets the input parameters that will be consumed to execute the operation.

Parameters
distanceA numeric value to set a fixed distance to buffer.
bufferPolygonRuleThe rule used for buffer result (INSIDE_OUTSIDE = 0, ONLY_OUTSIDE = 1, ONLY_INSIDE = 2).
bufferBoundariesRuleThe BoundariesBetweenBuffers can be dissolved or not - (DISSOLVE = 0 and NOT_DISSOLVE = 1).
copyInputColumnsCopy columns from input DataSet.
levelsThe number of levels buffer will have.
attributePositionThe buffer can be calculated by attribute values. The attribute must be numeric type.
Note
If uses attibutePosition parameter, the fixed distance will be ignored.
The attributePosition parameter must be numeric type.
If there is a null value or zero in chosen attribute, the line that has this value will be ignored.

Definition at line 62 of file BufferOp.cpp.

References te::vp::BufferOp::m_attributePosition, te::vp::BufferOp::m_bufferBoundariesRule, te::vp::BufferOp::m_bufferPolygonRule, te::vp::BufferOp::m_copyInputColumns, te::vp::BufferOp::m_distance, te::vp::BufferOp::m_levels, and te::vp::BufferOp::m_newSRID.

Referenced by BufferOGRToOGR(), BufferOGRToPGIS(), BufferPGISToOGR(), BufferPGISToPGIS(), and te::vp::BufferDialog::onOkPushButtonClicked().

Member Data Documentation

int te::vp::BufferOp::m_attributePosition
protectedinherited

The buffer can be calculated by attribute values. The attribute must be numeric type.

Definition at line 148 of file BufferOp.h.

Referenced by te::vp::BufferMemory::dissolveMemory(), run(), te::vp::BufferMemory::run(), and te::vp::BufferOp::setParams().

int te::vp::BufferOp::m_bufferBoundariesRule
protectedinherited

The buffer boundary rule (DISSOLVE = 0 and NOT_DISSOLVE = 1).

Definition at line 145 of file BufferOp.h.

Referenced by run(), te::vp::BufferMemory::run(), and te::vp::BufferOp::setParams().

int te::vp::BufferOp::m_bufferPolygonRule
protectedinherited

The buffer polygon rule (INSIDE_OUTSIDE = 0, ONLY_OUTSIDE = 1, ONLY_INSIDE = 2).

Definition at line 144 of file BufferOp.h.

Referenced by run(), te::vp::BufferMemory::setBuffer(), and te::vp::BufferOp::setParams().

std::unique_ptr<te::da::DataSetTypeConverter> te::vp::BufferOp::m_converter
protectedinherited
bool te::vp::BufferOp::m_copyInputColumns
protectedinherited

Copy columns from input DataSet.

Definition at line 146 of file BufferOp.h.

Referenced by te::vp::BufferOp::GetDataSetType(), run(), te::vp::BufferMemory::run(), and te::vp::BufferOp::setParams().

double te::vp::BufferOp::m_distance
protectedinherited

The fixed distance.

Definition at line 142 of file BufferOp.h.

Referenced by te::vp::BufferMemory::dissolveMemory(), run(), te::vp::BufferMemory::run(), and te::vp::BufferOp::setParams().

std::string te::vp::BufferOp::m_inDsetName
protectedinherited

The input dataset name.

Definition at line 138 of file BufferOp.h.

Referenced by te::vp::BufferMemory::run(), and te::vp::BufferOp::setInput().

te::da::DataSourcePtr te::vp::BufferOp::m_inDsrc
protectedinherited

The input datasource.

Definition at line 137 of file BufferOp.h.

Referenced by run(), te::vp::BufferMemory::run(), and te::vp::BufferOp::setInput().

int te::vp::BufferOp::m_levels
protectedinherited

The number of levels buffer will have.

Definition at line 147 of file BufferOp.h.

Referenced by run(), te::vp::BufferMemory::run(), and te::vp::BufferOp::setParams().

int te::vp::BufferOp::m_newSRID
protectedinherited

A new SRID if it's necessary to transform the data.

Definition at line 143 of file BufferOp.h.

Referenced by run(), te::vp::BufferMemory::run(), and te::vp::BufferOp::setParams().

const te::da::ObjectIdSet* te::vp::BufferOp::m_oidSet
protectedinherited

The input objectid set.

Definition at line 140 of file BufferOp.h.

Referenced by run(), te::vp::BufferMemory::run(), and te::vp::BufferOp::setInput().

std::string te::vp::BufferOp::m_outDsetName
protectedinherited

The output dataset name.

Definition at line 151 of file BufferOp.h.

Referenced by te::vp::BufferOp::GetDataSetType(), te::vp::BufferOp::paramsAreValid(), and te::vp::BufferOp::setOutput().

te::da::DataSourcePtr te::vp::BufferOp::m_outDsrc
protectedinherited

The output datasource.

Definition at line 150 of file BufferOp.h.

Referenced by te::vp::BufferOp::paramsAreValid(), run(), te::vp::BufferMemory::run(), and te::vp::BufferOp::setOutput().


The documentation for this class was generated from the following files: