public final class GridParam extends AbstractLayerParams
| Modifier and Type | Field and Description |
|---|---|
GridFontParam |
font
Configuration for the font of the grid labels.
|
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.
|
int |
haloRadius
The size of the halo around the Grid Labels.
|
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 |
labelFomat
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.
|
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.
|
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.
|
void |
postConstruct()
Initialize default values and validate that config is correct.
|
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.defaultStyle).public int pointsInLine
public int 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 labelFomat
public java.lang.Boolean longitudeFirst
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.