When you are working with a georeferenced view and data, it is often convenient to display a grid for quick orientation. You can add this grid to the view as a layer, using a layer builder.

Program: Creating a grid layer shows how to add a grid layer to a view.

Program: Creating a grid layer

LuciadLightspeed offers the following grid layer builders:

  • TLspLonLatGridLayerBuilder creates a latitude-longitude grid formed by evenly spaced meridians and parallels. It allows locating geographically referenced data immediately. This grid is used in all of the Lightspeed view samples that are shipped with LuciadLightspeed. If necessary, you can change the style of the grid lines and labels using the ILspStyler implementation for lon-lat grids, TLspLonLatGridStyler. You can also configure the spacing between the grid lines. Consult the Javadoc TLspLonLatGridLayerBuilder for more information about how to do this.

  • TLspGeorefGridLayerBuilder creates a Georef grid. It is similar to the latitude-longitude grid, but uses a simpler and more concise notation. If necessary, you can change what grid lines and labels are displayed and how they are visualized, by configuring a TLspGeorefGridStyle object on the layer builder. The Georef grid is demonstrated in the grid sample.

  • TLspXYGridLayerBuilder creates a Cartesian grid. It is typically defined in the world reference of the view, which results in an axis-aligned grid.

In addition, the Defense Symbology component adds support for several military grids.