AnsweredAssumed Answered

TopoToRaster Tool Execute problem in ArcGIS

Question asked by monir_mostafizur1 on Feb 3, 2016

I am trying to execute TopoToRaster tool (ArcToolbox>3D Aanalyst Tool>Raster Interpolation>Topo To Raster) in arcGis 10.0 with .NET.

TopoToRaster Class Members

But get exceptions. My code is here :


private ESRI.ArcGIS.Analyst3DTools.TopoToRaster InitTool(out object beginningEnvironmentValue)
= new Geoprocessor { OverwriteOutput = true, AddOutputsToMap = false };

= _gp.GetEnvironmentValue("workspace");

.SetEnvironmentValue("workspace", _workspace.PathName);
.SetEnvironmentValue("scratchWorkspace", _workspace.PathName);

  var topoToRaster
= new ESRI.ArcGIS.Analyst3DTools.TopoToRaster
= _inputFeature,//new InputFeatureTopoToRaster() { FeatureLayer = _inputFeature.ToString(), Field = "HGL", Type = "CONTOUR" },
= _outputRaster
return topoToRaster;


private readonly object _inputFeature;
  private readonly string _outputRaster


public class InputFeatureTopoToRaster
  public string
FeatureLayer { get; set; }
  public string
Field { get; set; }
  public string
Type { get; set; }


_inputFeature: is the input feature class path.

what is the problem of my input?? I have also tried with class of InputFeature