/** * @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 "gdal_priv.h" #include 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 getProjectEPSGCodeByLon_Lat(double long, double lat, ProjectStripDelta stripState = ProjectStripDelta::Strip_3); long getProjectEPSGCodeByLon_Lat_inStrip3(double lon, double lat); long getProjectEPSGCodeByLon_Lat_inStrip6(double lon, double lat); QString GetProjectionNameFromEPSG(long epsgCode) ; long GetEPSGFromRasterFile(QString filepath); std::shared_ptr GetCenterPointInRaster(QString filepath); CoordinateSystemType getCoordinateSystemTypeByEPSGCode(long EPSGCODE); } // namespace RasterProjectConvertor #endif // LAMPCAE_RASTERTOOLBASE_H