public final class GridParam extends AbstractLayerParams
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_UNIT_FORMAT
Grid label default format pattern for the unit (if valueFormat is used).
|
GridFontParam |
font
Configuration for the font of the grid labels.
|
java.lang.String |
formatDecimalSeparator
The character used to separate the decimal part (for example ",").
|
java.lang.String |
formatGroupingSeparator
The character used for the thousands separator (for example "'").
|
java.lang.String |
gridColor
The color of the grid points or lines.
|
GridType |
gridType
The type of grid to render.
|
java.lang.String |
haloColor
The color of the halo around grid label text.
|
double |
haloRadius
The size of the halo around the Grid Labels.
|
double |
horizontalYOffset
Apply an Y offset to horizontal grid line labels, relative to the horizontal grid lines.
|
int |
indent
The number of pixels to indent the grid labels from the end of the map.
|
java.lang.String |
labelColor
The color of the grid label text.
|
java.lang.String |
labelFormat
The formatting string used to format the label (for example "%1.2f %s").
|
java.lang.String |
labelProjection
The projection code to use for the labels.
|
java.lang.Boolean |
longitudeFirst
By default the normal axis order as specified in EPSG code will be used when parsing projections.
|
int[] |
numberOfLines
The x,y number of grid lines.
|
double[] |
origin
The x,y point of grid origin.
|
int |
pointsInLine
The number of points that will be in the grid line (if the gridType is LINES).
|
java.lang.Boolean |
renderAsSvg
Indicates if the layer is rendered as SVG.
|
boolean |
rotateLabels
If true (the default), the labels will be rotated to follow the lines they belong to.
|
double[] |
spacing
The x,y spacing between grid lines.
|
java.lang.String |
style
The style name of a style to apply to the features during rendering.
|
java.lang.String |
unitFormat
The formatting string used to format the unit part of a label (for example " %s").
|
java.lang.String |
valueFormat
The formatting string used to format the decimal part of a label (for example "###,###").
|
double |
verticalXOffset
Apply an X offset to the vertical grid line labels, relative to the vertical grid lines.
|
failOnError, name, opacity| Constructor and Description |
|---|
GridParam() |
| Modifier and Type | Method and Description |
|---|---|
org.opengis.referencing.operation.MathTransform |
calculateLabelTransform(org.opengis.referencing.crs.CoordinateReferenceSystem mapCrs)
Determine which math transform to use when creating the coordinate of the label.
|
java.lang.String |
calculateLabelUnit(org.opengis.referencing.crs.CoordinateReferenceSystem mapCrs)
Determine which unit to use when creating grid labels.
|
GridLabelFormat |
getGridLabelFormat() |
void |
postConstruct()
Initialize default values and validate that config is correct.
|
public static final java.lang.String DEFAULT_UNIT_FORMAT
public GridType gridType
public double[] spacing
spacing or numberOfLines
If spacing is defined then origin must also be definedpublic double[] origin
spacing is defined.public int[] numberOfLines
public java.lang.String style
gridColor and haloColor and haloRadius. If
gridType is GridType.POINTS then the style will be crosses with a haloRadius sized
halo around the cross. If GridType.LINES then the style will be a dashed line with no halo.
public java.lang.Boolean renderAsSvg
Configuration.defaultToSvg).public int pointsInLine
public double haloRadius
public java.lang.String haloColor
public java.lang.String labelColor
public java.lang.String gridColor
public GridFontParam font
public int indent
public java.lang.String labelProjection
authority:code
form identifying the projection. By default it will be the same projection as the map.public java.lang.String labelFormat
labelFormat is set, valueFormat, unitFormat and custom
separator characters will be ignored.public java.lang.String valueFormat
labelFormat is set. For the format syntax, see
DecimalFormat.public java.lang.String unitFormat
labelFormat is set. valueFormat must be set to use this parameter.
For the format syntax, see
java.util.Formatter.public java.lang.String formatDecimalSeparator
valueFormat is used. The default is the character of the default locale.public java.lang.String formatGroupingSeparator
valueFormat is used. The default is the character of the default locale.public java.lang.Boolean longitudeFirst
public boolean rotateLabels
public double verticalXOffset
public double horizontalYOffset
public void postConstruct()
public java.lang.String calculateLabelUnit(org.opengis.referencing.crs.CoordinateReferenceSystem mapCrs)
mapCrs - the crs of the map, used if the labelProjection is not defined.public org.opengis.referencing.operation.MathTransform calculateLabelTransform(org.opengis.referencing.crs.CoordinateReferenceSystem mapCrs)
mapCrs - the crs of the map, used if the labelProjection is not defined.public GridLabelFormat getGridLabelFormat()