Select to view content in your preferred language

ExtractByMask answered me "parameters are not valid"

391
1
07-22-2010 05:19 PM
ShufanZHANG
New Contributor
Hi,
    I am going to Extract an area of a TIFF Raster image, using an shapfile by ArcEngine9.3 and Visual Studio2008.

    The following is the code:

      geoprocessor gp = new geoprocessor();
      gp.OverwriteOutput = true;
      ExtractByMask cutTool = new ExtractByMask();
      cutTool.inraster = @"D:\raster.tif";
      cutTool.in_mask_data = @"D:\beijing.shp";
      cutTool.outraster = @"D:\pd.tif";
      IGeoProgressorResult result = (IGeoProgressorResult)gp.Execute(cutTool,null);

     the "result" is null, "gp.GetMessage(2)" tells me "parameters are not valid".
0 Kudos
1 Reply
ShufanZHANG
New Contributor
Hi,
   it is resolved. in ArcEngine 9.3, click the AxlicenseControl with right mouse button, choose attribute, check Arcinfo and spatial analyst. then it works. In ArcEngine 9.2, this is not needed.
0 Kudos