25 #include "../common/StringUtils.h" 27 #include "../datatype/Enums.h" 28 #include "../datatype/Property.h" 30 #include "../geometry/Enums.h" 31 #include "../geometry/GeometryProperty.h" 44 std::string inDsetName,
45 std::unique_ptr<te::da::DataSetTypeConverter> converter,
65 std::string dSourceType =
m_outDsrc->getType();
67 std::vector<te::dt::Property*> vecProps =
m_converter->getResult()->getProperties();
69 std::vector<te::dt::Property*> inPk =
m_converter->getResult()->getPrimaryKey()->getProperties();
72 for (std::size_t
p = 0;
p < inPk.size(); ++
p)
73 namePk +=
"_" + inPk[
p]->getName();
77 if(dSourceType ==
"OGR")
79 for(std::size_t i = 0; i < vecProps.size(); ++i)
83 outDsType->add(vecProps[i]->clone());
92 outDsType->add(outGeom);
98 for(std::size_t i = 0; i < vecProps.size(); ++i)
102 outDsType->add(vecProps[i]->clone());
104 for (std::size_t j = 0; j < inPk.size(); ++j)
106 if (outDsType->getProperty(i)->getName() == inPk[j]->getName())
107 pk->
add(outDsType->getProperty(i));
116 outDsType->add(outGeom);
121 outDsType->setPrimaryKey(pk);
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()
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, std::unique_ptr< te::da::DataSetTypeConverter > converter, const te::da::ObjectIdSet *oidSet=0)
std::unique_ptr< te::da::DataSetTypeConverter > m_converter
te::da::DataSourcePtr m_inDsrc
te::gm::GeomType getGeomResultType(te::gm::GeomType geom)
te::da::DataSourcePtr m_outDsrc
Polygon to line operation.
void setOutput(te::da::DataSourcePtr outDsrc, std::string dsname)
It describes a primary key (pk) constraint.
const te::da::ObjectIdSet * m_oidSet
std::unique_ptr< te::da::DataSetType > buildOutDataSetType()
const std::string & getName() const
It returns the property name.