Hi Johnny,
Thank you for your sample. It works.
Please advise how to implement the 3 levels logic for the pressure.csv:
Level1: value<1012
Level2: value=1012
Level3: value>1012
I initially thinking about using custom isoLineLevels but I’m not able to see all the lines (especially the first level <1012).
private InMemoryGridIsoLineLayer GetGridIsoLineLayer()
{
//Create a grid cell matrix based on the textboxes and the current extent
CreateGridCellMatrix();
//Load the grid we just created into the GridIsoLineLayer using the number of breaks defines
//on the screen
//Collection<double> isoLineLevels1 = GridIsoLineLayer.GetIsoLineLevels(gridCellMatrix, Convert.ToInt32(txtGridIsoLineLevelCount.Text));
Collection<double> isoLineLevels = new Collection<double>() { 0, 1012, 1013 };
InMemoryGridIsoLineLayer isoLineLayer = new InMemoryGridIsoLineLayer(gridCellMatrix, isoLineLevels, 0, double.MaxValue, -9999, IsoLineType.LinesOnly);
ClassBreakStyle classBreakLineStyle = new ClassBreakStyle(isoLineLayer.DataValueColumnName);
classBreakLineStyle.ClassBreaks.Add(new ClassBreak(0, new LineStyle(new GeoPen(GeoColor.SimpleColors.Red, 1))));
classBreakLineStyle.ClassBreaks.Add(new ClassBreak(1012, new LineStyle(new GeoPen(GeoColor.SimpleColors.Black, 1))));
classBreakLineStyle.ClassBreaks.Add(new ClassBreak(1013, new LineStyle(new GeoPen(GeoColor.SimpleColors.Blue, 1))));
isoLineLayer.CustomStyles.Add(classBreakLineStyle);
//Create the text styles to label the lines
TextStyle textStyle = TextStyles.CreateSimpleTextStyle(isoLineLayer.DataValueColumnName, "Arial", 8, DrawingFontStyles.Bold, GeoColor.StandardColors.Black, 0, 0);
textStyle.HaloPen = new GeoPen(GeoColor.StandardColors.White, 2);
textStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping;
textStyle.SplineType = SplineType.StandardSplining;
textStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels;
textStyle.TextLineSegmentRatio = 9999999;
textStyle.FittingLineInScreen = true;
textStyle.SuppressPartialLabels = true;
isoLineLayer.CustomStyles.Add(textStyle);
return isoLineLayer;
}
Thanks,
Inna