david.plume

IRasterAnalysisEnvironment - Syntax For GetCellSize - C# Ref args.

Discussion created by david.plume on Nov 6, 2012
Latest reply on Nov 6, 2012 by Neil
Hi Everyone,

My basic goal is to grab the raster analysis settings from ArcMap - I'd like to get the current extent and cellsize.

I"ve been attempting to use the IRasterAnalysisEnvironment interface and am able to hydrate my object by casting a math Operation class. 

I've run into a problem in Visual Studio 2010.  Intellisense is complaining about the my arguments to GetCellSize().  It says:

The best overloaded match for IRasterAnalysisEnvironment.GetCellsize(out esriRasterEnvSettingEnum, out double) has some invalid arguments

Code:

                IRasterAnalysisEnvironment pRasEnv = null;
                ESRI.ArcGIS.SpatialAnalyst.RasterMapAlgebraOp mathOp = new ESRI.ArcGIS.SpatialAnalyst.RasterMapAlgebraOpClass();
                pRasEnv = (IRasterAnalysisEnvironment)mathOp;

                ESRI.ArcGIS.GeoAnalyst.esriRasterEnvSettingEnum pEnvType;
                double dCellSize;

                pRasEnv.GetCellSize(pEnvType, dCellSize); // < INTELLISENSE DOES NOT LIKE THIS



Is there some problem with the definition of my arguments or otherwise?

Any suggestions would be appreciated;  I can find tons of examples for SetCellSize but none for GetCellSize.

Thanks!

Outcomes