void CalcLength(string tmpshp)
{
var expression = "float(!SHAPE.LENGTH@YARDS!)";
CalculateField cgridX = new CalculateField(tmpshp, "Length", expression);
cgridX.expression_type = "PYTHON";
IGeoProcessorResult gpResX = gp.Execute(cgridX, null) as IGeoProcessorResult;
Console.WriteLine("计算长度");
} var gp = new ESRI.ArcGIS.Geoprocessor.Geoprocessor(); gp.AddOutputsToMap = true; gp.OverwriteOutput = true; gp.TemporaryMapLayers = true;