|
|
#if !defined(AFX_GISDLG_H__C9D2192D_FC93_4663_863B_24AB8906C0A2__INCLUDED_)
|
|
|
#define AFX_GISDLG_H__C9D2192D_FC93_4663_863B_24AB8906C0A2__INCLUDED_
|
|
|
|
|
|
#if _MSC_VER > 1000
|
|
|
#pragma once
|
|
|
#endif // _MSC_VER > 1000
|
|
|
// GISDlg.h : header file
|
|
|
//
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
// CGISDlg dialog
|
|
|
|
|
|
#include "resource.h"
|
|
|
#include "MapLayerManage.h"
|
|
|
#include "ShowHZDistanceDlg.h"
|
|
|
#include "LonLatDlg.h"
|
|
|
#include "Globe.h"
|
|
|
|
|
|
#include "LineManage.h"
|
|
|
#include "LineSectDisAZDlg.h"
|
|
|
#include "FlyLineDesign.h"
|
|
|
#include "toolbarex.h"
|
|
|
|
|
|
#include "GuidePointDataStruct.h"
|
|
|
#include "DrawLineStruct.h"
|
|
|
|
|
|
#include "LineDesign.h"
|
|
|
#include "UAVSelectDlg.h"
|
|
|
#include "TargetDlg.h"
|
|
|
|
|
|
#include "GISManager.h"
|
|
|
#include "DlgLightRegion.h"
|
|
|
#include "DlgDemAlt.h"
|
|
|
#include "TopologicalAnalysis.h"
|
|
|
#include "DlgMarker.h"
|
|
|
#include <map>
|
|
|
#include "MapElevation.h"
|
|
|
#include "../Include/8BMapDLL_type.h"
|
|
|
using namespace B8MapDLL;
|
|
|
|
|
|
#define MESSAGE_B8MAP WM_USER+750
|
|
|
#define MESSAGE_DRAWZK WM_USER+751
|
|
|
|
|
|
//最大的目标点个数
|
|
|
const UINT MAX_TARGET_NUM = 20000;
|
|
|
const UINT MAX_PLANE_NUM_ADS = 100;
|
|
|
|
|
|
typedef CMap<LPCTSTR,LPCTSTR,LPCTSTR,LPCTSTR> labelMap;
|
|
|
|
|
|
//多媒体定时器
|
|
|
#include <mmsystem.h>
|
|
|
#include "map.h"
|
|
|
#pragma comment(lib,"Winmm.lib")
|
|
|
|
|
|
class CGISDlg : public CBCGPDialog
|
|
|
{
|
|
|
// Construction
|
|
|
public:
|
|
|
|
|
|
CGISDlg(CWnd* pParent = NULL); // standard constructor
|
|
|
|
|
|
~CGISDlg();
|
|
|
/*******************新增<编辑航线>功能**************************/
|
|
|
map<int,DrawLineDataStruct> m_ShowedLineDataList; //存储已显示的航线数据
|
|
|
DrawLineDataStruct m_editLineDataGroup; //编辑航线数据
|
|
|
MapElevation m_mapElevation; //地形
|
|
|
int m_highLightLineLayerID; //选中高亮图层
|
|
|
int m_tempTerrainPointsLayerID; //地形点图层
|
|
|
long m_tempshpPointLayerID; //临时点图层
|
|
|
long m_tempshpLineLayerID; //临时线图层
|
|
|
bool m_bSelectFeatureFlag; //选择元素模式
|
|
|
int m_lineSelectedID; //选中的航线号
|
|
|
int circlingPointID; //存储盘旋点ID
|
|
|
|
|
|
long GLOBAL_X; //存储鼠标点击的像素坐标
|
|
|
long GLOBAL_Y;
|
|
|
//获取有风险的地形点
|
|
|
void GetDangerousTerrainPoints(double pts[][2],int pointNum,long alt,vector<double>& vec_alt,vector<double>& vec_lon,vector<double>& vec_lat);
|
|
|
//标绘危险地形点
|
|
|
int DrawDangerousTerrainPoints(double pts[][2],int pointNum,long alt);
|
|
|
//清除危险地形点
|
|
|
void ClearDangerousTerrainPoints();
|
|
|
// 绘制临时线
|
|
|
void DrawTempLine(double m_Pts[][2],int pointNum);
|
|
|
|
|
|
//绘制选中高亮图层
|
|
|
void DrawHighLightLine(const PtStruct *pts, const int ptNum);
|
|
|
|
|
|
//清除临时线
|
|
|
void ClearTempLine();
|
|
|
//清除高亮线
|
|
|
void ClearHighLightLine();
|
|
|
//转化为Grid坐标
|
|
|
void TransformToXY(double pts[][2],int pointNum,vector<int>& ptsRow,vector<int>& ptsCol);
|
|
|
//提取坐标点集
|
|
|
void TransformToVectorPoints(DrawLineDataStruct lineDataGroup,vector<double>& lineX,vector<double>& lineY);
|
|
|
|
|
|
TopologicalAnalysis topologicalAnalysis;
|
|
|
//线上添加点
|
|
|
void AddPointInLine(int ptPos,double* pt,DrawLineDataStruct& editLineDataGroup);
|
|
|
//线中删除点
|
|
|
bool RemovePointInLine(int ptPos,DrawLineDataStruct& backLineDataGroup);
|
|
|
// 是否选中线要素,若选中返回航线编号,否则返回-1
|
|
|
int IsSelectLine(double* pt);
|
|
|
|
|
|
long m_distLabelLayer; //编辑时显示方位角和距离
|
|
|
BOOL m_bEditLine; //编辑回收航线
|
|
|
DrawLineDataStruct backLineDataGroup; //回收航线数据集合
|
|
|
BOOL m_dragFlag; //拖拽移动标志
|
|
|
|
|
|
long m_KTPtShpLayerID; //空投点图层ID
|
|
|
|
|
|
//空投航线设计对话框
|
|
|
//CDesignKTLineDlg *m_pDesignKTLineDlg;
|
|
|
/***************多点测距 By Wu 2023.10.16********/
|
|
|
bool m_bPolylineMeasure; //多点测距标志
|
|
|
int m_numPolylineMeasurePts; //参与距离测量的点数
|
|
|
double m_posPolylineMeasurePts[512][2]; //测量坐标点集
|
|
|
bool m_bMeasureDrag; //是否可以拉扯
|
|
|
bool m_bEndMeasure; //测量结束
|
|
|
//参与距离测量的连线段图层
|
|
|
long m_polylineMeasureLineLayerID;
|
|
|
|
|
|
//标注距离测量结果标注的图层
|
|
|
long m_polylineMeasureLabelLayerID;
|
|
|
|
|
|
//参与距离测量的点序号的标注图层
|
|
|
long m_polylineMeasurePtLayerID[2];
|
|
|
|
|
|
void ClearPloylineMeasure(); //清除多点测量
|
|
|
/*******************************************/
|
|
|
/*************************************************************************************/
|
|
|
//显示航线号 航点号 侧偏距等信息 2015.11.20
|
|
|
tagDRAWZK m_DRAWZK;
|
|
|
|
|
|
//航线是否已经标绘的标志
|
|
|
bool m_pHaveDrawLineFlag[14];
|
|
|
|
|
|
// 功能:设置导引方式消息发送句柄及消息号
|
|
|
void SetMsgInfo(const HWND hwnd, const UINT msgID);
|
|
|
|
|
|
BOOL ReadLine(int iLine,PTLIST *pList);
|
|
|
|
|
|
|
|
|
// 功能:设置装订航线消息发送句柄及消息号
|
|
|
void SetLoadLineMsgInfo(const HWND hwnd, const UINT msgID);
|
|
|
//功能:增加无人机的飞行航点,绘制出无人机的飞行航迹
|
|
|
//输入:无人机的当前的经度lon,纬度lat,航向角yaw, 都以(°为单位)
|
|
|
void AddFlyPoint(int uavid,const double lon, const double lat, const double yaw,bool control);
|
|
|
void AddFlyPoint_ADS(const int uavNum, const int uavid, const double lon, const double lat, const double yaw, const bool control, const CString strPlaneName);
|
|
|
|
|
|
//功能:设置GIS的显示区域
|
|
|
void SetGISWindowArea(const CRect gisArea);
|
|
|
|
|
|
//功能:显示GIS对话框
|
|
|
void ShowDlg(const CRect rc, CWnd* pParent);
|
|
|
|
|
|
//功能:增加目标点,在地图显示区标绘出来
|
|
|
//输入:目标点号ptID,经度lon,纬度lat
|
|
|
void AddTargetPoint(const int ptID, const double lon, const double lat);
|
|
|
|
|
|
//功能:删除给定ID号的目标点
|
|
|
void DeleteTarget(const int ptID);
|
|
|
|
|
|
//功能:删除所有目标点
|
|
|
void DeleteAllTargets();
|
|
|
|
|
|
//功能:在地图显示区标绘出装订的飞行航线数据
|
|
|
//输入:航线数据体集合linePtArray,航线的航点个数ptNum
|
|
|
//说明:地图显示器已经标绘了该航线,则清除标绘,重新标绘航线
|
|
|
void DrawBindingLine(const PtStruct *linePtArray, const int ptNum);
|
|
|
|
|
|
//功能:设置地面站位置
|
|
|
//输入:经度lon,纬度lat,高度alt
|
|
|
void SetGCSPosition(const double lon, const double lat, const double alt);
|
|
|
|
|
|
|
|
|
//功能:标绘导引点位置
|
|
|
//输入:导引点类型guideMode(1为导引飞行1,2为导引飞行2),经度lon,纬度lat
|
|
|
void DrawGuidePoint(const BYTE guideMode, const double lon, const double lat);
|
|
|
|
|
|
|
|
|
//功能:显示航线
|
|
|
//输入:航线文件名称strLineFileName
|
|
|
void OnShowGivenLine(const CString strLineFileName);
|
|
|
|
|
|
|
|
|
//功能:标绘回收点位置
|
|
|
//输入:导引点类型callbackMode(1为回收点1;2为回收点2),经度lon,纬度lat
|
|
|
void DrawCallBackPoint(const BYTE callbackMode, const double lon, const double lat);
|
|
|
|
|
|
|
|
|
//功能:基于shpfile面图层标绘方法绘制UAV
|
|
|
void AddUAVPoints2Polygon(const long shpLayerID);
|
|
|
|
|
|
|
|
|
//功能:取消地图区标绘的导引点
|
|
|
void OnRemoveGuidePtDraw();
|
|
|
|
|
|
////
|
|
|
void MouseWheel(short zDelta);
|
|
|
|
|
|
void SetRouteLine(int iLine ,PTLIST *pList);
|
|
|
|
|
|
//功能:更新界面显示参数
|
|
|
//输入:键值对
|
|
|
void UpdateDataInfo(int index,const char* key,double value);
|
|
|
|
|
|
//功能:处理快捷菜单与航线显示相关的操作
|
|
|
// 1)航线已经标注,清除显示
|
|
|
// 2)航线未标注,进行显示
|
|
|
//输入:航线编号lineID
|
|
|
void SetFlyLineShowStatus(const int lineID);
|
|
|
|
|
|
|
|
|
// Dialog Data
|
|
|
//{{AFX_DATA(CGISDlg)
|
|
|
enum { IDD = IDD_DIALOG1 };
|
|
|
// NOTE: the ClassWizard will add data members here
|
|
|
//}}AFX_DATA
|
|
|
|
|
|
|
|
|
// Overrides
|
|
|
// ClassWizard generated virtual function overrides
|
|
|
//{{AFX_VIRTUAL(CGISDlg)
|
|
|
|
|
|
/*
|
|
|
brief:添加天地图在线地图服务
|
|
|
*/
|
|
|
void AddTianDiTuService();
|
|
|
|
|
|
/*
|
|
|
brief:激活天地图在线地图服务
|
|
|
*/
|
|
|
void LoadTianDiTuService();
|
|
|
|
|
|
/*
|
|
|
brief:缩放到目标位置
|
|
|
param: lon经度(度)
|
|
|
param: lat纬度(度)
|
|
|
*/
|
|
|
void ZoomToLocation(double lon,double lat);
|
|
|
|
|
|
private: // by Wu
|
|
|
//
|
|
|
void ShowModifyPointDlg(int selectedPointID=0); //编辑航线时,显示航点设置对话框
|
|
|
void ShowEditSaveDlg(); //显示保存编辑对话框
|
|
|
|
|
|
protected:
|
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
|
//}}AFX_VIRTUAL
|
|
|
|
|
|
// Implementation
|
|
|
protected:
|
|
|
|
|
|
// Generated message map functions
|
|
|
//{{AFX_MSG(CGISDlg)
|
|
|
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
|
|
// afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
|
|
|
afx_msg void OnAddpoint();
|
|
|
afx_msg void OnEnddesign();
|
|
|
|
|
|
//}}AFX_MSG
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
|
|
private:
|
|
|
|
|
|
//地图操作对象
|
|
|
CMap1 m_map;
|
|
|
|
|
|
//规划航线标绘的ID号
|
|
|
int m_drawPlanFlyLine;
|
|
|
|
|
|
//接收到的航点个数
|
|
|
long int m_uavFlyPoints;
|
|
|
|
|
|
//图层管理类
|
|
|
CMapLayerManage* m_Layer;
|
|
|
|
|
|
//经纬度显示类
|
|
|
CLonLatDlg *m_pLonLatDlg;
|
|
|
|
|
|
|
|
|
//经纬度对话框显示标识
|
|
|
bool m_bHaveShowLonLatDlg;
|
|
|
|
|
|
//新航线设计对话框显示标识
|
|
|
bool m_bHaveShowLineDesign;
|
|
|
|
|
|
//2点之间的水平距离显示对话框对象
|
|
|
CShowHZDistanceDlg *m_pHZDistanceDlg;
|
|
|
|
|
|
//2点之间的水平距离界面显示的标识
|
|
|
bool m_bHaveShowDistanceDlg;
|
|
|
|
|
|
//是否已经加载了地图
|
|
|
bool m_bHaveAddMap;
|
|
|
|
|
|
//航迹标绘图层ID
|
|
|
long m_flyTrackLayerID[3];
|
|
|
|
|
|
//UAV航迹标绘图层ID
|
|
|
long m_UAVFlyTrackLayerID[3];
|
|
|
long m_UAVFlyTrackLayerID_ADS[MAX_PLANE_NUM_ADS];
|
|
|
|
|
|
//是否已经标绘了无人机的飞行轨迹
|
|
|
bool m_bFirstDrawUAVTrack[3];
|
|
|
bool m_bFirstDrawUAVTrack_ADS[MAX_PLANE_NUM_ADS];
|
|
|
|
|
|
//地图显示区宽度、高度倒数
|
|
|
double m_onePerWidth;
|
|
|
double m_onePerHeight;
|
|
|
|
|
|
//地图显示区宽度、高度
|
|
|
double m_mapAreaHalfWidth;
|
|
|
double m_mapAreaHalfHeight;
|
|
|
|
|
|
//航线设计状态
|
|
|
bool m_bLineDesign;
|
|
|
|
|
|
//GIS显示区域
|
|
|
CRect m_rcGISArea;
|
|
|
|
|
|
//对话框显示区域
|
|
|
CRect m_rcDialogArea;
|
|
|
|
|
|
//飞行器
|
|
|
double m_ppUavPtArray[18][2];
|
|
|
double m_ppUavPtArray_ADS[18][2];
|
|
|
|
|
|
CPoint m_ptPlane[18];
|
|
|
CPoint m_ptPlane_ADS[18];
|
|
|
|
|
|
//飞行器标绘的航点个数
|
|
|
int m_ptNum;
|
|
|
|
|
|
//地图显示区域左上角X坐标
|
|
|
int m_leftTopX;
|
|
|
|
|
|
//地图显示区域左上角Y坐标
|
|
|
int m_leftTopY;
|
|
|
|
|
|
//目标标绘SHP图层ID号
|
|
|
int m_targetPtShapeID;
|
|
|
|
|
|
//是否已经创建过SHP目标标注图层
|
|
|
bool m_bHaveCreateTargetShp;
|
|
|
|
|
|
//标注偏差量
|
|
|
int m_labelWarpValue;
|
|
|
|
|
|
//已添加的标绘的目标点个数
|
|
|
int m_targetPointNum;
|
|
|
|
|
|
//总共的目标点个数
|
|
|
int m_totalPointNum;
|
|
|
|
|
|
//目标点标绘图层的ID号
|
|
|
long m_targetDrawLayerID;
|
|
|
|
|
|
//与航线设计相关的变量
|
|
|
int m_lineMaxPointNum; //一条航线总的航点个数
|
|
|
PtStruct *m_pDesignLineStruct; //航点数据
|
|
|
int m_designLinePointNum; //航点个数
|
|
|
|
|
|
int m_iPtSel;//航线编辑时选点
|
|
|
BOOL m_bPtDel;//是否删点
|
|
|
BOOL m_bSetPointModel; //是否处在置点状态
|
|
|
BOOL m_bEndSetPoint; //结束设计航线
|
|
|
BOOL m_bPtEdit;//编辑航点
|
|
|
|
|
|
BOOL m_bLDSetPoint; //航线编辑时处于置点状态 2016.01.05
|
|
|
|
|
|
//当前设计的航点数据
|
|
|
PtStruct m_curDesignPoint;
|
|
|
|
|
|
//航线标绘图层的ID号
|
|
|
long m_designLineLayerID;
|
|
|
long m_designLineLayerID2;
|
|
|
|
|
|
long m_canvasLayerID;
|
|
|
|
|
|
//是否已经增加新的航点
|
|
|
bool m_bAddNewPoint;
|
|
|
|
|
|
//临时标绘图层
|
|
|
int m_tempLayerID;
|
|
|
|
|
|
//标识是否在临时图层上进行标注
|
|
|
bool m_beTemLayerDrawing;
|
|
|
|
|
|
//////////////////与航线显示相关的数据体/////////////////////
|
|
|
DrawLineDataStruct m_pFlyLines[14]; //飞行航线数据体 5改14
|
|
|
int m_totalFlyLines; //总的飞行航线数
|
|
|
int m_flyLineNum; //飞行航线数
|
|
|
|
|
|
//航线管理类
|
|
|
CLineManage m_lineManage;
|
|
|
|
|
|
//飞行航线标注层
|
|
|
long m_flyLinesLayerID;
|
|
|
|
|
|
//是否已经创建了无人机标绘的Shp面图层
|
|
|
bool m_bHaveCreateUAVShpLayer;
|
|
|
|
|
|
//无人机标绘的Shp面图层ID
|
|
|
long m_uavShapileLayerID;
|
|
|
|
|
|
//航线标绘图层的Shp图层ID数组,每条航线具有2个标绘图层:1个图层为航点、另一个图层为航线
|
|
|
long m_ppPlanLineShpLayerIDArr[14][2];
|
|
|
|
|
|
|
|
|
|
|
|
//显示航线设计时的航段坐标信息
|
|
|
CLineSectDisAZDlg *m_pLineSectDlg;
|
|
|
|
|
|
//飞机选择
|
|
|
/*UAVSelectDlg *m_pUavSelDlg1;
|
|
|
UAVSelectDlg *m_pUavSelDlg2;
|
|
|
UAVSelectDlg *m_pUavSelDlg3;*/
|
|
|
|
|
|
//第一个航点是否已经标绘
|
|
|
bool m_bDesignFirstPoint;
|
|
|
|
|
|
//航线设计对话框
|
|
|
CFlyLineDesign *m_pFlyLineDesign;
|
|
|
|
|
|
//航线设计对话框
|
|
|
CLineDesign *m_pLineDesign;
|
|
|
|
|
|
//地图显示区域设计的几何大小
|
|
|
CRect m_rcDesignGISWindow;
|
|
|
|
|
|
///////////////////////创建浮动工具栏//////////////////////////
|
|
|
|
|
|
CImageList m_ImageList;
|
|
|
CToolBarCtrl m_ToolBar;
|
|
|
CRect m_rcgisSmallArea; //GIS最小区域
|
|
|
|
|
|
bool m_bShowToolBar; //是否显示工具栏
|
|
|
///////////////////////创建浮动工具栏//////////////////////////
|
|
|
|
|
|
//导引点数据结构体
|
|
|
GuidePointData m_guidePtInfo;
|
|
|
|
|
|
//地面站位置点矢量图层
|
|
|
long m_gcsPtShpLayerID;
|
|
|
|
|
|
//导引点位置点矢量图层
|
|
|
long m_guidePtShpLayerID;
|
|
|
|
|
|
// 发送窗口消息
|
|
|
HWND m_MsgHwnd;
|
|
|
UINT m_MsgID; //导引方式消息ID
|
|
|
UINT m_LineLoadMsgID; //装订航线
|
|
|
//回调操作
|
|
|
struMapOut m_struMapOut;
|
|
|
|
|
|
//当前待编辑的航点数据
|
|
|
PtStruct m_curEditLinePoint;
|
|
|
|
|
|
//航点是否可以移动
|
|
|
//bool m_bEnablePointMove;
|
|
|
|
|
|
//目标点矢量图层ID号
|
|
|
//long m_pTargetShapfileID;
|
|
|
|
|
|
//工具栏的高度
|
|
|
int m_toolbarHeight;
|
|
|
|
|
|
//在整个全屏幕中的GIS显示区域
|
|
|
CRect m_gisAreaInScreen;
|
|
|
|
|
|
//是否进行自动漫游的标识
|
|
|
bool m_bAutoMove;
|
|
|
|
|
|
//回收点矢量图层ID号
|
|
|
long m_pCallBackShapfileID[255];
|
|
|
|
|
|
//导引点模式
|
|
|
int m_guidePointMode;
|
|
|
|
|
|
bool m_bGuideMode;//导引飞行模式
|
|
|
|
|
|
int m_drawTrackPtNum[3];
|
|
|
|
|
|
//新航线设计的航点的最大个数 2016.01.06
|
|
|
int m_MaxNumofLinePt;
|
|
|
int m_NowNumLineDesign; //当前航点的个数
|
|
|
|
|
|
// tmpPT *m_pNewDesignLineStruct; //新航点数据
|
|
|
// tmpPT m_CurNewDesignPt; //当前设计的航点数据
|
|
|
|
|
|
PtStruct *m_pNewDesignLineStruct; //新航点数据
|
|
|
PtStruct m_CurNewDesignPt; //当前设计的航点数据
|
|
|
|
|
|
struInfoData m_infoData;
|
|
|
|
|
|
TargetPt m_targets[255];
|
|
|
int m_targetSelID;
|
|
|
|
|
|
bool m_bSelectDropPoint; //地标点对话框是否在选点
|
|
|
|
|
|
CDlgDemAlt m_DlgDemAlt; //两点高程分析对话框
|
|
|
|
|
|
private:
|
|
|
CTargetDlg *m_pTargetDlg;
|
|
|
private:
|
|
|
|
|
|
virtual BOOL OnInitDialog();
|
|
|
|
|
|
afx_msg void OnAddMapData(); //加载地图数据
|
|
|
afx_msg void OnAddRasterImage(); //加载栅格影像数据
|
|
|
afx_msg void OnAddFlyLineData(); //加载弹道数据
|
|
|
|
|
|
afx_msg void OnMapSelect(); //地图选择
|
|
|
afx_msg void OnMapZoomIn(); //地图放大
|
|
|
afx_msg void OnMapZoomOut(); //地图缩小
|
|
|
afx_msg void OnMapMove(); //地图漫游
|
|
|
afx_msg void OnMapFullScreen(); //地图全景显示
|
|
|
afx_msg void OnSurvey(); //测量距离
|
|
|
afx_msg void OnEraseTrack(); //清除航迹
|
|
|
void EraseTrack(int uavid); //清除航迹
|
|
|
|
|
|
afx_msg void OnRemoveAllLayers(); //清除所有图层
|
|
|
afx_msg void OnLayerManage(); //图层管理
|
|
|
afx_msg void OnShowLonLatInfo(); //显示经纬度信息
|
|
|
|
|
|
afx_msg void OnRefreshInfo(); //刷新显示
|
|
|
afx_msg void OnPrint(); //打印输出
|
|
|
afx_msg void OnShowCtrlMenu(); //显示航线菜单
|
|
|
afx_msg void OnMenuLinePtCtrlShow(); //显示属性菜单
|
|
|
afx_msg void OnZhangCW();
|
|
|
afx_msg BOOL OnToolTipsNotify(UINT id,NMHDR* pNMHDR,LRESULT* pResult); //按钮文字提示
|
|
|
afx_msg void OnDesignLine(); //Design line
|
|
|
private:
|
|
|
void Openlocalfile(CString file);
|
|
|
CString GetFileType(CString file);
|
|
|
CString GetFileName(CString file);
|
|
|
|
|
|
void OnShowRMenu(); //显示右键菜单
|
|
|
|
|
|
//功能:自动漫游
|
|
|
void AutomaticMoveMap(double lon, double lat);
|
|
|
|
|
|
//功能:设置图层的显示或隐藏
|
|
|
LRESULT OnSetLayerStatus(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:关闭显示经度、纬度的软件界面
|
|
|
LRESULT OnCloseLonLatDialog(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:关闭显示2点之间的经纬度坐标的软件界面
|
|
|
LRESULT OnCloseShowDistanceDialog(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:计算用于标绘无人机的18个点坐标
|
|
|
void CalculateUAVPolygonCoordinate(const double lon, const double lat, const double yaw);
|
|
|
void CalculateUAVPolygonCoordinate_ADS(const double dX, const double dY, const double yaw);
|
|
|
//功能:在矢量图层中动态标绘出无人机
|
|
|
//输入:经度lon,纬度lat,航向角yaw
|
|
|
//说明:创建专门用于绘制无人机的矢量面图层,每次先删除上次标绘的Shp,再重新标绘
|
|
|
void DrawUAV( int uavid,const double lon, const double lat, const double yaw,bool control);
|
|
|
void DrawUAV_ADS(const int uavNum, const int uavid, const double lon, const double lat, const double yaw, const bool control, const CString strPlaneName);
|
|
|
//功能:接收到航线设计对话框退出消息,进行处理
|
|
|
LRESULT OnCloseLineDesignDialog(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:根据目标点坐标位置计算目标点号标注位置
|
|
|
//输入:目标点位置经度—targetLon,纬度—targetLat
|
|
|
//输出:目标点标注位置经度—labelLon,纬度—labelLat
|
|
|
void TargetPos2LabelPos(double &labelLon, double &labelLat, const double targetLon, const double targetLat);
|
|
|
|
|
|
//功能:在地图显示区标绘目标点
|
|
|
//输入:目标点数据体targetInfo
|
|
|
// 标绘图层ID号drawLayerID
|
|
|
//输出:标绘图层ID号drawLayerID
|
|
|
void DrawTarget(long &drawLayerID, const PtStruct targetInfo);
|
|
|
|
|
|
//清除标绘的所有目标点数据
|
|
|
void OnEraseAllTargets();
|
|
|
/*************************************by wu 2023.10.10****************************************************/
|
|
|
|
|
|
//功能:标注空投点
|
|
|
LRESULT OnDrawKTPoint(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:清除空投点
|
|
|
LRESULT OnClearKTPoint(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:显示空投航线
|
|
|
LRESULT OnShowKTLine(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:显示/关闭空投航线
|
|
|
LRESULT OnShowKTLine6(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:装订空投航线
|
|
|
LRESULT OnBindKTLine(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:装订应急点
|
|
|
LRESULT OnBindEPPoint(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
/*********************************************************************************************************/
|
|
|
|
|
|
//功能:增加航点,加入后,地图显示区进行航点标注
|
|
|
LRESULT OnAddLinePoint(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:编辑航点,加入后,地图显示区进行航点标注
|
|
|
LRESULT OnEditLinePoint(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:删除航点,加入后,地图显示区进行航点标注
|
|
|
LRESULT OnDeleteLinePoint(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:保存航线,加入后,地图显示区进行航点标注
|
|
|
LRESULT OnSaveLinePoints(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//2016.02.19
|
|
|
// //功能:用于显示航线号、航点号、侧偏距等信息
|
|
|
// LRESULT DRAW_ZK(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:标绘设置的航线数据,包括航点及其标注、航线
|
|
|
void DrawDesignLineData();
|
|
|
|
|
|
//功能:删除航线设计的数据,包括航线数据和航线标绘数据
|
|
|
void RemoveDesignLineData();
|
|
|
|
|
|
//功能:清除航线设计时标绘的数据
|
|
|
void ClearDrawingInLineDesign();
|
|
|
|
|
|
//功能:向shpfile图层中增加航点数据
|
|
|
//输入:矢量图层ID号shpLayerID,矢量图层类型shpType(0为点图层;1为线图层;2为面图层)
|
|
|
// 航点数据集合pts,航点个数ptNum
|
|
|
void AddPoints2Shapfile(const long shpLayerID, const int shpType, const PtStruct *pts, const int ptNum);
|
|
|
|
|
|
|
|
|
//功能:创建空的shpfile图层
|
|
|
//输入:矢量图层类型shpType(0为—点图层;1为线图层;2为面图层)
|
|
|
//输入:绘制颜色drawColor
|
|
|
//输出:矢量图层ID号shpLayerID,
|
|
|
void CreateEmptyShapfile(long &shpLayerID, const int shpType, const unsigned long drawColor);
|
|
|
|
|
|
|
|
|
//功能:向shpfile图层中增加1个航点数据
|
|
|
//输入:矢量图层ID号shpLayerID,shp类型shpType
|
|
|
// 航点数据,经度—lon; 纬度—lat
|
|
|
void AddOnePoint2Shapfile(const long shpLayerID, const int shpType, const double lon, const double lat);
|
|
|
|
|
|
|
|
|
//功能:根据地图控件的显示分辨率移动地图控件
|
|
|
//说明:根据显示分辨率和设计分辨率之间的几何关系
|
|
|
//输入:制定显示的区域moveToArea
|
|
|
void MoveGISShowWindow(const CRect moveToArea);
|
|
|
|
|
|
//功能:创建浮动工具栏
|
|
|
void CreateFloatToolBar();
|
|
|
|
|
|
|
|
|
BOOL OnToolTipText(UINT,NMHDR* pNMHDR,LRESULT* pResult);
|
|
|
|
|
|
|
|
|
//功能:向shpfile点图层中增加航点数据
|
|
|
//输入:矢量图层ID号shpLayerID
|
|
|
// 航点数据集合pts,航点个数ptNum
|
|
|
void AddPoints2PointShapfile(const long shpLayerID, const PtStruct *pts, const int ptNum);
|
|
|
|
|
|
|
|
|
//功能:向shpfile线图层中增加航点数据
|
|
|
//输入:矢量图层ID号shpLayerID
|
|
|
// 航点数据集合pts,航点个数ptNum
|
|
|
void AddPoints2LineShapfile(const long shpLayerID, const PtStruct *pts, const int ptNum);
|
|
|
|
|
|
//功能:导引方式一,向主程序发送导引点坐标
|
|
|
void OnGuideMode1();
|
|
|
|
|
|
//功能:导引方式二,向主程序发送导引点坐标
|
|
|
void OnGuideMode2();
|
|
|
|
|
|
//功能:显示1号航线
|
|
|
void OnShowLine1();
|
|
|
|
|
|
//功能:显示2号航线
|
|
|
void OnShowLine2();
|
|
|
|
|
|
//功能:显示3号航线
|
|
|
void OnShowLine3();
|
|
|
|
|
|
//功能:显示4号航线
|
|
|
void OnShowLine4();
|
|
|
|
|
|
//功能:显示5号航线
|
|
|
void OnShowLine5();
|
|
|
|
|
|
//功能:标绘飞行航线
|
|
|
//输入:航线数据lineData
|
|
|
void DrawFlyLine(const DrawLineDataStruct lineData);
|
|
|
|
|
|
afx_msg void OnUpdateLineDisplay1(CCmdUI* pCmdUI);
|
|
|
afx_msg void OnUpdateLineDisplay2(CCmdUI* pCmdUI);
|
|
|
afx_msg void OnUpdateLineDisplay3(CCmdUI* pCmdUI);
|
|
|
afx_msg void OnUpdateLineDisplay4(CCmdUI* pCmdUI);
|
|
|
afx_msg void OnUpdateLineDisplay5(CCmdUI* pCmdUI);
|
|
|
afx_msg void OnData(); //test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//功能:清除已经标绘的航线
|
|
|
//输入:航线编号lineID,从0开始计数
|
|
|
void ClearDrawedLine(const int lineID);
|
|
|
|
|
|
|
|
|
//功能:清除点图层标注信息
|
|
|
//输入:点图层ID号layerID
|
|
|
void ClearPointShape(long layerID);
|
|
|
|
|
|
|
|
|
//功能:基于点矢量图层标绘目标点
|
|
|
//输入:点图层名称drawLayerID
|
|
|
// 点坐标,经度lon, 纬度lat
|
|
|
// 点名称strPtName
|
|
|
// 标绘颜色strColor
|
|
|
// 标绘字体颜色数值fontColor
|
|
|
void AddPointShapeLayer(long &drawLayerID, const double lon, const double lat,
|
|
|
const CString strPtName, const CString strColor, unsigned long fontColor);
|
|
|
|
|
|
|
|
|
//功能:航线设计时,检查航线的显示状态
|
|
|
LRESULT OnCheckFlyLineShowStatus(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:判断鼠标是否选中航点
|
|
|
//输入:航点数据curpoint,鼠标点击像素坐标x和y
|
|
|
//返回值:true——鼠标选中航点
|
|
|
// false——鼠标未选中航点
|
|
|
bool BeMouseClickedLinePoint(const PtStruct curpoint, const long x, const long y);
|
|
|
|
|
|
|
|
|
//功能:是否进行自动漫游
|
|
|
void OnAutoMove();
|
|
|
|
|
|
void OnUpdateAutoMov( CCmdUI *pCmdUI );
|
|
|
|
|
|
|
|
|
void OnUpdateGuideMode1( CCmdUI *pCmdUI);
|
|
|
void OnUpdateGuideMode2( CCmdUI *pCmdUI);
|
|
|
int GetPtSel(int x,int y);//获取鼠标选取的点号
|
|
|
int GetPtSel(PtStruct* m_pLinePtStruct,int m_PointNum,int x,int y); //重载 by Wu 2023.09.14
|
|
|
void DrawLineDesign();
|
|
|
void DrawCanvas();
|
|
|
/*!
|
|
|
brief:设置标注的属性,在创建图层时,若需在该图层标注时使用
|
|
|
param: shapeID图层ID号, fontSize标注字体大小,colorName颜色名字,fontColor标注字体颜色
|
|
|
param: XOffset/YOffset标注位置偏移量
|
|
|
return: void
|
|
|
*/
|
|
|
void SetLabelCategory(const long& shapeID, int fontSize = 12, unsigned long fontColor = RGB(255,0,0),
|
|
|
unsigned long frameBackColor = RGB(0,0,0), double XOffset = 0, double YOffset = 0);
|
|
|
|
|
|
|
|
|
void ReadTargetIni(bool bDraw);
|
|
|
private:
|
|
|
|
|
|
DECLARE_EVENTSINK_MAP()
|
|
|
void MouseDownMap1(short Button, short Shift, long x, long y);
|
|
|
void MouseMoveMap1(short Button, short Shift, long x, long y);
|
|
|
void MouseUpMap1(short Button, short Shift, long x, long y);
|
|
|
void MouseDblClickMap1();
|
|
|
|
|
|
afx_msg void OnFlyLineDesign();
|
|
|
public:
|
|
|
afx_msg void OnClearpoint();
|
|
|
afx_msg void OnEditpoint();
|
|
|
afx_msg void OnEditProper();
|
|
|
afx_msg void OnDelpoint();
|
|
|
afx_msg void OnEditLine(); // -----by Wu 2023.09.14
|
|
|
//afx_msg void OnBindline1();
|
|
|
afx_msg void OnBindline2();
|
|
|
afx_msg void OnLoadMyline1();
|
|
|
afx_msg void OnBindline3();
|
|
|
afx_msg void OnBindline4();
|
|
|
afx_msg void OnBindline5();
|
|
|
afx_msg void OnLayermng();
|
|
|
afx_msg void OnAddgtarget();
|
|
|
afx_msg void ShowModifyPointDlg();
|
|
|
// afx_msg void OnMouseHWheel(UINT nFlags, short zDelta, CPoint pt);
|
|
|
afx_msg void OnNlinedesign();
|
|
|
afx_msg void OnUpdateNlinedesign(CCmdUI *pCmdUI);
|
|
|
afx_msg void OnShowPd10();
|
|
|
afx_msg void OnUpdateShowPd10(CCmdUI *pCmdUI);
|
|
|
afx_msg void OnShowHs11();
|
|
|
afx_msg void OnUpdateShowHs11(CCmdUI *pCmdUI);
|
|
|
afx_msg void OnBindHs11();
|
|
|
afx_msg void OnShowTc12();
|
|
|
afx_msg void OnBindTc12();
|
|
|
afx_msg void OnUpdateShowTc12(CCmdUI *pCmdUI);
|
|
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
|
afx_msg void On32855();
|
|
|
|
|
|
|
|
|
afx_msg void OnMove(int x, int y);
|
|
|
virtual BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
|
|
|
protected:
|
|
|
afx_msg LRESULT OnSelUav(WPARAM wParam, LPARAM lParam);
|
|
|
public:
|
|
|
afx_msg void OnAddTarget();
|
|
|
protected:
|
|
|
afx_msg LRESULT OnDrawTarget(WPARAM wParam, LPARAM lParam);
|
|
|
public:
|
|
|
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
|
|
|
afx_msg void OnTargetDelete();
|
|
|
|
|
|
afx_msg LRESULT OnSendSelectTarget(WPARAM wParam, LPARAM lParam); //在地图上选点
|
|
|
|
|
|
afx_msg LRESULT OnSendCloseDemAlt(WPARAM wParam, LPARAM lParam); //在地图上选点
|
|
|
|
|
|
afx_msg LRESULT OnShowPointInMap(WPARAM wParam, LPARAM lParam); //显示待分析的地面站位置
|
|
|
afx_msg LRESULT OnShowPointVisible(WPARAM wParam, LPARAM lParam); //显示可视区域
|
|
|
afx_msg LRESULT OnShowPointNotVisible(WPARAM wParam, LPARAM lParam); //显示不可视区域
|
|
|
afx_msg LRESULT OnSendClearShape(WPARAM wParam, LPARAM lParam); //清除可视区域和不可视区域
|
|
|
|
|
|
afx_msg LRESULT OnShowAreaVisible(WPARAM wParam, LPARAM lParam); //显示实时可视区域
|
|
|
afx_msg LRESULT OnShowAreaNotVisible(WPARAM wParam, LPARAM lParam); //显示实时不可视区域
|
|
|
afx_msg LRESULT OnShowClearArea(WPARAM wParam, LPARAM lParam); //清除实时区域
|
|
|
|
|
|
afx_msg LRESULT OnDelLineLayer(WPARAM wParam, LPARAM lParam); //删除通视等高线图层
|
|
|
afx_msg LRESULT OnAddLineLayer(WPARAM wParam, LPARAM lParam); //添加点到通视等高线图层
|
|
|
|
|
|
afx_msg LRESULT OnSendRegionToGis(WPARAM wParam, LPARAM lParam); //可视域分析到GIS对话框的消息响应函数
|
|
|
|
|
|
afx_msg LRESULT OnDrawLinePoint(WPARAM wParam, LPARAM lParam); //标绘航线上的点
|
|
|
|
|
|
afx_msg LRESULT OnShowCrashArea(WPARAM wParam, LPARAM lParam); //显示实时碰撞检测区域
|
|
|
|
|
|
afx_msg LRESULT OnSendDrawFight(WPARAM wParam, LPARAM lParam); //绘制作用范围
|
|
|
|
|
|
afx_msg LRESULT OnSendDrawDemRegion(WPARAM wParam, LPARAM lParam); //绘制高程区域
|
|
|
|
|
|
afx_msg LRESULT OnZoomToLocation(WPARAM wParam,LPARAM lParam); //在线地图定位
|
|
|
|
|
|
GISManager* m_gisManager;
|
|
|
CDlgLightRegion m_dlgLightRegion;
|
|
|
afx_msg void OnMenuLightRegion();
|
|
|
|
|
|
//是否选中标绘高程区域
|
|
|
bool m_bPlotDemArea;
|
|
|
|
|
|
//功能:基于点矢量图层标绘文字标注
|
|
|
//输入:点图层名称drawLayerID
|
|
|
// 点坐标,经度lon, 纬度lat
|
|
|
// 点名称strPtName
|
|
|
// 标绘颜色strColor
|
|
|
// 标绘字体颜色数值fontColor
|
|
|
void AddTextToPointShapeLayer(long &drawLayerID, const double lon, const double lat,
|
|
|
const CString strPtName, const CString strColor, unsigned long fontColor);
|
|
|
|
|
|
//功能:显示两点所连线段的距离和方位
|
|
|
void DrawLineLabel(long &drawLayerID, const double ptLon1, const double ptLat1, const double ptLon2, const double ptLat2);
|
|
|
//功能:显示两点所连线段的距离和方位
|
|
|
void DrawDistLabelEx(long drawLayerID, const double ptLon1, const double ptLat1, const double ptLon2, const double ptLat2,int pos=1);
|
|
|
//功能:显示航点之间的距离和方位
|
|
|
void DrawDistLabel(long drawLayerID,const double pts[][2], const int ptNum,int pos=1);
|
|
|
void DrawDistLebel(long drawLayerID,const PtStruct *pts, const int ptNum);
|
|
|
afx_msg void OnMenuEntryPoint();
|
|
|
afx_msg void OnMenuPlotdemArea();
|
|
|
|
|
|
//标记点对话框
|
|
|
CDlgMarker m_dlgMarker;
|
|
|
|
|
|
//功能:改变CursorMode
|
|
|
afx_msg LRESULT OnSetMapCursorMode(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//功能:显示或隐藏标记点
|
|
|
afx_msg LRESULT OnDrawMarker(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
//清除地面站标绘
|
|
|
afx_msg void OnMenuClearGCS();
|
|
|
|
|
|
//是否显示ADS飞机信息
|
|
|
bool m_bEnableShowADSB;
|
|
|
afx_msg void OnMenuADSB();
|
|
|
|
|
|
bool m_bWithin100km_ADS[MAX_PLANE_NUM_ADS];
|
|
|
double m_dLon_ADS[MAX_PLANE_NUM_ADS];
|
|
|
double m_dLat_ADS[MAX_PLANE_NUM_ADS];
|
|
|
double m_dYaw_ADS[MAX_PLANE_NUM_ADS];
|
|
|
CString m_strPlaneName_ADS[MAX_PLANE_NUM_ADS];
|
|
|
CString m_strColor_ADS[MAX_PLANE_NUM_ADS];
|
|
|
long m_fontColor_ADS[MAX_PLANE_NUM_ADS];
|
|
|
|
|
|
int m_iCurrentADSid;
|
|
|
int m_iTotalADSnum;
|
|
|
|
|
|
UINT TimerID_Draw; //定时器:绘制飞机
|
|
|
|
|
|
//功能:定时绘制无人机
|
|
|
afx_msg LRESULT OnTimerDrawUAV(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
afx_msg void OnShowLine6();
|
|
|
afx_msg void OnUpdateShowLine6(CCmdUI *pCmdUI);
|
|
|
afx_msg void OnShowLine7();
|
|
|
afx_msg void OnUpdateShowLine7(CCmdUI *pCmdUI);
|
|
|
afx_msg void OnShowLine8();
|
|
|
afx_msg void OnUpdateShowLine8(CCmdUI *pCmdUI);
|
|
|
afx_msg void OnBindline6();
|
|
|
afx_msg void OnBindline7();
|
|
|
afx_msg void OnBindline8();
|
|
|
afx_msg void OnShowLine9();
|
|
|
afx_msg void OnUpdateShowLine9(CCmdUI *pCmdUI);
|
|
|
afx_msg void OnShowLine10();
|
|
|
afx_msg void OnUpdateShowLine10(CCmdUI *pCmdUI);
|
|
|
afx_msg void OnBindline9();
|
|
|
afx_msg void OnBindline10();
|
|
|
};
|
|
|
|
|
|
//{{AFX_INSERT_LOCATION}}
|
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
|
|
#endif // !defined(AFX_GISDLG_H__C9D2192D_FC93_4663_863B_24AB8906C0A2__INCLUDED_)
|