/// <summary> /// 创建python文件 /// </summary> /// <param name="shpparam"></param> /// <param name="tinworkspace"></param> /// <param name="tinname"></param> /// <param name="savepath"></param> public static void CreatePythonFile(string shpparam,string tinworkspace,string tinname,string savepath) { //string shpParams = "PolygonRegionPCS.shp <None> <None> hardclip true"; string pythonCom = Utilities.CreatePythonClipCommand(tinworkspace, tinname, shpparam); FileStream fs = new FileStream(savepath, FileMode.OpenOrCreate, FileAccess.ReadWrite); StreamWriter sw = new StreamWriter(fs); sw.Write(pythonCom); sw.Close(); fs.Close(); }