private void ParsePolygon(string parens, string mods, Color lineColor, Color polyColor, double alt, Dates date) { if (!parens.StartsWith("(") && parens.EndsWith(")")) { return; } // string the top level of parens parens = parens.Substring(1, parens.Length - 2); List <string> shapes = UiTools.SplitString(parens, ","); foreach (string shape in shapes) { KmlLineList lineList = new KmlLineList(); lineList.Astronomical = astronomical; lineList.MeanRadius = meanRadius; lineList.ParseWkt(shape, mods, alt, date); if (alt == 0) { AddPolygonFlat(false, lineList, 1, polyColor, lineColor, true, true, date); } else { AddPolygon(false, lineList, 1, polyColor, lineColor, true, true, date); } } }
private void ParseLineString(string parens, string mods, Color lineColor, double alt, bool single, Dates date) { if (!parens.StartsWith("(") && parens.EndsWith(")")) { return; } if (!single) { // string the top level of parens parens = parens.Substring(1, parens.Length - 2); } List <string> shapes = UiTools.SplitString(parens, ","); foreach (string shape in shapes) { KmlLineList lineList = new KmlLineList(); lineList.Astronomical = astronomical; lineList.MeanRadius = meanRadius; lineList.ParseWkt(shape, mods, alt, date); AddPolygon(false, lineList, 1, Colors.White, lineColor, false, false, date); } }