This method builds a turn restrictions index file (.tri) from traffic rules stored in an XML file.


Namespace: AspMap
Assembly: AspMapNET (in AspMapNET.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function BuildIndex( _ 
   ByVal mapFile As String,  _ 
   ByVal segmentIdField As String,  _ 
   ByVal xmlFile As String,  _ 
   ByVal indexFile As String _ 
) As Long
C#
public static long BuildIndex(
   string mapFile,
   string segmentIdField,
   string xmlFile,
   string indexFile
)
C++
public:
 static __int64 BuildIndex(
   String mapFile,
   String segmentIdField,
   String xmlFile,
   String indexFile
)
J#
public static long BuildIndex(
   string mapFile,
   string segmentIdField,
   string xmlFile,
   string indexFile
)
JScript
public static  function BuildIndex(
   mapFile : String,
   segmentIdField : String,
   xmlFile : String,
   indexFile : String
) : long

Parameters

mapFile
The path to a shapefile or TAB file.
segmentIdField
The name of a field that uniquely identifies records in the map file.
xmlFile
The path to an XML file that contains traffic rules.
indexFile
The path to the turn restrictions index file (.tri).

Return Value

The method returns the number of successfully processed turn restrictions. The number may be less than the total count of rules in the XML file.

Exceptions

Exception TypeCondition
ExceptionThrown when an error occurs.

Remarks

The name of the turn restrictions index file should be the same as the name of the map file, with .tri as the index file extension. This will allow the Open method to load turn restrictions automatically.

See Also