Where can I find information about the fields specification for the routing extension?
Fields specification for routing
Mario,
Welcome to MapSuite discussion forum!
For routing extension, you can get not only all the information of feature, but also the relationship between segments easily. Here are some tips:
1. Get information of the feature data:
FeatureSource featureSource = new ShapeFileFeatureSource("...");
// Get the feature data by your specified Id,which returns from routing extention
// The second parameter allows you to find the sepecified field information by Names.
Feature feature = featureSource.GetFeatureById("id", ReturningColumnsType.AllColumns);
// Get the roadName information
string roadName = feature.ColumnValues["RoadName"];
2. Get relationship between segments, which is stored in routing index file.
RoutingSource routingSource = new RtgRoutingSource("......");
routingSource.Open();
RouteSegment road = routingSource.GetRouteSegmentByFeatureId("id");
// The information of road shown as below
PointShape startPoint = road.StartPoint;
PointShape endPoint = road.EndPoint;
Collection<string> startAdjacentFeatureIds = Road.StartPointAdjacentIds;
Collection<string> endAdjacentFeatureIds = road.EndPointAdjacentIds;
// Using the adjacent feature ids, you can find the field information of the adjacent feature.
// For instance,"Feature feature = featureSource.GetFeatureById("id", ReturningColumnsType.AllColumns);"
int roadType = road.RouteSegmentType; // The type of road, like highways,main road, etc.
Any question please let me know!
Thanks!
Johnny,