Predefined Readers > The S57 Map Reader > Configuring styles, colors and icons
 
Configuring styles, colors and icons
As mentioned above, a configuration file, called S57Styles.txt, is available to indicate the style to represent each map feature, based on its S57 code. For example:
1,Administration Area (Named),T,BBD2C1,,T,T,0,
2,Airport/airfield,T,aea052,997035,T,T,0,airare02.png
3,Anchor berth,T,,,T,T,0,achbrt07.png
4,Anchorage area,T,,,F,T,0,achare02.png
5,Beacon (cardinal),T,,,T,T,0,bcncar02.png
.
.
.
Each line of this file describes how to represent a particular S57 feature according to its coding attribute. Each line contains comma-separated fields, and has the following structure:
*Value of the S57 code
*Name of the S57 feature type
*Visibility attribute (T for visible, F for invisible)
*Background color (hexadecimal RGB)
*Foreground color (hexadecimal RGB)
*Boolean to fill the area with background color (T for True, F for False)
*Boolean to draw the stroke (T for True, F for False)
*Integer to specify the stroke style
*Icon file name, for point features
Where the possible stroke styles are:
0 solid
1 dot
2 dash
3 dashdot
4 dashdoubledot
5 alternate
6 doubledot
7 longdash
Note: A picture of different styles can be found in IlvLineStyle class documentation in Reference manual.
You can modify this file (S57Styles.txt) which is located in <$ILVHOME>/data/maps/s57. You can also create your own version of S57Styles.txt in another directory specified by the environment variable ILVMAPSS57STYLES. However if you use this last method, the new directory must contain all necessary bitmaps which are defined in the S57Styles.txt. For the syntax, see the original file or above.
As you can see, this configuration file allows you to easily customize global rendering settings with a simple and flexible syntax. Advanced configuration is also possible by defining your own rendering strategy. In this case, you need to create your own Renderer, that can be derived from the standard S57 Renderer ( IlvS57Renderer class), and implement your own logic for turning S57 information into appropriate graphics. For example you could decide to group some S57 features together on particular map layers, or you could implement advanced rendering based on other visual standards.

Version 5.7
Copyright © 2013, Rogue Wave Software, Inc. All Rights Reserved.