Function RoadNameCreate(ID: integer; filename: string): integer;
The roadname functions is a small database built into RW Net, that will allow you to store a list of road names (or any text for that matter) associated with each link in the network. Since most road names are used on several links, RW Net creates a list of possible names and assigns a lookup value (roadnameID) for each link. This allows you to compare 2 road names by just comparing roadname ID's, which is much faster and requires less RAM.
It is possible to load 99 different roadname database at one time.
Example on general use
RoadNameCreate(1,"roadname.txt")
RoadNameLoad(1,false)
RoadName1_Get(1,100,name)
Print "Link 100: "+name
RoadNameClose(1)
This function will import a text file with road names (1 string per line) and store it as a binary file on disk. There should be as many lines in the text file as you have links in your network.
Filename should include a fully qualified path. ID is an integer from 1 - 99.
The 2 generated files will have names roadnameXX.bin and roadnumberXX.bin, where XX = the ID parameter.
This means you can have several such pair of files - for instance based on different languages or other kind of setups, where further information is included: "Main Street" or "Main Street (Smalltown)".
The text format should be ASCII, ANSI or UTF-8. If you plan to generate GML output, you should use UTF-8 format. Basic principle is: What comes in, also comes out as no conversion is done inside RW Net.
Unicode / UTF-16 is not supported.
Use OnRoadNameCreateProgress event for tracking progress.
See also RoadNameCreate2
Possible error codes: -30 -32 -40 -48
ActiveX / VCL / CLX component: RWnetBase