當前位置:編程學習大全網 - 網站源碼 - 如何實現 ArcEngine+C# 中實現柵格數據投影轉換?求救,急急!!!答案有幫助的加分。

如何實現 ArcEngine+C# 中實現柵格數據投影轉換?求救,急急!!!答案有幫助的加分。

搜索半天沒壹個靠譜的答案,自己寫了壹個下面 的代碼僅供參考public bool ChangeRasterCoordinate(string prjPath, string inputRasterPath, string outRasterPath)

{

var prj = SpatialReferenceHelper.ReadSR(prjPath);//prjPath即妳要轉換成的坐標系的prj文件;inputRasterPath:需要轉換的文件路徑;outRasterPath轉換完成後的文件路徑

Geoprocessor gp = new Geoprocessor();

ProjectRaster projectRaster = new ProjectRaster();

projectRaster.in_raster = inputRasterPath;

projectRaster.out_raster = outRasterPath;

projectRaster.cell_size = "10000";

projectRaster.out_coor_system = prj;

IGeoProcessorResult tGPResult = (IGeoProcessorResult)gp.Execute(projectRaster, null);

if (tGPResult.Status == ESRI.ArcGIS.esriSystem.esriJobStatus.esriJobSucceeded)

{

return true;

}

return false;

}

  • 上一篇:請教FT245RL芯片USB轉串口windows xp下的USB驅動源代碼
  • 下一篇:傳奇手遊有哪些經典版本
  • copyright 2024編程學習大全網