RasterProcessTool/BaseCommonLibrary/BaseTool/RasterToolBase.h

81 lines
2.0 KiB
C
Raw Normal View History

2024-12-24 02:50:25 +00:00
/**
* @file RasterProjectBase.h
* @brief None
* @author (3045316072@qq.com)
* @version 2.5.0
* @date 24-6-4
* @copyright Copyright (c) Since 2024 All rights reserved.
*/
#ifndef LAMPCAE_RASTERTOOLBASE_H
#define LAMPCAE_RASTERTOOLBASE_H
#include "BaseConstVariable.h"
2024-12-24 02:50:25 +00:00
#include "gdal_priv.h"
#include <memory>
namespace RasterToolBase {
static bool GDALAllRegisterEnable=false;
enum ProjectStripDelta{
Strip_6, // 6度带
Strip_3
};
enum CoordinateSystemType{ // 坐标系类型
GeoCoordinateSystem,
ProjectCoordinateSystem,
UNKNOW
};
struct PointRaster{ // 影像坐标点
double x;
double y;
double z;
};
struct PointXYZ{
double x,y,z;
};
struct PointGeo{
double lon,lat,ati;
};
struct PointImage{
double pixel_x,pixel_y;
};
/// 根据经纬度获取
/// EPSG代码根据经纬度返回对应投影坐标系统其中如果在中华人民共和国境内默认使用
/// CGCS2000坐标系统(EPSG 4502 ~ 4512 6度带,EPSG 4534 ~ 4554 3度带)其余地方使用WGS坐标系统
/// 投影方法 高斯克吕格(国内), 高斯克吕格
/// \param long 经度
/// \param lat 纬度
/// \return 对应投影坐标系统的 EPSG编码,-1 表示计算错误
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat(double long, double lat,
2024-12-24 02:50:25 +00:00
ProjectStripDelta stripState = ProjectStripDelta::Strip_3);
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat_inStrip3(double lon, double lat);
2024-12-24 02:50:25 +00:00
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat_inStrip6(double lon, double lat);
2024-12-24 02:50:25 +00:00
QString BASECONSTVARIABLEAPI GetProjectionNameFromEPSG(long epsgCode) ;
2024-12-24 02:50:25 +00:00
long BASECONSTVARIABLEAPI GetEPSGFromRasterFile(QString filepath);
2024-12-24 02:50:25 +00:00
std::shared_ptr<PointRaster> BASECONSTVARIABLEAPI GetCenterPointInRaster(QString filepath);
2024-12-24 02:50:25 +00:00
CoordinateSystemType BASECONSTVARIABLEAPI getCoordinateSystemTypeByEPSGCode(long EPSGCODE);
2024-12-24 02:50:25 +00:00
} // namespace RasterProjectConvertor
#endif // LAMPCAE_RASTERTOOLBASE_H