All Lightspeed views provide a getImage() method. It returns a BufferedImage containing a screenshot of the map. You can easily save this image to a PNG or JPEG file using ImageIO. To save the image to a georeferenced format such as GeoTIFF, a few additional steps are required:

  1. Compute the geographic bounds of the image

  2. Convert the BufferedImage to an ALcdImage

  3. Add the ALcdImage to an ILcdModel

  4. Encode the ILcdModel using TLcdGeoTIFFModelEncoder

This approach only works for 2D views, where you can use the world reference of the view as the georeference for the GeoTIFF file.

The following code snippet shows how you can export an image of the Lightspeed view to a GeoTIFF file:

// First, get the screenshot.
ALspAWTView view = ...
BufferedImage screenshot = view.getImage();

// Transform the view's pixel bounds to world coordinates.
TLcdXYBounds viewBounds = new TLcdXYBounds(
    0, 0, view.getWidth(), view.getHeight()
TLcdXYZBounds worldBounds = new TLcdXYZBounds();
view.getViewXYZWorldTransformation().viewBounds2worldSFCT(viewBounds, worldBounds);

// Construct the ALcdImage using the view's world reference and the computed bounds.
ALcdImage image = TLcdImageBuilder
    .imageReference((ILcdModelReference) view.getXYZWorldReference())

// Insert the image into a model.
TLcd2DBoundsIndexedModel model = new TLcd2DBoundsIndexedModel(
    new TLcdImageModelDescriptor()
model.addElement(image, ILcdModel.NO_EVENT);

// Save the model to a GeoTIFF.
TLcdGeoTIFFModelEncoder encoder = new TLcdGeoTIFFModelEncoder();
encoder.export(model, "map.tif");