This guide contains general information about the Aeronautical Information System (AIS) functionality and concepts in LuciadLightspeed. Each AIS format (Dafif, AIXM, ARINC, …​) has more format-specific documentation available as well. |
The AIS visualization in Lightspeed views conforms with the standard LuciadLightspeed concepts of view, layer and styler for Lightspeed views.
-
A view (
ILspView
) consists of a number of layers. -
One layer (
ILspLayer
) corresponds to a single model (ILcdModel
). -
Each layer has a styler (
ILspStyler
) that can handle each of the objects in a model. -
Each layer has a label styler (
ALspLabelStyler
) that can provide labels for each of the objects in a model.
Because most of the AIS domain objects are modeled with core LuciadLightspeed shapes, you can use standard layers, painters and stylers to visualize your data.
Furthermore, AIS provides an AIS-specific styler TLspAISStyler
, which can style AIS domain objects
according to the ICAO symbology. TLspAISStyler
makes use of the style information provided in Symbology Encoding .sld
files to determine an object’s styling.
Symbology Encoding is an OGC standard that defines a common XML language for describing styling information. To learn more, see http://www.opengeospatial.org/standards/se. |
Program: Using a link:../../../reference/LuciadLightspeed/com/luciad/view/lightspeed/layer/shape/TLspShapeLayerBuilder.html[TLspShapeLayerBuilder
] with TLspAISStyler
to create a layer for AIS data shows how to create
a layer using the standard TLspShapeLayerBuilder
and the TLspAISStyler
.
You can use
|
TLspShapeLayerBuilder
with TLspAISStyler
to create a layer for AIS data
TLspAISStyler aisStyler = new TLspAISStyler();
ILspLayer layer = TLspShapeLayerBuilder.newBuilder()
.model(model)
.bodyStyler(TLspPaintState.REGULAR, aisStyler)
.labelStyler(TLspPaintState.REGULAR, aisStyler)
.build();
The AIS component comes with a set of default .sld
Symbology Encoding files that specify the styling of the data types defined in the AIS package.
Defining your own styling
You can also specify your own SE files to style the AIS objects. The easiest way to override the default styling of the objects is to define SE styling files with your own styling, and pass those custom SE files to the styler constructor.
There is a default SE styling file available for each AIS data type. This means that you can also define custom styling for each data type. To define custom styling for a data type:
-
Copy the SE styling file for with the default styling definitions for the data type.
-
Store the file copy in a distinct directory.
-
Customize the SE styling definitions in the copied file.
-
Pass the directory with the custom styling file to the styler constructor, as demonstrated in Program: Providing your own Symbology Encoding files to
TLspAISStyler
.
TLspAISStyler
TLspAISStyler customAisStyler = new TLspAISStyler("com/my/styling/se/");
If you pass a custom styling directory to the AIS styler, it will check this directory first to find a styling file for the data types it needs to style. If the styler finds a styling file for a data type, it will apply the style definitions from that file. Otherwise, the styler goes on to retrieve the default SLD styles in the default styling directory.
To define styling for a custom extension of a data type, create a styling file for that custom data type. However, make sure
that the name of the base data type is in the file name of the custom styling file. For example, you can define custom styling
for a runway data type extension, and name the styling file |
You can also use code to customize the styling of AIS data. This is useful if you want to base your styling on derived data properties, or if you want to take full styling control:
-
Use a custom property retriever: you can plug in an SLD property retriever to calculate derived properties. If you want to style the AIS data based on a property that is not directly available in the data, you can calculate it from properties that are available. Set up a custom SLD property retriever for this, and provide it to the constructor of the AIS styler through the SLD context. For internationalization purposes, you could retrieve the text on the formatted AIS object labels, for instance, and translate it. For more information about working with OGC SLD property retrievers and OGC filters, see the LuciadLightspeed developer’s guide.
-
Wrap the styler: you can decorate or override the styler’s
style()
method to customize the styling in Java. A useful class for this iscom.luciad.view.lightspeed.style.styler.ALspStyleCollectorWrapper
. It allows you to take full control of styling, and set up styling delegation to different style collectors depending on specific conditions. See the javadoc of this class for more details. The LuciadLightspeed developer’s guide provides more information about the purpose and use of style collectors.
See the javadoc of TLspAISStyler
for more details. For a demonstration, see the ais.lightspeed
sample:
it comes with a set of .sld
files that customize the styling of the objects displayed in the samples.