25 #include "../datatype/Enums.h"
26 #include "../datatype/Property.h"
28 #include "../geometry/Enums.h"
29 #include "../geometry/GeometryProperty.h"
42 std::string inDsetName,
46 m_inDsetName = inDsetName;
58 std::auto_ptr<te::da::DataSetType> inDsType = m_inDsrc->getDataSetType(m_inDsetName);
61 std::string dSourceType = m_outDsrc->getType();
63 std::vector<te::dt::Property*> vecProps = inDsType->getProperties();
65 std::vector<te::dt::Property*> inPk = inDsType->getPrimaryKey()->getProperties();
66 std::string namePk = m_outDset;
68 for (std::size_t p = 0; p < inPk.size(); ++p)
69 namePk +=
"_" + inPk[p]->getName();
73 if(dSourceType ==
"OGR")
75 for(std::size_t i = 0; i < vecProps.size(); ++i)
79 outDsType->add(vecProps[i]->clone());
88 outDsType->add(outGeom);
94 for(std::size_t i = 0; i < vecProps.size(); ++i)
98 outDsType->add(vecProps[i]->clone());
100 for (std::size_t j = 0; j < inPk.size(); ++j)
102 if (outDsType->getProperty(i)->getName() == inPk[j]->getName())
103 pk->
add(outDsType->getProperty(i));
112 outDsType->add(outGeom);
117 outDsType->setPrimaryKey(pk);
141 if (m_inDsetName.empty())
144 if (m_outDset.empty() || !m_outDsrc.get())
void add(te::dt::Property *p)
It adds a property to the list of properties of the primary key.
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
void setSRID(int srid)
It sets the spatial reference system identifier associated to this property.
void setGeometryType(GeomType t)
It sets the geometry subtype.
boost::shared_ptr< DataSource > DataSourcePtr
A class that models the description of a dataset.
virtual bool paramsAreValid()
std::auto_ptr< te::da::DataSetType > buildOutDataSetType()
int getSRID() const
It returns the spatial reference system identifier associated to this property.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
void setInput(te::da::DataSourcePtr inDsrc, std::string inDsetName, const te::da::ObjectIdSet *oidSet=0)
te::gm::GeomType getGeomResultType(te::gm::GeomType geom)
Polygon to line operation.
void setOutput(te::da::DataSourcePtr outDsrc, std::string dsname)
It describes a primary key (pk) constraint.
const std::string & getName() const
It returns the property name.