Class TLspGeorefGridStyle

java.lang.Object
com.luciad.view.lightspeed.painter.grid.TLspGeorefGridStyle

public class TLspGeorefGridStyle extends Object

Style that can be used for georef grid layers. This style can be used to style the grid lines as well as the labels.

This style makes it possible to define different styles for all (GeorefLevel and body/label) combinations. For every combination, it as also possible to define different scale intervals, in which different styles are used. This can be used to make lines or labels more prominent when zooming in.

For lines, the following styles are supported:

For labels, the following styles are supported: For overlay components (see TLspGeorefGridOverlayLabelBuilder), the following styles are supported: On top of that, the text formatting can be controlled.

A simple way to use this class is to create a default style, see Builder#defaultGeorefGridStyle(). The samples contain a class that builds a style from the ground up. This sample code can be adjusted according to needs. See samples.lightspeed.grid.GeorefGridStyleFactory GeorefGridStyleFactory.

The following pseudo-code fragment shows how to use this style and its builder.


 TLspGeorefGridStyle style = TLspGeorefGridStyle.newBuilder()
   .body()
     .interval(MAX_ZOOMED_OUT, START_1_DEGREE).customizableStyles(primaryStyles)
     .interval(START_1_DEGREE, START_1_MINUTE).customizableStyles(secondaryStyles)
     .interval(START_1_MINUTE, MAX_ZOOMED_IN).customizableStyles(tertiaryStyles)
   .label(SQUARES_1_DEGREE)
     .interval(MAX_ZOOMED_OUT, START_1_DEGREE).customizableStyles(primaryLabelStyles)
     .interval(START_1_DEGREE, START_1_MINUTE).customizableStyles(secondaryLabelStyles)
     .interval(START_1_MINUTE, MAX_ZOOMED_IN).customizableStyles(tertiaryLabelStyles)
   .body(SQUARES_1_MINUTE)
     .interval(START_1_MINUTE, START_1_OVER_10_MINUTE).customizableStyles(primaryStyles)
     .interval(START_1_OVER_10_MINUTE, START_1_OVER_100_MINUTE).customizableStyles(secondaryStyles)
     .interval(START_1_OVER_100_MINUTE, MAX_ZOOMED_IN).customizableStyles(tertiaryStyles)
   .label(SQUARES_1_MINUTE)
     .interval(START_1_MINUTE, START_1_OVER_10_MINUTE).customizableStyles(primaryLabelStyles).format("X2Y2")
     .interval(START_1_OVER_10_MINUTE, START_1_OVER_100_MINUTE).customizableStyles(secondaryLabelStyles).format("X2Y2")
     .interval(START_1_OVER_100_MINUTE, MAX_ZOOMED_IN).customizableStyles(tertiaryLabelStyles).format("X2Y2")
   .overlay()
     .interval(LABELS_START_100K, LABELS_START_10K).customizableStyles(primaryLabelStyles).format("D d X2Y2")
     .interval(LABELS_START_10K, LABELS_START_1K).customizableStyles(secondaryLabelStyles).format("D d X3Y3")
   ...
   .submit();
 
Since:
2015.0
  • Method Details

    • newBuilder

      public static TLspGeorefGridStyle.Builder<?> newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.
    • asBuilder

      public TLspGeorefGridStyle.Builder<?> asBuilder()
      Creates a new builder initialized with all the properties of this style.
      Returns:
      the new builder.