| | |
| | | { |
| | | public class GdalHelper |
| | | { |
| | | #region 成员变量+构造函数 |
| | | private static bool isInited; |
| | | |
| | | private static GdalHelper instance; |
| | |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 实例 |
| | |
| | | } |
| | | |
| | | String srsName = ds.GetSpatialRef().GetName(); |
| | | if (srsName.Contains(CGCS2000)) |
| | | { |
| | | point.TransformTo(sr4490); |
| | | } |
| | | else |
| | | { |
| | | //if (srsName.Contains(CGCS2000)) |
| | | //{ |
| | | // point.TransformTo(sr4490); |
| | | //} |
| | | //else |
| | | //{ |
| | | point.TransformTo(sr4326); |
| | | } |
| | | //} |
| | | point.SwapXY(); |
| | | |
| | | return point; |
| | |
| | | ds = Gdal.Open(file, Access.GA_ReadOnly); |
| | | if (null == ds) return; |
| | | |
| | | OSGeo.GDAL.Band band = ds.GetRasterBand(1); |
| | | Band band = ds.GetRasterBand(1); |
| | | if (0 == band.GetOverviewCount()) |
| | | { |
| | | ds.BuildOverviews("nearest", new int[] { 2, 4, 6, 8, 16 }); |