#include "../common/Exception.h"
#include "../common/progress/TaskProgress.h"
#include "../common/Translator.h"
#include "../dataaccess/dataset/DataSet.h"
#include "../dataaccess/dataset/DataSetAdapter.h"
#include "../dataaccess/dataset/DataSetType.h"
#include "../dataaccess/datasource/DataSourceCapabilities.h"
#include "../dataaccess/datasource/DataSourceInfo.h"
#include "../dataaccess/datasource/DataSourceManager.h"
#include "../dataaccess/dataset/DataSetTypeConverter.h"
#include "../dataaccess/query_h.h"
#include "../dataaccess/utils/Utils.h"
#include "../datatype/Property.h"
#include "../geometry/Geometry.h"
#include "../geometry/GeometryCollection.h"
#include "../geometry/GeometryProperty.h"
#include "../geometry/MultiLineString.h"
#include "../geometry/MultiPoint.h"
#include "../geometry/MultiPolygon.h"
#include "../maptools/AbstractLayer.h"
#include "../memory/DataSet.h"
#include "../memory/DataSetItem.h"
#include "../qt/widgets/layer/utils/DataSet2Layer.h"
#include "Config.h"
#include "Exception.h"
#include "Intersection.h"
#include "Utils.h"
#include <boost/lexical_cast.hpp>
#include <boost/uuid/random_generator.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <iostream>
#include <memory>
Go to the source code of this file.
Classes | |
struct | IntersectionMember |
Typedefs | |
typedef te::sam::rtree::Index < size_t, 8 > * | DataSetRTree |
Functions | |
te::da::DataSetType * | CreateDataSetType (std::string newName, te::da::DataSetType *firstDt, std::vector< te::dt::Property * > firstProps, te::da::DataSetType *secondDt, std::vector< te::dt::Property * > secondProps) |
DataSetRTree | CreateRTree (te::da::DataSetType *dt, te::da::DataSet *ds) |
std::vector< te::dt::Property * > | GetTabularProperties (te::da::DataSetType *dsType) |
bool | IntersectionMemory (const std::string &inFirstDataSetName, te::da::DataSource *inFirstDataSource, const std::string &inSecondDataSetName, te::da::DataSource *inSecondDataSource, const std::string &outDataSetName, te::da::DataSetType *&outDataSetType, te::da::DataSet *&outDataSet, const bool ©InputColumns, size_t outputSRID) |
bool | IntersectionQuery (const std::string &inFirstDataSetName, const std::string &inSecondDataSetName, te::da::DataSource *inFirstDataSource, const std::string &outDataSetName, te::da::DataSetType *&outDataSetType, te::da::DataSet *&outDataSet, const bool ©InputColumns, size_t outputSRID) |
std::pair< te::da::DataSetType *, te::da::DataSet * > | PairwiseIntersection (std::string newName, IntersectionMember firstMember, IntersectionMember secondMember, std::size_t outputSRID=0) |
te::da::DataSet * | UpdateGeometryType (te::da::DataSetType *dsType, te::da::DataSet *ds) |
typedef te::sam::rtree::Index<size_t, 8>* DataSetRTree |
Definition at line 72 of file Intersection.cpp.
te::da::DataSetType * CreateDataSetType | ( | std::string | newName, |
te::da::DataSetType * | firstDt, | ||
std::vector< te::dt::Property * > | firstProps, | ||
te::da::DataSetType * | secondDt, | ||
std::vector< te::dt::Property * > | secondProps | ||
) |
Definition at line 304 of file Intersection.cpp.
References te::da::PrimaryKey::add(), te::da::DataSetType::add(), te::dt::Property::clone(), te::vp::GeomOpResultType(), te::da::GetFirstGeomProperty(), te::dt::Property::getName(), te::vp::GetSimpleTableName(), te::da::DataSetType::getTitle(), te::dt::INT32_TYPE, te::dt::SimpleProperty::setAutoNumber(), te::gm::GeometryProperty::setGeometryType(), te::dt::Property::setName(), te::da::DataSetType::setPrimaryKey(), and te::gm::GeometryProperty::setSRID().
Referenced by IntersectionQuery(), and PairwiseIntersection().
DataSetRTree CreateRTree | ( | te::da::DataSetType * | dt, |
te::da::DataSet * | ds | ||
) |
Definition at line 348 of file Intersection.cpp.
References te::dt::CompositeProperty::findFirstPropertyOfType(), te::dt::GEOMETRY_TYPE, te::da::DataSet::getGeometry(), te::dt::CompositeProperty::getPropertyPosition(), te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::insert(), and te::da::DataSet::moveNext().
Referenced by PairwiseIntersection().
std::vector< te::dt::Property * > GetTabularProperties | ( | te::da::DataSetType * | dsType | ) |
Definition at line 524 of file Intersection.cpp.
References te::dt::GEOMETRY_TYPE, te::dt::CompositeProperty::getProperties(), te::dt::CompositeProperty::getProperty(), te::dt::Property::getType(), and te::dt::NUMERIC_TYPE.
Referenced by IntersectionMemory(), and IntersectionQuery().
bool IntersectionMemory | ( | const std::string & | inFirstDataSetName, |
te::da::DataSource * | inFirstDataSource, | ||
const std::string & | inSecondDataSetName, | ||
te::da::DataSource * | inSecondDataSource, | ||
const std::string & | outDataSetName, | ||
te::da::DataSetType *& | outDataSetType, | ||
te::da::DataSet *& | outDataSet, | ||
const bool & | copyInputColumns, | ||
size_t | outputSRID | ||
) |
Definition at line 256 of file Intersection.cpp.
References IntersectionMember::dt, te::da::DataSource::getDataSet(), te::da::DataSource::getDataSetType(), te::da::GetFirstGeomProperty(), te::gm::GeometryProperty::getSRID(), GetTabularProperties(), PairwiseIntersection(), and TR_VP.
Referenced by te::vp::Intersection().
bool IntersectionQuery | ( | const std::string & | inFirstDataSetName, |
const std::string & | inSecondDataSetName, | ||
te::da::DataSource * | inFirstDataSource, | ||
const std::string & | outDataSetName, | ||
te::da::DataSetType *& | outDataSetType, | ||
te::da::DataSet *& | outDataSet, | ||
const bool & | copyInputColumns, | ||
size_t | outputSRID | ||
) |
Definition at line 178 of file Intersection.cpp.
References CreateDataSetType(), te::da::DataSource::getDataSetType(), te::da::GetFirstGeomProperty(), te::vp::GetSimpleTableName(), te::gm::GeometryProperty::getSRID(), GetTabularProperties(), te::da::INNER_JOIN, te::da::DataSet::moveBeforeFirst(), te::da::DataSource::query(), te::da::Select::setFields(), te::da::Select::setFrom(), and UpdateGeometryType().
Referenced by te::vp::Intersection().
std::pair< te::da::DataSetType *, te::da::DataSet * > PairwiseIntersection | ( | std::string | newName, |
IntersectionMember | firstMember, | ||
IntersectionMember | secondMember, | ||
std::size_t | outputSRID = 0 |
||
) |
Definition at line 367 of file Intersection.cpp.
References te::mem::DataSet::add(), te::gm::GeometryCollection::add(), CreateDataSetType(), CreateRTree(), IntersectionMember::ds, IntersectionMember::dt, te::dt::CompositeProperty::findFirstPropertyOfType(), te::dt::GEOMETRY_TYPE, te::da::GetFirstGeomProperty(), te::da::GetFirstSpatialPropertyPos(), te::da::DataSet::getGeometry(), te::gm::GeometryProperty::getGeometryType(), te::dt::CompositeProperty::getPropertyPosition(), te::vp::GetSimpleTableName(), te::da::DataSetType::getTitle(), te::da::DataSet::getValue(), te::common::TaskProgress::isActive(), te::mem::DataSetItem::isNull(), te::gm::LineStringType, te::da::DataSet::move(), te::da::DataSet::moveBeforeFirst(), te::mem::DataSet::moveBeforeFirst(), te::da::DataSet::moveNext(), te::mem::DataSet::moveNext(), te::gm::MultiLineStringType, te::gm::MultiPointType, te::gm::MultiPolygonType, te::gm::PointType, te::gm::PolygonType, IntersectionMember::props, te::common::TaskProgress::pulse(), te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::search(), te::mem::DataSetItem::setGeometry(), te::mem::DataSetItem::setInt32(), te::common::TaskProgress::setTotalSteps(), te::mem::DataSetItem::setValue(), te::da::DataSet::size(), TR_VP, and te::common::TaskProgress::useTimer().
Referenced by IntersectionMemory().
te::da::DataSet * UpdateGeometryType | ( | te::da::DataSetType * | dsType, |
te::da::DataSet * | ds | ||
) |
Definition at line 542 of file Intersection.cpp.
References te::mem::DataSet::add(), te::dt::GEOMETRY_TYPE, te::da::DataSet::getGeometry(), te::dt::CompositeProperty::getProperties(), te::da::DataSet::getValue(), te::da::DataSet::isNull(), te::gm::LineStringType, te::da::DataSet::moveNext(), te::gm::MultiLineStringType, te::gm::MultiPointType, te::gm::MultiPolygonType, te::gm::PointType, te::gm::PolygonType, te::mem::DataSetItem::setGeometry(), te::mem::DataSetItem::setInt32(), and te::mem::DataSetItem::setValue().
Referenced by IntersectionQuery().