Example #1
0
 /// <summary>
 /// Constructs Road object.
 /// </summary>
 /// <param name="info">RoadInfo object to be referred to</param>
 /// <param name="heading">Heading of the directed Road</param>
 public Road(RoadInfo info, Heading heading) :
     base(heading == Heading.Forward ? info.Id * 2 : info.Id * 2 + 1,
          heading == Heading.Forward ? info.Source : info.Target,
          heading == Heading.Forward ? info.Target : info.Source)
 {
     this.RoadInfo = info;
     this.Headeing = heading;
     if (heading == Heading.Forward)
     {
         this.Geometry = info.Geometry;
     }
     else
     {
         this.Geometry = info.Geometry.Reverse() as ILineString;
     }
 }
 public IRoadMapBuilder AddRoad(RoadInfo road)
 {
     _roads.Add(road.Id, road);
     return(this);
 }