LuciadCPillar 2023.1.04
|
Builder for a MGRS grid setting. More...
#include <luciad/layers/grids/mgrs/MgrsGrid.h>
Public Member Functions | |
Builder (const Builder &other) | |
~Builder () | |
MgrsGridSetting | build () const |
Returns the MGRS grid setting. More... | |
Builder & | labelEdgeOffset (double labelEdgeOffset) |
This specifies the offset of the label, away from the edges of the view, in device independent pixels. More... | |
Builder & | labelFormat (const std::string &labelFormat) |
The format pattern to use for the labels of the current MGRS. More... | |
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. More... | |
Builder & | labelOrientation (GridLabelOrientation labelOrientation) |
This specifies the label orientation with respect to the line. More... | |
Builder & | labelPosition (GridLabelPosition labelPosition) |
This specifies the label position with respect to the view. More... | |
Builder & | labelStyle (TextStyle labelStyle) |
Indicates the label style to use for this setting. More... | |
Builder & | level (MgrsLevel level) |
Indicates the MGRS level for which this setting applies. More... | |
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. More... | |
Builder & | lineStyle (LineStyle lineStyle) |
Indicates the line style to use for this setting. More... | |
Builder & | scaleRange (MapScale minScale, MapScale maxScale) |
Indicates the scale range for which this setting applies. More... | |
Builder & | type (MgrsType type) |
Indicates the MGRS type for which this setting applies. More... | |
Builder for a MGRS grid setting.
luciad::MgrsGridSetting::Builder::Builder | ( | const Builder & | other | ) |
luciad::MgrsGridSetting::Builder::~Builder | ( | ) |
MgrsGridSetting luciad::MgrsGridSetting::Builder::build | ( | ) | const |
Returns the MGRS grid setting.
Mandatory parameters:
Other parameters are optional.
luciad::LogicException | when not all mandatory parameters are set. |
Builder & luciad::MgrsGridSetting::Builder::labelEdgeOffset | ( | double | labelEdgeOffset | ) |
This specifies the offset of the label, away from the edges of the view, in device independent pixels.
It is applied for the labels of the current MGRS type/level/interval combination.
This is optional. Defaults to 6
.
labelEdgeOffset | the edge offset value. Must be >= 0. |
luciad::InvalidArgumentException | when an invalid value is passed. |
Builder & luciad::MgrsGridSetting::Builder::labelFormat | ( | const std::string & | labelFormat | ) |
The format pattern to use for the labels of the current MGRS.
This pattern can be used to specify MGRS coordinates or UTM/UPS coordinates.
The format in BNF notation (expressions enclosed in []
brackets are optional, expressions enclosed in {}
brackets may be omitted or repeated):
<pattern> ::= [<zone>] [<separator> <band>] [<coordinates>] <zone> ::= "Z" <band> ::= "B" <coordinates> ::= <mgrs_coordinates> | <utm_coordinates> <mgrs_coordinates> ::= [<separator> <id100k>] [<separator> <x> <separator> <y>] <utm_coordinates> ::= [<separator> <u> <separator> <v>] <id100k> ::= "S" <x> ::= "X" <mgrs_precision> <y> ::= "Y" <mgrs_precision> <mgrs_precision> ::= "0" | "1" | "2" | "3" | "4" | "5" <u> ::= "U" <utm_precision> <v> ::= "V" <utm_precision> <utm_precision> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" <separator> ::= { ? any character ? }
For example:
Depending on the label, only some parts of the format string will be used. For example, when displaying grid line labels, only the X or Y part of the format string will be used (e.g. it can be used to specify if "12345"
or "1234"
is displayed).
It is applied for the labels of the current MGRS type/level/interval combination.
This is optional. When not specified a default label format is used, depending on the level.
labelFormat | the label format. |
luciad::InvalidArgumentException | when an invalid value is passed. |
Builder & luciad::MgrsGridSetting::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.
It is applied for the labels of the current MGRS type/level/interval combination.
This is optional. Defaults to 3
.
labelGridOffset | the grid offset value. Must be >= 0. |
luciad::InvalidArgumentException | when an invalid value is passed. |
Builder & luciad::MgrsGridSetting::Builder::labelOrientation | ( | GridLabelOrientation | labelOrientation | ) |
This specifies the label orientation with respect to the line.
It is applied for the labels of the current MGRS type/level/interval combination.
This is optional. Defaults to AlongLine
.
labelOrientation | the label orientation. |
Builder & luciad::MgrsGridSetting::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.
It is applied for the labels of the current MGRS type/level/interval combination.
This is optional. Defaults to WestAndSouth
.
labelPosition | the label position. |
Indicates the label style to use for this setting.
This is optional. Defaults to a white text style with font size 14 and a black halo.
labelStyle | the label style. |
Indicates the MGRS level for which this setting applies.
This is mandatory.
level | the MGRS level. |
Builder & luciad::MgrsGridSetting::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.
It is applied for the labels of the current MGRS type/level/interval combination.
This is optional. Defaults to AboveOrLeft
.
lineLabelPosition | the line label position. |
Indicates the line style to use for this setting.
This is optional. Defaults to a white line style with width 1.
lineStyle | the line style. |
Indicates the scale range for which this setting applies.
This is mandatory.
minScale | the min scale (most zoomed out). |
maxScale | the max scale (most zoomed in). |
luciad::InvalidArgumentException | when the min scale is larger than or equal to the max scale. |