NASA WorldWind Java includes a complete tactical symbology subsystem supporting the MIL-STD-2525B and MIL-STD-2525C NATO joint military symbology standards. The system provides two primary abstractions:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nasaworldwind/worldwindjava/llms.txt
Use this file to discover all available pages before exploring further.
TacticalSymbol for point symbols anchored to a geographic position, and TacticalGraphic for line and area graphics defined by one or more control points. Both types integrate fully with the RenderableLayer system, support picking and highlighting, and carry rich text and graphic modifier support.
Tactical Symbols
TheTacticalSymbol interface (in gov.nasa.worldwind.symbology) defines the contract for all point tactical symbols. It extends WWObject, Renderable, and Highlightable, so symbols can be added directly to a RenderableLayer, respond to pick events, and display highlight states.
AbstractTacticalSymbol is the abstract base class providing rendering infrastructure: icon compositing from an IconRetriever, text modifier layout, graphic modifier rendering, and altitude mode handling. For MIL-STD-2525, the concrete implementation is MilStd2525TacticalSymbol in gov.nasa.worldwind.symbology.milstd2525.
Symbol Identification Code (SIDC)
Every MIL-STD-2525 symbol is identified by a 15-character alphanumeric Symbol Identification Code (SIDC). The SIDC encodes the affiliation (friendly, hostile, neutral, unknown), battle dimension (air, ground, sea surface, etc.), status (present, anticipated), function ID, echelon, and other attributes. For example:"SFGPU---------G"— Friendly Ground Unit"SHGXUCFRMS----G"— Hostile Destroyed Self-Propelled Rocket Launchers"SFAPMFQM--GIUSA"— Friendly Special Operations Forces Drone Aircraft
MilStd2525TacticalSymbol reads the SIDC and automatically configures the altitude mode: ground symbols use WorldWind.CLAMP_TO_GROUND, air symbols use WorldWind.ABSOLUTE.
Creating a Tactical Symbol
Construct aMilStd2525TacticalSymbol by passing the SIDC string and a Position. Optional modifiers can be passed as an AVList at construction or set afterwards with setModifier().
TacticalSymbols.java — creating and displaying tactical symbols
Symbol Attributes
TacticalSymbolAttributes (implemented by BasicTacticalSymbolAttributes) controls the visual appearance of a symbol. Attribute bundles may be shared across many symbols so that a single change propagates everywhere.
TacticalSymbols.java — configuring shared symbol attributes
TacticalSymbolAttributes methods:
| Method | Description |
|---|---|
setScale(Double) | Scale factor relative to the symbol’s original size. Values < 1 shrink, > 1 enlarge. |
setOpacity(Double) | Opacity from 0.0 (transparent) to 1.0 (opaque). Applies to icon and modifiers. |
setInteriorMaterial(Material) | Override the symbol interior fill color. |
setTextModifierMaterial(Material) | Color for all text modifier labels. |
setTextModifierFont(Font) | Font for text modifiers; null uses an auto-sized default. |
MilStd2525TacticalSymbol specifically, you can also toggle frame, fill, and icon visibility:
TacticalSymbols.java — toggling MIL-STD-2525 symbol parts
Symbol Modifiers
Modifiers are key-value pairs that augment a symbol’s graphic or text display. Keys are defined as constants inSymbologyConstants (in gov.nasa.worldwind.symbology). Pass a modifier key and value to setModifier(String, Object), or remove a modifier by passing null as the value.
TacticalSymbols.java — setting symbol modifiers
SymbologyConstants modifier keys:
| Constant | Type | Description |
|---|---|---|
DIRECTION_OF_MOVEMENT | Angle | Heading arrow extending from the symbol |
SPEED_LEADER_SCALE | Double | Scales the direction-of-movement line |
QUANTITY | Number | Number of units represented |
STAFF_COMMENTS | String | Free-form staff comment label |
ADDITIONAL_INFORMATION | String | Additional information label |
TYPE | String | Equipment or unit type label |
DATE_TIME_GROUP | String | Date-time group label |
ALTITUDE_DEPTH | String | Altitude or depth display |
UNIQUE_DESIGNATION | String | Unit designation label |
SYMBOL_INDICATOR | TacticalSymbol | Symbol included in a composite tactical graphic |
ECHELON | String | Echelon modifier (also encoded in SIDC positions 11-12) |
isShowGraphicModifiers() and isShowTextModifiers() return true, respectively. Toggle them with setShowGraphicModifiers(boolean) and setShowTextModifiers(boolean).
Tactical Graphics
TacticalGraphic (in gov.nasa.worldwind.symbology) is the interface for vector tactical graphics — lines, areas, and point icons defined by one or more control points rather than a single position. Graphics are created through a TacticalGraphicFactory.
For MIL-STD-2525, use MilStd2525GraphicFactory (in gov.nasa.worldwind.symbology.milstd2525). The factory provides:
createPoint(String sidc, Position position, AVList params)— single-position point graphiccreateGraphic(String sidc, Iterable<? extends Position> positions, AVList params)— multi-position line or area graphiccreateCircle(String sidc, Position center, double radius, AVList params)— circular graphic (returnsTacticalCircle)createQuad(String sidc, Iterable<? extends Position> positions, AVList params)— rectangular graphic (returnsTacticalQuad)createRoute(String sidc, Iterable<? extends TacticalPoint> controlPoints, AVList params)— route connecting point graphics (returnsTacticalRoute)
TacticalGraphics.java — creating line and area graphics
Graphic Sub-interfaces
TacticalGraphic has several specialized sub-interfaces for common shape types:
| Interface | Description |
|---|---|
TacticalPoint | Positioned by a single geographic point |
TacticalCircle | Positioned by a center point and a radius |
TacticalQuad | Rectangle with configurable length and width |
TacticalRoute | A series of TacticalPoint objects connected by lines |
Graphic Attributes
TacticalGraphicAttributes (implemented by BasicTacticalGraphicAttributes) styles tactical graphics with outline material, fill material, opacity, and text modifier properties.
TacticalGraphics.java — applying graphic attributes
TacticalGraphicAttributes methods:
| Method | Description |
|---|---|
setOutlineMaterial(Material) | Color and lighting of the graphic outline |
setInteriorMaterial(Material) | Color and lighting of the graphic fill |
setInteriorOpacity(Double) | Fill opacity (0.0–1.0) |
setOutlineOpacity(Double) | Outline opacity (0.0–1.0) |
setOutlineWidth(Double) | Outline width in pixels |
setScale(Double) | Scale for embedded point symbols in composite graphics |
setTextModifierFont(Font) | Font for text labels |
setTextModifierMaterial(Material) | Color for text labels |
Rendering Symbols
BothTacticalSymbol and TacticalGraphic implement Renderable, so they can be mixed freely in a single RenderableLayer alongside any other WorldWind shapes.
TacticalSymbols.java — rendering multiple symbols in one layer
TacticalSymbols.java — toggling modifiers for all symbols in a layer
Decluttering
When many symbols are displayed at once, text labels can overlap and become unreadable. WorldWind’s declutter system suppresses overlapping labels automatically. TheDeclutterTacticalSymbols example in gov.nasa.worldwindx.examples.symbology demonstrates this feature. Decluttering is integrated into AbstractTacticalSymbol via the DeclutterableText interface — no additional configuration is required; the scene controller handles it during rendering.
MilStd2525TacticalSymbol and MilStd2525GraphicFactory require the MIL-STD-2525 icon image resources at runtime. These are distributed as a separate milstd2525-symbols resource directory (or JAR). Ensure this directory is on the classpath or configure the icon retriever path before instantiating any MIL-STD-2525 symbols. Without it, symbols will render without icon imagery.