Not all raster can be re-projected to another projection, at least some tools don’t allow us to.
For example, the AMSR-E/Aqua L3 Global Snow Water Equivalent EASE-Grids cannot be directly re-projected to UTM-6N within ENVI 5.1. https://nsidc.org/data/docs/daac/ae_swe_ease-grids.gd.html Please refer this website for projection information.
Fortunately, ArcMap can do a better job in this scenario. You can use the project tool just like any other operations.
In order to re-project lot of data using ArcObject, I have updated a ArcTool, which is basically a batch mode data operation toolkit. For this task, the screenshot is as follow:
Below is the result:
Beneath the hook is the GP tool, some sample scripts are as follow:
public static object ProjectRaster(string sFileIn, string sFileOut, string sNewProject, double dCellSize)
ESRI.ArcGIS.Geoprocessor.Geoprocessor gp = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
///disable the pyramid
gp.OverwriteOutput = true; ///================================= ProjectRaster pProjectRaster = new ProjectRaster(sFileIn, sFileOut, sNewProject); pProjectRaster.cell_size = dCellSize; ///pProjectRaster.resampling_type = “BILINEAR”; pProjectRaster.resampling_type = “NEAREST”; return gp.Execute(pProjectRaster, null); } ///=================================================
Remember that sometimes the environment setting can be messy, so you can always setup them explicitly following (even though the ESRI document itself is a mess):
One may ask, why would you re-project such a raster to the other projection which is not supported in ENVI? There are other methods, maybe better ones to achieve this task. And this is just a demonstration of how to make use of the GP tool in ArcObject when ENVI/IDL fails.