public WFDLakesViewModel() { ShapeReader psp = new ShapeReader(@"soervp1.shp"); Lakes = new Dictionary<string, WFDLake>(); DT = psp.Data.Read(); psp.Data.SpoolBack(); foreach (var l in psp.GeoData) { WFDLake wf = new WFDLake(); wf.Polygon = (XYPolygon)l.Geometry; wf.Data = l.Data; string name =(string) l.Data[0]; if (!Lakes.ContainsKey(name)) Lakes.Add(name, wf); } psp.Dispose(); Precipitation = new TimespanSeries(); Precipitation.Name = "Precipitation"; double[] values = new double[] { 108, 83, 73, 52, 61, 86, 99, 101, 75, 108, 85, 101 }; AddMonthlyValues(Precipitation, 2007, values); Evaporation = new TimespanSeries(); Evaporation.Name = "Evaporation"; double[] values2 = new double[] { 4, 11, 34, 66, 110, 118, 122, 103, 61, 26, 7, 1 }; AddMonthlyValues(Evaporation, 2007, values2); }
public WFDLakesViewModel() { ShapeReader psp = new ShapeReader(@"soervp1.shp"); Lakes = new Dictionary <string, WFDLake>(); DT = psp.Data.Read(); psp.Data.SpoolBack(); foreach (var l in psp.GeoData) { WFDLake wf = new WFDLake(); wf.Polygon = (XYPolygon)l.Geometry; wf.Data = l.Data; string name = (string)l.Data[0]; if (!Lakes.ContainsKey(name)) { Lakes.Add(name, wf); } } psp.Dispose(); Precipitation = new TimespanSeries(); Precipitation.Name = "Precipitation"; double[] values = new double[] { 108, 83, 73, 52, 61, 86, 99, 101, 75, 108, 85, 101 }; AddMonthlyValues(Precipitation, 2007, values); Evaporation = new TimespanSeries(); Evaporation.Name = "Evaporation"; double[] values2 = new double[] { 4, 11, 34, 66, 110, 118, 122, 103, 61, 26, 7, 1 }; AddMonthlyValues(Evaporation, 2007, values2); }