AvisMap - Mapping Software Provider

Affordable GIS / Mapping Software Products and Solutions.

  • You are here: 
  • Mapping Software
  • Style Mapping Table for GIS and CAD Data Conversion

Style Mapping Table for GIS and CAD Data Conversion

Data in different GIS or CAD software have specified line styles, fonts, symbols, and fill styles which might not be kept as usual after being imported into AvisMap format. In order to keep original style settings to the full extent, we present the conception of Style Mapping Table which can be generated by user self in outside. User can specify the corresponding relationships of each line style, font, symbol, and fill style.

Format description of Style Mapping Table

  • There are seven parts involved in the table:
    a. Table title
    b. Font reference
    c. LineStyle reference
    d. Symbol reference
    e. Fillstyle reference
    f. Color mode
    g. DXF’s path and file name
  • The table title has three rows:
    AvisMap Style Mapping Table
    Version 3.00
    Separator “&”

Where, the characters in the double quotation marks after Separator are delimiters between fields in the Style Mapping Table. It is specified by user to avoid conflicting with characters in the text. The default is a comma (,) the ASCII code.

  • The reference part of the font begins with FontBegin, and ends with FontEnd. Each row between them represents a kind of corresponding relationship of font. And it is made up of four domains being separated by delimiters. The four domains are grouped as below:
Domain 1 Domain 2 Domain 3 Domain 4
Text Style Name/Font face/ID in outer data Scale of font width Scale of font height1 Font face in AvisMap

Note:

a.Text style name should be specified in Field 1 if it is AutoCAD data. Font face or ID should be specified if it is Microstation DGN data;

b.The font width and height of outer data will be read by program, but the zoom scales of them should be specified by user self.

Import: outer font width * font width zoom scale ==> AvisMap font width

Import: outer font height * font height zoom scale ==> AvisMap font height

Export: AvisMap font width / font width zoom scale ==> outer font width

Export: AvisMap font height / font height zoom scale ==> outer font height

That is, you can use the same .srt file to export the imported data. Therefore, you can get the same font width and height as original ones before imported, and vice versa.

  • The reference part of the linestyle begins with LineStyleBegin, and ends with LineStyleEnd. Each row between them represents a kind of corresponding relationship of LineStyle. And it is made up of two domains being separated by delimiters. The two domains are grouped as below:
Domain 1 Domain 2

Linestyle name/ID in outer data

Linestyle ID in AvisMap

The reference part of fillstyle is similar with the one of linestyle.

  • The reference part of the symbol begins with SymbolBegin, and ends with SymbolEnd. Each row between them represents a kind of corresponding relationship of symbol. And it is made up of three domains being separated by delimiters. The three domains are grouped as below:
Domain 1 Domain 2 Domain 3

Symbol name/ID in outer data

Symbol zoom scale

Symbol ID in AvisMap

Note:

The symbol size of outer data will be read by program, but the zoom scale should be specified by user self.

Import: outer data’s symbol size * symbol zoom scale = AvisMap symbol size

Import: SupeMap symbol size / symbol zoom scale = outer data’s symbol size

That is, you can use the same .srt file to export the imported data. Therefore, you can get the same symbol size as original one before imported, and vice versa.

Text color setting:

If there is no special setting involved in text, just use the color being set in “Import or Export color mode”.

  • The DXF file includes two rows:
    dxffile
    jr12.dxf

Where, the second row shows the DXF file and path name which can be absolute or relative, or no path used here. In this case, the DXF file must be saved in the same path as the Style Reference Table file.

  • The extension name of the file is *.srt.
  • All notes begin with // just like the case in C++, but without /* */ marking
  • There is no upper or lowercase distinction in style reference table. Besides the title must lie in the beginning of the file, other five parts have no particular order, that is, they can be mixed but can’t be nested.
  • In some GIS or CAD software, their linestyles, symbols, fonts, or fillstyles may not be marked with a name but with an ID or number. In this case, to enhance the general availability of the .srt file, the outer data’s linestyles, symbols, fonts, or fillstyles can be identified by name or ID. In AvisMap, a font is identified with name, while linestyles, symbols, and fillstyles are identified with IDs.
  • The contents of DXF file are the outer data’s style and names/IDs. In style reference, the system will search for them in the specified DXF file.
  • There are three color modes of DXF file (imported or exported):
    a. Specified by layer. The color of an object in DXF file is specified by the reference file of the corresponding layer.
    b. Specified by user. User can specify a field as the color index. If there is no specification, use the field “Color”, and if the field not found, use the color of object itself as described in below c.
    c. Use the color of an object itself.

Examples of Style Table Reference:

  • Sample Data =====> without notes

    AvisMap Style Mapping Table
    Version 3.00
    Separator “,”

    FontBegin
    1 , 0.83333333 , 1.0 , Arial
    7 , 0.50000000 , 0.66666 , Arial
    23 , 0.83333333 , 0.66666 , Arial
    135 , 1.0 , 1.0 , aips_AM
    205 , 0.50000000 , 1.0 , Bold
    ..
    FontEnd

    LineStyleBegin
    al, 3
    DASHED, 54
    3, 1
    ..
    LineStyleEnd

    SymbolBegin
    0301__, 10.0, 301
    0302__, 10.0, 302
    0303__, 10.0, 303
    0401__, 10.0, 401
    0402__, 10.0, 402
    ..
    SymbolEnd

    FillStyleBegin
    1, 3
    2, 4
    3, 1
    ..
    FillStyleEnd

    dxffile
    jr12.dxf

    ColorModeBegin

    StyleColor ByLayer
    StyleColor ByColorIndexField FieldName
    StyleColor ByGeometry

    TextColor ByLayer
    TextColor ByColorIndexField [FieldName]
    TextColor ByGeometry

    ColorModeEnd
  • Sample Data=====>with notes
    //the text match no case
    AvisMap Style Mapping Table //the mark of file type
    Version 3.00 //Version Number
    Separator “&” // strongly recommended, but can be ignored, here, the default is “,”. In this example, we use && as delimiter.
    //In the following code, the font, lineStyle, symbol, and fillStyle have no particular order, but can’t be nested.
    FontBegin //font begins
    //outer font name/ID, font width scale, font height scale, AvisMap font name
    1 && 0.83333333 && 1.0 && Arial //Normal
    7 && 0.50000000 && 0.66666 && Arial
    23 && 0.83333333 && 0.66666 && Arial
    135 && 1.0 && 1.0 && aips_AM //Morse
    205 && 0.50000000 && 1.0 && Bold //Bold
    ..
    FontEnd //font ends

    LineStyleBegin //linestyle begins
    //outer linestyle name/ID, AvisMap linestyle name
    1 && 3
    2 && 4
    3 && 1
    ..
    LineStyleEnd //linestyle ends

    SymbolBegin //symbol begins
    //outer symbol’s name/ID, symbol scale, AvisMap symbol’s ID
    0301__&& 10.0&& 301 //outer symbol size * zoom scale –> AvisMap symbol size
    0302__&& 10.0&& 302
    0303__&& 10.0&& 303
    0401__&& 10.0&& 401
    ..
    SymbolEnd //symbol ends

    FillStyleBegin //fillstyle begins
    //outer fillstyle’s name AvisMap fillstyle’s ID
    1 && 3
    2 && 4
    3 && 1
    ..
    FillStyleEnd //fillstyle ends

    dxfffile
    c:datadxffilejr12.dxf //the directory and name of the dxf file

    ColorModeBegin

    // The separators can be space, comma, && etc (ASCII)
    // You can select one of them.
    StyleColor ByLayer
    StyleColor ByColorIndexField FieldName // (The default ColorIndex can be used)
    StyleColor ByGeometry

    // Select one of them
    TextColor ByLayer
    TextColor ByColorIndexField [FieldName] //(optional)
    TextColor ByGeometry

    ColorModeEnd