24 #include "../common/StringUtils.h"
26 #include "../dataaccess/dataset/DataSet.h"
27 #include "../dataaccess/dataset/DataSetAdapter.h"
28 #include "../dataaccess/dataset/DataSetType.h"
29 #include "../dataaccess/datasource/DataSource.h"
30 #include "../dataaccess/datasource/DataSourceCapabilities.h"
31 #include "../dataaccess/utils/Utils.h"
33 #include "../datatype/Property.h"
34 #include "../datatype/StringProperty.h"
36 #include "../geometry/GeometryProperty.h"
38 #include "../statistics/core/Utils.h"
45 : m_outputLayer(false)
50 std::string inDsetName,
51 std::auto_ptr<te::da::DataSetTypeConverter> converter)
54 m_inDsetName = inDsetName;
55 m_converter = converter;
59 std::vector<te::vp::GeometricOperation> operations,
61 std::string attribute,
64 m_selectedProps = selectedProps;
65 m_operations = operations;
66 m_objStrategy = objStrategy;
67 m_attribute = attribute;
68 m_outputLayer = outputLayer;
74 m_outDsetName = dsname;
79 if (!m_converter.get())
82 if (!m_converter->getResult()->hasGeom())
85 if (m_outDsetName.empty() || !m_outDsrc.get())
93 return m_outDsetNameVec;
97 bool multiGeomColumns,
109 dsType->
setTitle(m_outDsetName +
"_convex_hull");
114 dsType->
add(pkProperty);
125 dsType->
setTitle(m_outDsetName +
"_centroid");
130 dsType->
add(pkProperty);
141 dsType->
setTitle(m_outDsetName +
"_mbr");
146 dsType->
add(pkProperty);
164 dsType->
add(pkProperty);
174 for(std::size_t i = 0; i < m_selectedProps.size(); ++i)
189 for(std::size_t i = 0; i < m_operations.size(); ++i)
191 int op = m_operations[i];
209 dsType->
add(perimeter);
222 bool flagGeom =
false;
223 for(std::size_t i = 0; i< m_operations.size(); ++i)
225 switch(m_operations[i])
232 dsType->
add(convGeom);
241 dsType->
add(centroidGeom);
250 dsType->
add(mbrGeom);
278 dsType->
add(geometry);
284 bool flagGeom =
false;
292 dsType->
add(geometry);
301 dsType->
add(geometry);
310 dsType->
add(geometry);
338 dsType->
add(geometry);
void setAutoNumber(bool a)
It tells if the property is an autonumber or not.
void setTitle(const std::string &title)
It sets a human descriptive title for the DataSetType.
te::da::DataSetType * GetDataSetType(te::vp::GeometricOpObjStrategy, bool MultiGeomColumns, int geomOp=-1)
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.
std::vector< std::string > GetOutputDSetNames()
An atomic property like an integer or double.
The geographic operation Line.
boost::shared_ptr< DataSource > DataSourcePtr
The geographic operation Minimum Bounding Rectangle.
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)
virtual Property * clone() const =0
It returns a clone of the object.
It models a property definition.
GeometricOpObjStrategy
Defines the strategy used for the processing of the input geometries.
The geographic operation Area.
int getSRID() const
It returns the spatial reference system identifier associated to this property.
GeomType getGeometryType() const
It returns the geometry subtype allowed for the property.
Aggregate objects by attribute.
The geographic operation Perimeter.
void setOutput(std::auto_ptr< te::da::DataSource > outDsrc, std::string dsname)
The geographic operation Centroid.
void add(Constraint *c)
It adds a new constraint.
It describes a primary key (pk) constraint.
virtual bool paramsAreValid()
The geographic operation Convex Hull.
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
All objects individually.
void setParams(std::vector< std::string > selectedProps, std::vector< te::vp::GeometricOperation > operations, te::vp::GeometricOpObjStrategy objStrategy, std::string attribute, bool outputLayer)
void setPrimaryKey(PrimaryKey *pk)
It sets the primary key constraint.
void setParent(Property *p)
It associate this property to the informed parent.