|
- /* Copyright(c)--Navinfo--Author:fangzurui--date:2023-10-20 */
-
- #ifndef DATAMANAER_RENDERTOOL_IMAGELAYER_H_
- #define DATAMANAER_RENDERTOOL_IMAGELAYER_H_
-
- #include <QString>
- #include <QMessageBox>
- #include <QCoreApplication>
-
- #include <string>
- #include <vector>
-
- #include <gdal_priv.h>
- #include <ogr_spatialref.h>
- #include <ogr_geometry.h>
-
- #include "DataManager/Common/Image.h"
-
- class ImageLayer
- {
- public:
- ImageLayer();
- ~ImageLayer();
-
- // 创建Image
- Image* createImage(std::string name, std::string date, std::string type, MapPoint mapPoint);
-
- // 添加tif
- void addImage(Image* image);
-
- // 获取tif值
- Image* getImage(int num);
-
- // 获取tif数组
- std::vector<Image*> getImageVec();
-
- // 获取数组中的tifName
- std::string getImageName(int num);
-
- // 获取数组中的tifName
- std::string getImageType(int num);
-
- // 获取数组中的tifName
- std::string getImageDate(int num);
-
- // 获取数组中的tifCenterCoord
- MapPoint getImageCenterCoord(int num);
-
- // 获取数组中的tifCenterCoord
- osg::ref_ptr<TifImageLayer> getTifImage(int num);
- osg::ref_ptr<TifImageLayer> getTifImage(std::string imageDate);
-
- // 删除数组中的元素
- void deleteImage(int num);
- void deleteImage(std::string imageDate);
-
- // 清空数组中的元素
- void clearImage();
-
- // 获取图层中心位置
- MapPoint getImageCenterCoord(QString strImagePath);
-
- public:
- // 判断是否存在
- bool isExists(int num);
- bool isExists(std::string imageDate);
-
- // 根据值获取值所在数组的下标
- int findKeyFromValue(Image* image);
-
- // 根据时间筛选图层
- std::vector<Image*> findImageFromDate(std::vector<Image*> vecImage, std::string imageDate);
- std::vector<Image*> findImageFromType(std::vector<Image*> vecImage, std::string imageType);
-
- private:
- std::vector<Image*> _vecImage;
- };
-
- #endif // DATAMANAER_RENDERTOOL_IMAGELAYER_H_
|