You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.1 KiB
C++
68 lines
2.1 KiB
C++
#ifndef GEOFEATUREOPERATOR_H
|
|
#define GEOFEATUREOPERATOR_H
|
|
|
|
#include <QStringList>
|
|
#include <QVector>
|
|
#include <QMap>
|
|
|
|
#include "Engine/UGDatasetVector.h"
|
|
#include "Geometry/UGGeometry.h"
|
|
#include "qmapcontrol.h"
|
|
#include "scenecontrol.h"
|
|
#include "sceneview.h"
|
|
#include "routeglobalvariant.h"
|
|
#include "Geometry3D/UGGeoPlacemark.h"
|
|
#include "Scene/UGTrackingLayer3D.h"
|
|
|
|
using namespace UGC;
|
|
|
|
class GeoFeatureOperator
|
|
{
|
|
public:
|
|
GeoFeatureOperator();
|
|
|
|
// 查询地理要素
|
|
UGRecordsetPtr queryFeature(UGDatasetVector *dv, UGString filter=_U(""));
|
|
UGRecordsetPtr queryFeature(UGDatasetVector *dv, UGRect2D bounds);
|
|
|
|
//高亮几何对象
|
|
void highLightGeometry(UGGeometry* pGeometry);
|
|
|
|
//导入航线属性信息
|
|
int importFeatureAttribute(UGDatasetVector *dv, UGGeometry* pGeometry, QMap<QString,QString> fieldsValue,bool isAddGeometry = true);
|
|
|
|
//获取几何对象所有节点坐标
|
|
// void getNodePoints(UGRecordsetPtr res,UGint geometryType,QVector<QPointF>&points);
|
|
void getNodePoints(UGGeometry* pGeometry, QVector<QVector3D>&points,double altitude=0);
|
|
|
|
//线要素绘制
|
|
void drawLine(QMapControl* qMapControl,UGDataSource* pDataSource,UGString datasetName);
|
|
|
|
//3D线要素绘制
|
|
void drawLine3D(SceneView* pSceneView,UGString datasourceName, UGString datasetName);
|
|
|
|
void drawLine3D(SceneView* pSceneView,UGString dataName);
|
|
|
|
//添加三维航点注记
|
|
void addNodeLabel3D(UGRecordsetPtr res,UGTrackingLayer3D* pTrackingLayer3D);
|
|
|
|
//移除三维航线注记
|
|
void removeNodeLabel3D(UGRecordsetPtr res,UGTrackingLayer3D* pTrackingLayer3D);
|
|
|
|
//添加三维几何对象到记录集
|
|
void addGeometry3DToDataset(UGDatasetVector* dv,UGGeometry* pGeometry);
|
|
|
|
//添加三维几何对象
|
|
int importGeometry3DAttribute(UGDatasetVector *dv, UGGeometry* pGeometry, QMap<QString,QString> fieldsValue);
|
|
|
|
//创建三维地标对象
|
|
UGGeoPlacemark* createGeoPlacemark(QVector3D point,QString strName);
|
|
|
|
//二维线转三维线
|
|
UGGeoLine3D transformToLine3D(UGGeoLine line,double* zValues);
|
|
private:
|
|
RouteGlobalVariant routeGVar;
|
|
};
|
|
|
|
#endif // GEOFEATUREOPERATOR_H
|