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::auto_ptr<te::da::DataSetTypeConverter> converter,
57 m_inDsetName = inDsetName;
58 m_converter = converter;
63 const int& bufferPolygonRule,
64 const int& bufferBoundariesRule,
65 const bool& copyInputColumns,
68 m_distance = distance;
69 m_bufferPolygonRule = bufferPolygonRule;
70 m_bufferBoundariesRule = bufferBoundariesRule;
71 m_copyInputColumns = copyInputColumns;
78 m_outDsetName = dsname;
83 if (!m_converter->getResult()->hasGeom())
86 if (m_outDsetName.empty() || !m_outDsrc.get())
99 dsType->
add(pkProperty);
106 dsType->
add(levelProperty);
109 dsType->
add(distanceProperty);
112 if(m_copyInputColumns)
114 std::vector<te::dt::Property*> props = m_converter->getResult()->getProperties();
116 for(std::size_t i = 0; i < props.size(); ++i)
118 const std::string name = props[i]->getName();
119 int type = props[i]->getType();
130 std::auto_ptr<te::gm::GeometryProperty> p (static_cast<te::gm::GeometryProperty*>(gp->
clone()));
133 geometry->
setSRID(p->getSRID());
134 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.
void setInput(te::da::DataSourcePtr inDsrc, std::string inDsetName, std::auto_ptr< te::da::DataSetTypeConverter > converter, const te::da::ObjectIdSet *oidSet=0)
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)
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.