// Private Fields //====================================================================== private Facet[] GetFacets(Crash crash) { List<Facet> facets = new List<Facet>(); facets.Add(new Facet("Park Alpha", crash.ParkAlpha)); facets.Add(new Facet("State", crash.StateCode)); facets.Add(new Facet("Crash Year", crash.CrashYear)); facets.Add(new Facet("Route ID", crash.RouteIdent)); facets.Add(new Facet("Crash MP", (double)crash.Milepost.Value)); facets.Add(new Facet("Light Condition", crash.Light.LightValue)); facets.Add(new Facet("Weather Condition", crash.Weather.WeatherValue)); facets.Add(new Facet("Crash Location", crash.CrashLocation.CrashLocValue)); facets.Add(new Facet("Surface Condition", crash.SurfCondition.SurfCondValue)); facets.Add(new Facet("Crash Class", crash.CrashClass.CrashClassValue)); facets.Add(new Facet("Vehicle Collision", crash.VehCollision.VehCollValue)); facets.Add(new Facet("Object Struck", crash.ObjectStruck.ObjectStruckValue)); facets.Add(new Facet("Road Character", crash.RoadCharacter.RoadCharValue)); facets.Add(new Facet("Contributing Factor 1", crash.ContFactor1.ConFactValue)); facets.Add(new Facet("Contributing Factor 2", crash.ContFactor2.ConFactValue)); facets.Add(new Facet("Category", crash.CrashCategory.Category)); facets.Add(new Facet("Pedestrian", crash.Pedestrian.Value.ToString())); facets.Add(new Facet("Spatial Location", crash.SpatialLoc.ToString())); return facets.ToArray(); }
// Private Methods //====================================================================== private Facet[] GetFacets(Crash crash) { List<Facet> facets = new List<Facet>(); facets.Add(new Facet("Park Alpha", StringValue(crash.ParkAlpha))); facets.Add(new Facet("State", StringValue(crash.StateCode))); facets.Add(new Facet("Crash Year", StringValue(crash.CrashYear))); facets.Add(new Facet("Crash Date", crash.CrashDate)); facets.Add(new Facet("Crash Time", crash.CrashTime)); facets.Add(new Facet("Route ID", StringValue(crash.RouteIdent))); facets.Add(new Facet("Road Name", StringValue(crash.RouteName))); facets.Add(new Facet("Node Distance (Ft)", DecimalValue(crash.NodeDistFt))); facets.Add(new Facet("Node Distance (Mi)", DecimalValue(crash.NodeDistMi))); facets.Add(new Facet("Node Direction", StringValue(crash.NodeDir))); facets.Add(new Facet("Node Number", StringValue(crash.NodeNum))); facets.Add(new Facet("Node MP", DecimalValue(crash.MpNode))); facets.Add(new Facet("Crash MP", DecimalValue(crash.Milepost))); facets.Add(new Facet("Light Condition", string.IsNullOrEmpty(crash.LightCode) ? string.Empty : crash.Light.LightValue)); facets.Add(new Facet("Weather Condition", string.IsNullOrEmpty(crash.WeatherCode) ? string.Empty : crash.Weather.WeatherValue)); facets.Add(new Facet("Crash Location", string.IsNullOrEmpty(crash.CrashLoc) ? string.Empty : crash.CrashLocation.CrashLocValue)); facets.Add(new Facet("Surface Condition", string.IsNullOrEmpty(crash.SurfaceCond) ? string.Empty : crash.SurfCondition.SurfCondValue)); facets.Add(new Facet("Crash Class", string.IsNullOrEmpty(crash.CrashClassification) ? string.Empty : crash.CrashClass.CrashClassValue)); facets.Add(new Facet("Vehicle Collision", string.IsNullOrEmpty(crash.VehColl) ? string.Empty : crash.VehCollision.VehCollValue)); facets.Add(new Facet("Fixed Object Struck", string.IsNullOrEmpty(crash.ObjStruck) ? string.Empty : crash.ObjectStruck.ObjectStruckValue)); facets.Add(new Facet("Road Character", string.IsNullOrEmpty(crash.RoadChar) ? string.Empty : crash.RoadCharacter.RoadCharValue)); facets.Add(new Facet("Contributing Factor 1", string.IsNullOrEmpty(crash.ConFact1) ? string.Empty : crash.ContFactor1.ConFactValue)); facets.Add(new Facet("Contributing Factor 2", string.IsNullOrEmpty(crash.ConFact2) ? string.Empty : crash.ContFactor2.ConFactValue)); facets.Add(new Facet("Contributing Factor 3", string.IsNullOrEmpty(crash.ConFact3) ? string.Empty : crash.ContFactor3.ConFactValue)); facets.Add(new Facet("Contributing Factor 4", string.IsNullOrEmpty(crash.ConFact4) ? string.Empty : crash.ContFactor4.ConFactValue)); facets.Add(new Facet("Contributing Factor 5", string.IsNullOrEmpty(crash.ConFact5) ? string.Empty : crash.ContFactor5.ConFactValue)); facets.Add(new Facet("Contributing Factor 6", string.IsNullOrEmpty(crash.ConFact6) ? string.Empty : crash.ContFactor6.ConFactValue)); facets.Add(new Facet("Category", string.IsNullOrEmpty(crash.Category) ? string.Empty : crash.CrashCategory.Category)); facets.Add(new Facet("Hit & Run", BoolValue(crash.HitRun))); facets.Add(new Facet("Fatal", ShortValue(crash.Fatals))); facets.Add(new Facet("Injured", ShortValue(crash.Injured))); facets.Add(new Facet("Pedestrian Fatal", ShortValue(crash.PedFatility))); facets.Add(new Facet("Pedestrian Injured", ShortValue(crash.PedInjury))); facets.Add(new Facet("Bikers Fatal", ShortValue(crash.BikeFatilty))); facets.Add(new Facet("Bikers Injured", ShortValue(crash.BikeInjury))); facets.Add(new Facet("Pedestrian", BoolValue(crash.Pedestrian))); facets.Add(new Facet("Comments", StringValue(crash.Comments))); facets.Add(new Facet("Spatial Location", BoolValue(crash.SpatialLoc))); // facets.Add(new Facet("Case Number", StringValue(crash.CaseNum))); //facets.Add(new Facet("Location", StringValue(crash.Location))); //facets.Add(new Facet("USPP/NPS Veh. Inv.", BoolValue(crash.UsppNpsNehInv))); //facets.Add(new Facet("Park Property Dest.", BoolValue(crash.ParkPropertyDest))); //facets.Add(new Facet("Data Source", StringValue(crash.DataSrc))); //facets.Add(new Facet("Latitude", DecimalValue(crash.Latitude))); //facets.Add(new Facet("Longitude", DecimalValue(crash.Longitude))); //facets.Add(new Facet("Save Date", crash.SaveDate)); //facets.Add(new Facet("RIP Cycle", StringValue(crash.RipCycle))); return facets.ToArray(); }