24 #include "../dataaccess/dataset/DataSet.h"
25 #include "../dataaccess/dataset/DataSetAdapter.h"
26 #include "../dataaccess/dataset/DataSetType.h"
27 #include "../dataaccess/dataset/DataSetTypeConverter.h"
28 #include "../dataaccess/datasource/DataSource.h"
29 #include "../dataaccess/datasource/DataSourceCapabilities.h"
30 #include "../dataaccess/utils/Utils.h"
32 #include "../datatype/Property.h"
33 #include "../datatype/SimpleProperty.h"
34 #include "../datatype/StringProperty.h"
36 #include "../geometry/GeometryProperty.h"
38 #include "../statistics/core/Utils.h"
48 std::string inDsetName,
49 std::auto_ptr<te::da::DataSetType> inDsetType,
53 m_inDsetName = inDsetName;
54 m_inDsetType = inDsetType;
59 const int& bufferPolygonRule,
60 const int& bufferBoundariesRule,
61 const bool& copyInputColumns,
64 m_distance = distance;
65 m_bufferPolygonRule = bufferPolygonRule;
66 m_bufferBoundariesRule = bufferBoundariesRule;
67 m_copyInputColumns = copyInputColumns;
74 m_outDsetName = dsname;
79 if (!m_inDsetType->hasGeom())
82 if (m_outDsetName.empty() || !m_outDsrc.get())
95 dsType->
add(pkProperty);
102 dsType->
add(levelProperty);
105 dsType->
add(distanceProperty);
108 if(m_copyInputColumns)
110 std::vector<te::dt::Property*> props = m_inDsetType->getProperties();
112 for(std::size_t i = 0; i < props.size(); ++i)
114 const std::string name = props[i]->getName();
115 int type = props[i]->getType();
126 std::auto_ptr<te::gm::GeometryProperty> p (static_cast<te::gm::GeometryProperty*>(gp->
clone()));
129 geometry->
setSRID(p->getSRID());
130 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.
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.
te::dt::Property * clone() const
It returns a clone of the object.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
te::da::DataSetType * GetDataSetType()
void setParams(const double &distance, const int &bufferPolygonRule, const int &bufferBoundariesRule, const bool ©InputColumns, const int &levels)
void setInput(te::da::DataSourcePtr inDsrc, std::string inDsetName, std::auto_ptr< te::da::DataSetType > inDsetType, const te::da::ObjectIdSet *oidSet=0)
virtual bool paramsAreValid()
void setOutput(te::da::DataSourcePtr outDsrc, std::string dsname)
void add(Constraint *c)
It adds a new constraint.
It describes a primary key (pk) constraint.
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
void setPrimaryKey(PrimaryKey *pk)
It sets the primary key constraint.