Surfer.Application ap = new Surfer.Application();
app.Visible = false;
app.GridData(datPath, 1, 2, 4, Type.Missing, //5
Type.Missing, Type.Missing, Type.Missing, 200, 200, //10
114.5f, 120f, 29, 35, Type.Missing, //15
false, Type.Missing, Type.Missing, Type.Missing, Type.Missing, //20
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, //25
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, //30
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, //35
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, //40
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, //45
Type.Missing, Type.Missing, Type.Missing, Type.Missing, grdPath, //50
SrfGridFormat.srfGridFmtAscii, Type.Missing, Type.Missing, Type.Missing, Type.Missing, //55
Type.Missing,Type.Missing
);
app.GridBlank(grdPath, blankPath, grdPath, SrfGridFormat.srfGridFmtAscii);
Surfer.IDocuments Docs = app.Documents;
Surfer.IPlotDocument PlotDoc = (Surfer.IPlotDocument)Docs.Add(SrfDocTypes.srfDocPlot);
Surfer.IMapFrame MapF = PlotDoc.Shapes.AddContourMap(grdPath);
// 等值线填充
Surfer.IContourMap ContourMap = (Surfer.IContourMap)MapF.Overlays.Item(1);
ContourMap.Levels.LoadFile(lvlPath);
ContourMap.FillContours = true;
ContourMap.ShowColorScale = true;
ContourMap.SmoothContours = SrfConSmoothType.srfConSmoothNone;
if (diplayText != null)
{
//在生出的图片中增加文字
foreach (SurferText model in this.diplayText)
{
IText text = PlotDoc.Shapes.AddText(model.X, model.Y, model.Content);
if (model.FontColor.HasValue) text.Font.Color = model.FontColor.Value;
if (model.FontSize.HasValue) text.Font.Size = model.FontSize.Value;
if (!string.IsNullOrEmpty(model.FontFace)) text.Font.Face = model.FontFace;
}
}
//覆盖所有地图
PlotDoc.Shapes.SelectAll();
Surfer.IMapFrame MapFrame = PlotDoc.Selection.OverlayMaps();
MapFrame.Overlays.Item(3).SetZOrder(SrfZOrder.srfZOToBack);
MapFrame.Overlays.Item(2).SetZOrder(SrfZOrder.srfZOToBack);
PlotDoc.SaveAs(srfPath2, "", SrfSaveFormat.srfSaveFormatDat);
PlotDoc.Export(gifPath, true, string.Format("width={0},height={1}", this.width, this.height));
return gifPath;
求大神帮忙解决,不要显示等值线的值