/// <summary> /// 准备定位信息,计算投影后的值,并计算范围 /// </summary> private void ReadyLocations(IRasterDataProvider srcRaster, ISpatialReference dstSpatialRef, out double[] xs, out double[] ys, out PrjEnvelope maxPrjEnvelope, out Size locationSize, Action <int, string> progressCallback) { if (progressCallback != null) { progressCallback(1, "读取经纬度数据集"); } ReadLongitudeLatitude(srcRaster, out xs, out ys, out locationSize); if (progressCallback != null) { progressCallback(2, "预处理经纬度数据集"); } _rasterProjector.ComputeDstEnvelope(_srcSpatialRef, xs, ys, locationSize, dstSpatialRef, out maxPrjEnvelope, progressCallback); }
/// <summary> /// 准备定位信息,计算投影后的值,并计算范围 /// </summary> private void ReadyLocations(IRasterDataProvider srcRaster, ISpatialReference dstSpatialRef, Size srcSize, out double[] xs, out double[] ys, out PrjEnvelope maxPrjEnvelope, Action <int, string> progressCallback) { if (_xs == null || _ys == null) { throw new Exception("读取经纬度数据失败"); } Size locationSize; if (progressCallback != null) { progressCallback(1, "读取并插值经度数据集"); } ReadLocations(srcRaster, out xs, out ys, out locationSize); TryResetLonlatForLeftRightInvalid(xs, ys, locationSize); if (progressCallback != null) { progressCallback(3, "预处理经纬度数据集"); } _rasterProjector.ComputeDstEnvelope(_srcSpatialRef, xs, ys, srcSize, dstSpatialRef, out maxPrjEnvelope, progressCallback); }
/// <summary> 准备定位信息,计算投影后的值,并计算范围</summary> private void ReadyLocations(IRasterDataProvider srcRaster, ISpatialReference dstSpatialRef, Size srcSize, out double[] xs, out double[] ys, out PrjEnvelope maxPrjEnvelope, Action <int, string> progressCallback) { ReadLongitudeLatitude(srcRaster, out xs, out ys); _rasterProjector.ComputeDstEnvelope(_srcSpatialRef, xs, ys, srcSize, dstSpatialRef, out maxPrjEnvelope, progressCallback); }