LuciadCPillar 2023.1.04
luciad::MgrsGrid::Builder Class Referencefinal

Builder for a MGRS grid. More...

#include <luciad/layers/grids/mgrs/MgrsGrid.h>

Public Member Functions

 Builder (const Builder &other)
 
 ~Builder ()
 
MgrsGrid build () const
 Returns the MGRS grid. More...
 
BuilderlabelEdgeOffset (double labelEdgeOffset)
 This specifies the offset of the label, away from the edges of the view, in device independent pixels. More...
 
BuilderlabelGridOffset (double labelGridOffset)
 This specifies the offset of the label, in device independent pixels, away from the grid line to which it is attached. More...
 
BuilderlabelOrientation (GridLabelOrientation labelOrientation)
 This specifies the label orientation with respect to the line. More...
 
BuilderlabelPosition (GridLabelPosition labelPosition)
 This specifies the label position with respect to the view. More...
 
BuilderlineLabelPosition (GridLineLabelPosition lineLabelPosition)
 This specifies the label position (with respect to the line) to use for the line labels of the current MGRS type/level/interval combination. More...
 
BuilderprimaryLabelStyle (TextStyle labelStyle)
 Indicates the primary label style to use for the MGRS grid. More...
 
BuilderprimaryLineStyle (LineStyle lineStyle)
 Indicates the primary line style to use for the MGRS grid. More...
 
BuilderscaleMultiplier (double scaleMultiplier)
 Indicates the scale multiplier to use for the MGRS grid scale ranges. More...
 
BuildersecondaryLabelStyle (TextStyle labelStyle)
 Indicates the secondary label style to use for the MGRS grid. More...
 
BuildersecondaryLineStyle (LineStyle lineStyle)
 Indicates the secondary line style to use for the MGRS grid. More...
 
BuildertertiaryLabelStyle (TextStyle labelStyle)
 Indicates the tertiary label style to use for the MGRS grid. More...
 
BuildertertiaryLineStyle (LineStyle lineStyle)
 Indicates the tertiary line style to use for the MGRS grid. More...
 

Detailed Description

Builder for a MGRS grid.

Creates a MGRS grid with predefined scale ranges and default (customizable) styling.

The default styling is expressed in terms of 3 styles: primary, secondary and tertiary. At a given scale range, the most applicable MGRS grid level is styled with the primary style. Higher MGRS levels are styled with secondary and tertiary styles. For example, when zoomed in really far, 1m MGRS squares are styled with the primary style, 10m squares are styled with the secondary style and 100m squares are styled with the tertiary style.

Since
2023.1

Constructor & Destructor Documentation

◆ Builder()

luciad::MgrsGrid::Builder::Builder ( const Builder other)

◆ ~Builder()

luciad::MgrsGrid::Builder::~Builder ( )

Member Function Documentation

◆ build()

MgrsGrid luciad::MgrsGrid::Builder::build ( ) const

Returns the MGRS grid.

See also
luciad::MgrsGrid for information on the constraints for a MGRS grid.
Returns
the MGRS grid.
Exceptions
luciad::LogicExceptionwhen the settings are invalid.

◆ labelEdgeOffset()

Builder & luciad::MgrsGrid::Builder::labelEdgeOffset ( double  labelEdgeOffset)

This specifies the offset of the label, away from the edges of the view, in device independent pixels.

This is applied to all style settings in the grid.

This is optional. Defaults to 6.

Parameters
labelEdgeOffsetthe edge offset value. Must be >= 0.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen an invalid value is passed.
See also
luciad::MgrsGridSetting::Builder::labelEdgeOffset

◆ labelGridOffset()

Builder & luciad::MgrsGrid::Builder::labelGridOffset ( double  labelGridOffset)

This specifies the offset of the label, in device independent pixels, away from the grid line to which it is attached.

This is applied to all style settings in the grid.

This is optional. Defaults to 3.

Parameters
labelGridOffsetthe grid offset value. Must be >= 0.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen an invalid value is passed.
See also
luciad::MgrsGridSetting::Builder::labelGridOffset

◆ labelOrientation()

Builder & luciad::MgrsGrid::Builder::labelOrientation ( GridLabelOrientation  labelOrientation)

This specifies the label orientation with respect to the line.

This is applied to all style settings in the grid.

This is optional. Defaults to AlongLine.

Parameters
labelOrientationthe label orientation.
Returns
this builder.
See also
luciad::MgrsGridSetting::Builder::labelOrientation

◆ labelPosition()

Builder & luciad::MgrsGrid::Builder::labelPosition ( GridLabelPosition  labelPosition)

This specifies the label position with respect to the view.

They can for example be placed at the left or at the right edge of the view. For example, when a label is placed at the east or south side of a line, it is placed at the left or lower edge of the view when using a rectangular projection like Mercator.

This is applied to all style settings in the grid.

This is optional. Defaults to WestAndSouth.

Parameters
labelPositionthe label position.
Returns
this builder.
See also
luciad::MgrsGridSetting::Builder::labelPosition

◆ lineLabelPosition()

Builder & luciad::MgrsGrid::Builder::lineLabelPosition ( GridLineLabelPosition  lineLabelPosition)

This specifies the label position (with respect to the line) to use for the line labels of the current MGRS type/level/interval combination.

They can for example be placed at the left or at the right of the line.

This is applied to all style settings in the grid.

This is optional. Defaults to AboveOrLeft.

Parameters
lineLabelPositionthe line label position.
Returns
this builder.
See also
luciad::MgrsGridSetting::Builder::lineLabelPosition

◆ primaryLabelStyle()

Builder & luciad::MgrsGrid::Builder::primaryLabelStyle ( TextStyle  labelStyle)

Indicates the primary label style to use for the MGRS grid.

Parameters
labelStylethe label style.
Returns
this builder.

◆ primaryLineStyle()

Builder & luciad::MgrsGrid::Builder::primaryLineStyle ( LineStyle  lineStyle)

Indicates the primary line style to use for the MGRS grid.

Parameters
lineStylethe line style.
Returns
this builder.

◆ scaleMultiplier()

Builder & luciad::MgrsGrid::Builder::scaleMultiplier ( double  scaleMultiplier)

Indicates the scale multiplier to use for the MGRS grid scale ranges.

The value must be within the range [0.1, 10.0].

A value larger than 1 makes the grid lines appear later when zooming in. This results in a coarser grid. A value below 1 makes the grid lines appear sooner when zooming in. This results in a finer grid.

Parameters
scaleMultiplierthe scale multiplier.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen an invalid value is passed.

◆ secondaryLabelStyle()

Builder & luciad::MgrsGrid::Builder::secondaryLabelStyle ( TextStyle  labelStyle)

Indicates the secondary label style to use for the MGRS grid.

Parameters
labelStylethe label style.
Returns
this builder.

◆ secondaryLineStyle()

Builder & luciad::MgrsGrid::Builder::secondaryLineStyle ( LineStyle  lineStyle)

Indicates the secondary line style to use for the MGRS grid.

Parameters
lineStylethe line style.
Returns
this builder.

◆ tertiaryLabelStyle()

Builder & luciad::MgrsGrid::Builder::tertiaryLabelStyle ( TextStyle  labelStyle)

Indicates the tertiary label style to use for the MGRS grid.

Parameters
labelStylethe label style.
Returns
this builder.

◆ tertiaryLineStyle()

Builder & luciad::MgrsGrid::Builder::tertiaryLineStyle ( LineStyle  lineStyle)

Indicates the tertiary line style to use for the MGRS grid.

Parameters
lineStylethe line style.
Returns
this builder.