24 #include "../dataaccess/dataset/DataSet.h" 25 #include "../dataaccess/dataset/DataSetAdapter.h" 26 #include "../dataaccess/dataset/DataSetType.h" 27 #include "../dataaccess/datasource/DataSource.h" 28 #include "../dataaccess/datasource/DataSourceCapabilities.h" 29 #include "../dataaccess/utils/Utils.h" 31 #include "../datatype/Property.h" 32 #include "../datatype/SimpleProperty.h" 33 #include "../datatype/StringProperty.h" 35 #include "../geometry/GeometryProperty.h" 37 #include "../statistics/core/Utils.h" 44 m_bufferPolygonRule(-1),
45 m_bufferBoundariesRule(-1),
46 m_copyInputColumns(false),
52 std::string inDsetName,
53 std::unique_ptr<te::da::DataSetTypeConverter> converter,
64 const int& bufferPolygonRule,
65 const int& bufferBoundariesRule,
66 const bool& copyInputColumns,
68 const int& attributePosition)
103 dsType->
add(pkProperty);
110 dsType->
add(levelProperty);
113 dsType->
add(distanceProperty);
118 std::vector<te::dt::Property*> props =
m_converter->getResult()->getProperties();
120 for(std::size_t i = 0; i < props.size(); ++i)
122 const std::string name = props[i]->getName();
123 int type = props[i]->getType();
134 std::unique_ptr<te::gm::GeometryProperty>
p (static_cast<te::gm::GeometryProperty*>(gp->
clone()));
137 geometry->
setSRID(p->getSRID());
138 dsType->
add(geometry);
void setAutoNumber(bool a)
It tells if the property is an autonumber or not.
void add(te::dt::Property *p)
It adds a property to the list of properties of the primary key.
double m_distance
The fixed distance.
void setSRID(int srid)
It sets the spatial reference system identifier associated to this property.
void setGeometryType(GeomType t)
It sets the geometry subtype.
An atomic property like an integer or double.
boost::shared_ptr< DataSource > DataSourcePtr
A class that models the description of a dataset.
const te::da::ObjectIdSet * m_oidSet
The input objectid set.
void setParams(const double &distance, const int &newSrid, const int &bufferPolygonRule, const int &bufferBoundariesRule, const bool ©InputColumns, const int &levels, const int &attributePosition=-1)
It sets the input parameters that will be consumed to execute the operation.
std::unique_ptr< te::da::DataSetTypeConverter > m_converter
The input datasettype.
te::dt::Property * clone() const
It returns a clone of the object.
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.
std::string m_outDsetName
The output dataset name.
int m_bufferPolygonRule
The buffer polygon rule (INSIDE_OUTSIDE = 0, ONLY_OUTSIDE = 1, ONLY_INSIDE = 2).
int m_levels
The number of levels buffer will have.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
te::da::DataSetType * GetDataSetType()
It builds the output DataSetType.
int m_bufferBoundariesRule
The buffer boundary rule (DISSOLVE = 0 and NOT_DISSOLVE = 1).
virtual bool paramsAreValid()
It verifies if the parameters are valid.
void setOutput(te::da::DataSourcePtr outDsrc, std::string dsname)
It sets the output parameters that will be used to persist operation result.
void add(Constraint *c)
It adds a new constraint.
It describes a primary key (pk) constraint.
int m_attributePosition
The buffer can be calculated by attribute values. The attribute must be numeric type.
bool m_copyInputColumns
Copy columns from input DataSet.
te::da::DataSourcePtr m_inDsrc
The input datasource.
te::da::DataSourcePtr m_outDsrc
The output datasource.
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
BufferOp()
Default constructor that can be called by subclasses.
std::string m_inDsetName
The input dataset name.
void setPrimaryKey(PrimaryKey *pk)
It sets the primary key constraint.
int m_newSRID
A new SRID if it's necessary to transform the data.