Browse samples per component: LuciadFusion
This is a command-line sample. Click More info for run instructions.
This command-line tool demonstrates how to decode vector data in various formats and export them as a GeoJson file.
Run the sample using the shell script in the samples
folder:
encoder.geojson.bat <input_vector_data> <output_geojson>
The input consists of two parameters: (1) the path to the input vector file (for example, in SHP format), and (2), the path of the output GeoJson file.
This is a command-line sample. Click More info for run instructions.
This command-line tool demonstrates how to decode vector data in various formats and export them as a MIF file.
Run the sample using the shell script in the samples
folder:
encoder.mif.bat <input_vector_data> <output_mif>
The input consists of two parameters: (1) the path to the input vector file (for example, in SHP format), and (2), the path of the output MIF file.
This is a command-line sample. Click More info for run instructions.
This command-line tool demonstrates how to decode rasters in various format and encode them in GeoTIFF format, using a TLcdGeoTIFFModelEncoder.
Run the sample using the shell script in the samples
folder:
encoder.raster.geotiff.bat [options] <input_raster> [...] <output_geotiff>
The input can be a single raster or a list of rasters that lie on a regular grid. The sample automatically figures out the structure of the grid and creates a composite raster that can be saved. The code may be generally useful for creating such composite rasters. They are more efficient to work with than the original unstructured list of rasters, for instance for analysis or for visualization.
The output GeoTIFFs are tiled and multi-leveled, and optionally compressed with JPEG compression. The default tile size is 256x256 pixels. The default number of levels is 5. The JPEG compression quality is a specified value between 0 and 1.
The supported options are:
-levels <n> -tilesize <n> -jpeg <f> -bigtiff
This sample demonstrates how to create your own balloons. Just click any of the domain objects to see an example of a balloon in action. Of the 4 domain objects 3 have a balloon attached to them.
This sample demonstrates how to create your own balloons. Select a domain object to see an example of a balloon in action. Balloons are only shown when one domain object is selected.
One of the objects contains a balloon with a button that can be used to close itself. Another balloon shows an image, and another one shows a text label. The last domain object doesn't have a balloon attached to it.
You can move around balloons by dragging near their border. Balloons can be rescaled by dragging their lower right corner. The can also be closed by clicking the exit icon in the upper right corner.
This sample shows you how to map raster data values to colors using TLcdColorMap
, and how
to interactively customize such a map using TLcdColorMapCustomizer
.
The sample shows elevation data that can be customized using the configuration panel.
The color map customizer allows configuring the following:
This sample demonstrates the ability to paint asynchronously. It shows how to instantiate an asynchronously painted layer and a paint queue that handles the actual painting. The layer is then painted in the background, in a separate thread, so the painting no longer blocks the user interface.
It also illustrates how to automatically assign paint queues to the asynchronous layers by using several paint queue managers which can be activated one-by-one:
The sample shows a number of layers that are painted asynchronously. Layers sharing a paint queue have the same color in the layer control. For illustration purposes, some layers have a fixed paint time, which is indicated in between square brackets.
Try panning and zooming with the mouse wheel. New layer contents are added after the operations. The layer control coloring shows which layers use the same paint queue. Switch the paint manager, and notice how the paint queue assignments change. The synchronous layers (in black) and the unmanaged layer stay the same.
The Translucent checkbox to the right on the map renders all content with a translucency of 0.5. This demonstrates how to modify the state of the wrapped layer.
This sample demonstrates how to calculate and visualize terrain contours as polylines and complex polygons.
Four different contour layers are available:
This sample demonstrates the ability to load and visualize data from sources in
different formats by making use of ILcdModelDecoder
and ILcdGXYLayerFactory
.
A File and a URL action are configured to load data in almost every available format.
The sample uses a composite ILcdModelDecoder
to decode the data into an ILcdModel
.
After this, a composite ILcdGXYLayerFactory
creates a layer that controls how
the ILcdModel
of the loaded data is displayed.
The model decoders and layer factories are retrieved using a service look-up mechanism, and
contain both built-in and sample implementations.
The sample supports images that are not georeferenced if the images are described in a small *.rst
meta-file (see TLcdRasterModelDecoder
).
The sample also includes a custom format (see the package samples.decoder.custom1
) to show how to implement
your own model decoder.
A save action, only available when the sample is run standalone, allows you to save an
ILcdModel
to its file if an ILcdModelEncoder
is set to the ILcdModel
.
Currently this is only done for the custom format.
Open a file or URL by clicking the appropriate toolbar button or by dragging a file or URL onto the map. Load Washington DC spot satellite image ( .rst format ) and Washington DC streets ( .shp format ) and notice how the data overlap. Load mixed.txt, edit the shapes and save the model (only when run standalone).
This sample demonstrates how to display color-coded densities of data, by
means of a TLcdGXYDensityLayer
.
The applet shows a set of flight trajectories above USA, with colors ranging from blue, for quiet regions, to bright white, for busy regions.
Pan and zoom around. Notice that asynchronous painting ensures that the view stays responsive.
This sample demonstrates how to interactively create and edit ILcdShape
objects in an ILcdGXYView
.
The toolbar contains buttons that create several shapes, by using different instances of
the TLcdGXYNewController2
controller.
Each controller has its own controller model, defining the type of
shape to create, in which ILcdGXYLayer to add it and how to add it.
The layers provide the necessary ILcdGXYPainter
and ILcdGXYEditor
instances to properly
render, create and edit any ILcdShape it contains.
Next to this, the panel at the right has the following configuration options:
This sample shows how to implement a multi-mode edit controller i.e. a controller that changes its state when you click on an already selected object. The controller is used in a painter/editor wrapper to change the painter/editor, allowing different editing behavior.
The controller supports 2 modes:
To add the rotation behavior, a support class defines a number of abstract methods that need to be implemented for a specific shape:
The sample shows two polygons that can be rotated in their respective model references. To activate the rotation mode, select an object, and click once more on the object. Rotate the shape by grabbing and dragging one of the rotation handles. Click again on the object to cycle through the available modes. Click on a previously unselected object to reset the editing mode.
This sample illustrates support in LuciadLightspeed for geoids. It shows an image containing the geoid heights of the EGM2008 datum (Earth Gravity Model, 2008). Blue colors indicate that the geoid heights are negative (geoid below the ellipsoid of the WGS84 datum). Green colors indicate that the geoid heights are positive (geoid above the ellipsoid).
The geoid heights are also displayed in a label on the toolbar.
Geoid heights are typically used behind the screens, in calculations with references that have geodetic datums based on geoids. They are relevant for elevation data, for instance, which are commonly defined with respect to a few standardized geoid models. For accurate computations, elevations above a geoid can then be transformed to elevations above an ellipsoid.
Move the mouse and see how the geoid height changes.
This sample demonstrates how to display grid layers in a GXY view.
The following grid layers are included:
ILcdXYWorldReference
. The labels denote meters.
This sample illustrates the use of height providers in LuciadLightspeed. It shows a raster containing height data. The height values of the data under the mouse cursor are displayed in a label on the toolbar.
The sample uses a view height provider to retrieve height values.
Move the mouse over the raster and see how the height values change. Moving the mouse outside the raster will indicate that no height data could be found.
This sample demonstrates how to highlight domain objects. A custom controller looks at the domain objects under the mouse cursor and informs the relevant layer that an object should be highlighted.
Hover above the cities and states. The city or state under the mouse will change color.
This sample contains an implementation of the ILcdGXYPainter
and
ILcdGXYEditor
interfaces for a new shape, a hippodrome,
which consists of two half circles connected by two lines. Instead of
using composition this sample demonstrates how to create a painter/editor
from scratch.
Note that this is sample code to demonstrate writing painters. If you need to model a hippodrome,
please refer to our ILcdGeoBuffer
implementations.
The shape is defined by two points and a width. An XY and a lonlat shape is provided both of which can be handled by the painter/editor taking into account some precaution for the geodetic shape.
The painter supports painting in the following modes:
This sample is mainly intended as a developer's guide to construct painters and editors from scratch. To create a new hippodrome, click on either of the two buttons in the toolbar. To edit a hippodrome,
This sample demonstrates LuciadLightspeed's abilities to display icons. These icons, painted by
a TLcdGXYIconPainter
can be scaled using a world or pixel scaling mode. They can also
return an anchor point, which gives them an offset. The sample also demonstrates oriented
icons.
You can dynamically change the scale and scale mode by using the controls in the 'Icon scaling options' panel. The pin icons represent cities. Notice how the tip of the pin is anchored to the city. Notice how every airplane has a different rotation: the rotation is automatically retrieved from the domain object.
This sample demonstrates the creation and usage of labeling algorithms and labeling algorithm
wrappers. MyLabelingAlgorithm
is a labeling algorithm that tries to place all labels on the
domain object's anchor point.
There are three wrappers that can be combined with this algorithm and each other.
RotationAlgorithmWrapper
: Rotates all labels
MorePositionsAlgorithmWrapper
: Creates extra label placements to be tried by offsetting the label by a few
pixels in each direction.
LabelDetailAlgorithmWrapper
: Adjusts the size of the font and amount of information to create more label
placement possibilities.
After starting the sample, it is possible to choose between two labeling algorithms:
The sample algorithm SampleLabelingAlgorithm
and a default labeling algorithm. Use the
check boxes to enable/disable using more possible positions or changing the font size
during labeling. Also moving the slider adjusts the rotation of all labels.
This sample demonstrates how labels can be made interactive. The labels can be edited in the sense that they can be moved to a new location, as well as in the sense that they offer the user an interactive component that can be used to edit information related to the domain objects.
Move the mouse over a label of a city. An interactive, editable label will be shown instead of the regular label. You can enter a comment for the labeled city in the text field. To apply the changes, press the Enter key or press the green tick mark at the top of the interactive label. To cancel the outstanding changes, press the red 'cancel' icon at the top of the label or press the Escape key.
The interactive label can be moved by clicking and dragging on the title bar of the interactive label.
This sample demonstrates LuciadLightspeed's abilities to display icons at a certain offset. These
icons, painted by a regular ILcdGXYPainter
, are offset with respect to the domain object.
This offset can be dynamically changed using the mouse.
It also shows how the used labeling algorithm can be configured to drop labels together.
You can dynamically change the offset of the icon by selecting a city, and then dragging the icon while keeping the 'Control' button pressed.
This sample demonstrates the asynchronous label placer and the default labeling algorithms.
Labeling algorithms take into account the
labels that are already placed to avoid overlap.
An ILcdGXYLayer
will therefore most likely have less labels painted
when it is at the bottom than when it is at the top of the ILcdGXYView
.
To see the effects of the labeling algorithms select a layer, by clicking it in the layer control and:
This sample demonstrates LuciadLightspeed's abilities to paint and label streets. Highways are labeled using an icon, while city streets (zoom in on Washington DC) are labeled using text labels.
Zoom in and out to see multiple levels of detail on the map. The USA region contains highway data, and the Washington DC region contains streets data.
This sample shows you LuciadLightspeed's capabilities regarding the magnetic north.
The magnetic north does not coincide with the true north. The difference between the magnetic and true north is called magnetic declination and depends on your position in space and time. There are different mathematical models to calculate and predict the magnetic north, each with their own lifespan. LuciadLightspeed comes with the two most popular models: WMM and IGRF.
The sample shows a compass control for the magnetic north, and iso lines of constant magnetic north declination.
Click on any place on the map to center on that point and rotate the map so that the top points towards the magnetic north. Notice that the magnetic north compass will point straight up. Right-click to reset the custom rotation again. Zoom in on a magnetic declination line. The readout at the bottom of the map shows the exact declination value for the mouse location. The magnetic value at the center of the map should be the difference between both compasses.
This sample demonstrates how to create, customize, add on map navigation controls over a 2D view.
The default controls are in the top right corner when you run the sample. Drag the outer ring of the upper part to rotate the view (you can hold down the CTRL (CMD on Mac OS) button to constrain rotation to multiples of 15 degrees). Click on the North symbol of the outer ring to return the view to the original rotation. Press and hold anywhere in the circle with the hand symbol to pan the view. The lower part allows you to zoom in and out.
On the left you can find a customized configuration. In the alternative configuration, the controls are split and the two sub-components are added in different places. Furthermore, the zoom component is now always emphasized, not only when the mouse is over it and the compass component can be relocated by dragging it with the right mouse button pressed.
This is a command-line sample. Click More info for run instructions.
This command-line tool demonstrates how to create an off-screen view, display some decoded data in it, and save the result as a GeoTIFF file.
Run the sample using the shell script in the samples
folder:
gxy.offscreen.bat <input_file> <output_geotiff>
The input data can be in a variety of formats: SHP, MIF, MAP, GeoTIFF, etc. The output GeoTIFFs are 1024x1024 pixels, tiled (256x256 pixels) and multi-leveled (3 levels), and compressed with a lossless compression scheme. All of these settings can be changed in the sample code.
This sample demonstrates the use of a TLcdGXYOverviewController
and the
sharing of layers between multiple ILcdGXYView objects.
It consists of one main ILcdGXYView
(TLcdMapJPanel
) in the center and an overview map
(TLcdMapJPanel
) in the top right. The overview map remains focused on the USA and
also displays a Rectangle that corresponds as much as possible to the area visible
in the main view. Dragging the Rectangle in the overview or creating a new one makes
the main view display data that are in the Rectangle. This Rectangle is updated
each time the visible area in the main view changes (e.g. when panning or zooming).
The overview displays the same ILcdModels
using the same ILcdGXYLayers
used in the main view.
Since an ILcdGXYView
automatically listens to any property change of its
ILcdGXYLayer objects, any change of those properties via the layer control
will show in both views.
Drag the Rectangle in the overview or create a new one. Pan and zoom in the main view: the Rectangle overview will update itself automatically. Remove a layer and notice that it is removed from both views.
This sample shows how to paint polylines and polygons with rounded corners and how to change the stroke and fill style.
The functionality to paint a polyline or polygon with rounded corners is provided by
TLcdGXYRoundedPointListPainter
.
To fill shapes with a solid color, TLcdGXYPainterColorStyle
is used.
To fill shapes with a hatched pattern, TLcdGXYHatchedFillStyle
is used.
To render outlines with a simple, dashed stroke, TLcdStrokeLineStyle
is used.
To render the shapes with a pattern-based stroke, TLcdGXYComplexStroke
is used.
This java.awt.Stroke
implementation allows to use an AWT Shape array as pattern to
render a shape.
The sample also illustrates halo effects.
A halo is an outline of constant width and color around shapes or text, which is typically drawn in
a contrasting color to ensure that the shapes or text are clearly visible on any background.
For shapes, the halo effect is obtained by wrapping an ILcdGXYPainter
(in this case,
the TLcdGXYRoundedPointListPainter
) into a TLcdGXYHaloPainter
.
This sample demonstrates how to print a component containing a view,
using the TLcdGXYViewComponentPrintable
.
The sample creates a page layout containing the view and some decorations. You can preview the page or print it directly using the buttons in the toolbar.
This sample demonstrates the ability to combine parametric rectification - using camera and terrain information - and non-parametric rectification - using user-defined tie-points.
The left panel displays a non-modified version of the image currently being processed, together with a set of tie points. The right panel displays several layers, from bottom to top:
The default data is a simulated satellite photo of the city of Ithaca, NY. Due to the slanted viewing direction, the position of the original picture is distorted by a variable amount compared to the real position. The size of the distortion depends on the local terrain elevation - this can be verified by comparing the position of roads in the original raster with their actual position displayed by layer "109rds".
By taking into account the viewing direction and the variable terrain elevation, the sample creates an initial orthorectified version of the raster, which corrects most of the positioning errors. The user may further correct a copy of this raster by fine-tuning a set of tie points.
An initial set of tie points are shown in the left and in the right panels. Selecting a point in one panel will display the corresponding tie point in the other panel. Tie points in both panels can be dragged to other locations. This will trigger a remapping of the corrected image in the right panel, so that the tie points appear in approximately the same location relative to the raster.
New tie points can be added in the left panel by selecting the "Create new tie point" controller. Every time a new point is added in the left panel, a corresponding tie point is added to the right panel, at approximately the same raster coordinates (a small difference may be observed for highly warped rasters).
Existing tie points can be deleted by right-clicking on them and choosing "Delete" from the context menu. If fewer than 3 points are available, the raster is no longer updated.
By default, the mapping is done using a polynomial function. You may choose a rational function or a projective function instead, by selecting the "Edit raster projection parameters" action. You can also choose the maximum degree of the polynomial(s) used by the selected function. Note that polynomials of higher degree (3 or 4) are highly unstable and may produce strange warping effects. The number of required tie point pairs varies with the degree of the polynomial(s). If an insufficient number of tie points is defined, the function will automatically decrease the degree(s) used.
When you are satisfied with the rectification you may save a re-sampled version of the raster using the reference of the right-panel view using the "Save the raster in view's reference" button.
The sample can open existing single-level referenced GeoTIFF files, or non-referenced images (tif, png, gif, bmp, jpg). If the image is not georeferenced, it is placed at a default location, together with four initial tie points in the corners.
The open and save options are not available when the sample is running in a browser.
This sample shows how to programmatically create and display a model.
It reveals how to create an ILcdModel
, how to populate it with ILcdShape
objects,
and how to display that data in an ILcdGXYLayer
on the ILcdGXYView
.
The sample shows a polyline, a polygon, and a point visualized by an icon. Try selecting and editing the shapes.
This sample demonstrates how to create a composite ILcd2DEditableShape
and a
suitable ILcdGXYPainter
and ILcdGXYEditor
for that ILcd2DEditableShape
.
The class ShortestDistanceShape
is a composition of a TLcdLonLatPolyline
and
a TLcdLonLatPoint
around this polyline. The class ShortestDistanceShape
knows
how to calculate the ILcdPoint
on the geodesic TLcdLonLatPolyline that is the
closest to the TLcdLonLatPoint
.
The class ShortestDistancePainter implements ILcdGXYPainter
and ILcdGXYEditor
and is used for painting and editing ShortestDistanceShape
objects.
Existing painters for the composed shape object are used for painting,
TLcdGXYIconPainter
for the TLcdLonLatPoint
and TLcdGXYPointListPainter
for
the TLcdLonLatPolyline
. For painting the shortest distance path of the
TLcdLonLatPoint
to the TLcdLonLatPolyline
the utility ILcdGXYPen
is used.
The painter-editor allows to move the TLcdLonLatPoint
or a point of the
TLcdLonLatPolyline
of the ShortestDistanceShape
object to any location while
constantly showing the shortest distance path of the TLcdLonLatPoint
to
the TLcdLonLatPolyline
.
This sample shows how to visualize shapes based on their domain object properties. A custom painter provider displays counties as polygons that are colored according to population density. Icon-based labels show different size rectangles depending on the population change.
You can verify the visualization by double-clicking on a shape to examine its properties.
This is a sample for displaying an ILcdModel
's elements in a JTable
.
All the domain objects implement ILcdDataObject
, which means they have a data type with
a set of properties associated to each of them.
We load several ILcdModel
which are displayed/represented in both
the TLcdMapJPanel
and the JTabbedPane
(i.e. each ILcdModel
is represented
in 2 different views). For each ILcdModel
, there is a
corresponding ILcdGXYLayer
in the map and a JTable
in the JTabbedPane
.
The column names of each JTable
correspond to the attributes names,
the rows correspond to the attribute values.
A mediator is used to synchronize the map and table selections.
This sample contains a custom implementation of ILcdGXYController
, which
displays tooltips for objects under the cursor. The text of the tooltips is
obtained via the ILcdDataObject
interface. The applyOnInteract2DBounds()
method of ILcd2DBoundsIndexedModel
is used to locate the object under the
mouse cursor.
Hover over a city or state and a tooltip will pop up after a short while.
This sample demonstrates the touch-based navigation, selection and ruler controllers in a GXY view. The controllers are shown in the toolbar at the top. The leftmost controller is a context sensitive selection and navigation controller.
The second controller only deals with navigation. It features one finger panning, and two finger panning, zooming and rotating (at the same time).
The third is a ruler controller. It works similar to the mouse based ruler controller, creating a polyline on the map that will display the length of each segment as well as the total length.
This sample features large buttons to allow easy manipulation with fingers instead of a mouse as input device.
Using the select controller, you can touch objects to select them, pan around by dragging the map, or zoom and pan by dragging two fingers. A number of modifier buttons are available to change the selection behavior:
For the pan controller, drag one finger to pan, and two fingers to simultaneously pan, zoom and rotate the map.
To add points to the ruler controller's measurement, touch and lift your finger. Here as well a number of buttons are added to the map:
This sample demonstrates how to create new ILcdShape objects and edit
existing ILcdShape
objects in an ILcdGXYView
using a touch device.
The functionality available here is very similar to the functionality demonstrated by the editing sample. The main difference is that the controllers now interpret touch input instead of mouse input. This allows you for instance to translate an object using the edit controller with one finger and pan the view with another finger at the same time. The same goes for the controllers creating objects. Another issue is the lack of modifier buttons (on keyboard and mouse). To compensate the touch controllers have been extended with some on-map buttons. The edit controller has:
This sample demonstrates how TLcdTouchEvents
can be created from hardware events. The sample
simulates touch hardware generating hardware events. These events are intercepted and
converted into touch events that can be used by LuciadLightspeed. After that they are dispatched.
After opening the sample, touch events will be generated automatically. They pan, zoom and rotate the view.
This sample demonstrates the ability to display a geodetic location which can
be expressed based on different ILcdGeodeticDatum
and express its coordinates
in some commonly used grid reference systems and some lon lat formats.
Move the displayed icon and see how its coordinates change.
There are two text fields which contain the geodetic latitude and longitude respectively. The latitude and the longitude are represented in a certain format which can be changed. Values have to be entered in this format too. The geodetic coordinate is with respect to a certain geodetic datum which can be altered. In the grid coordinates panel are the (x,y) grid coordinates of this geodetic LatLon coordinate according to some commonly used grid coordinate systems.
Changing the geodetic datum or the UTM zone will affect only the geodetic coordinate or the UTM coordinate. Since the geodetic datum of the projection in the map component is kept the same as the geodetic datum of the grid calculator, the icon will move slightly too.
This sample contains a custom implementation of ILcdGXYController
, which
transforms a rectangle dragged by the user (in view coordinates) into
model coordinates. The mouse location is also
converted into an arbitrary model reference (a grid reference with a
polar projection for the north pole).
Drag a rectangle on the map, and see the coordinates of its counter part in model coordinates, below the map. The last mouse drag or mouse click location is also expressed in another model reference.
This sample demonstrates the undo support of LuciadLightspeed. It is based on the "shapes" sample and makes it possible to undo changes made to the domain objects.
To witness the undo support, perform the following steps:
This sample demonstrates the use of the vertical view package. The 2D view in the upper part contains two layers: a background layer with a map of the world countries and a layer that contains two flights. Each flight is modeled as a list of 3D points. The 2D view only uses the first two coordinates(X,Y) of each of the points.
The vertical view in the lower part is used to display the vertical profile of
the flight that is selected in the 2D view. Apart from this profile,
a number of sub-profiles associated to it can be shown in a vertical view.
In this case, only one sub-profile is associated to the view: the air route.
FlightVVModel
, an implementation of ILcdVVModel
holds the main-profile points
and the information about the sub-profile.
Select a flight. A vertical marker is shown in both views. Change the height of the flight by dragging its points up or down. You can zoom the X and Y axes by using the sliders to the right and at the bottom. You can disregard flight points at the left or right of the flight using the sliders at the top. Finally, the panel at the right allows you to select the altitude unit.
This sample demonstrates the use of TLcdEarthTileRepositoryPreprocessor
. This sample
provides a simple user interface for creating, loading and saving 3D terrain
metadata and preprocessing it to an Earth tile repository.
To preprocess data as a 3D terrain to an Earth tile repository you need to:
The terrain metadata consists of a number of assets (that is source data files) and a geographic reference. Add some assets to the metadata by using the button at the bottom of the panel. You can either select individual files that need to be preprocessed or a directory that contains the files that need to be preprocessed. Once the assets are loaded they will appear in the metadata panel and their bounding box will appear on the map. For image assets you can also optionally set a clipping shape to limit the preprocessed part. This can for example be used avoid preprocessing a border that is present in the asset. You can save the terrain metadata (for example for using with the Earth On-the-fly sample) using the button below the map. Finally you can change the geographic reference of the terrain using the combo box at the top of the metadata panel. Typically this geographic reference is the one that will most often be used when visualizing the terrain repository.
The repository where the assets should be preprocessed to must be configured before the preprocessor can be started. You can optionally also change the data type that must be preprocessed and enable texture transparency. After pressing the start button the preprocessing progress can be tracked in the progress panel and on the map. The preprocessor can be stopped at any time and resumed again using the buttons in the progress panel.
This applet demonstrates the ability to filter data using the OGC Filter API. A layer showing earthquakes is added to the view on which a filter is configured. The layer filter is created from an OGC filter, which is created from a combination of three OGC conditions: 'a less than' for the magnitude, a temporal for the time period and a bounding box condition of a country.
The OGC conditions are expressed programmatically using the OGC Filter API. The creation of the OGC conditions is done in EarthQuakeFilterModel#createCombinedCondition. If there is a change in one of the parameters for the OGC conditions, a new OGC filter is created and converted to an ILcdFiltered by means of a filter evaluator. This conversion code can be found in MainPanel#addData.
Use the controls in the filter configuration panel to adjust the different parameters of the filter.
This applet demonstrates the ability to filter GML data using the OGC Filter XML decoding and evaluation facilities.
It displays all the countries of the world and the same data, with a filter applied in another layer.
Enter a filter manually in the text area at the bottom or click the load button to load a predefined filter from the list.
Click the apply button to apply the filter to the countries layer. The filtered layer will display all countries that pass the filter.
Double-click on a country in order to view its related features and compare them to the filter.
This is a command-line sample. Click More info for run instructions.
This command-line sample demonstrates how to fuse a single coverage from one or more input data sources. It illustrates both basic and advanced usage of the fusion engine. It has extension points that allow subclasses to customize it further. It can be used as a stand-alone command-line fusion tool in scripts. Because of 32-bit VM restrictions, it uses a default maximum heap of 768 MB (-Xmx768m), which may be too limited to fuse large data sets such as the NOAA ENCs. For a 64-bit VM, you may want set this to higher value in the sample's startup script, for example -Xmx1500m.
Run the sample using the shell script in the samples
folder:
fusion.engine.bat -s:<source> -t:<target-tile-store>
For a detailed list of command-line options, run the sample without arguments.
The minimal arguments are the input data source(s) and the target Tile Store URI:
"-s:<source>"
The input data source(s), which may be a single file or a directory.
"-t:<target-tile-store>"
The target Tile Store, which may be a local directory ("file:" URI) or a remote Tile Store ("http:" URI).
For example, "fusion.engine.sh -s:/my/input/data/sources -t:http://my.server:8081/LuciadFusion/lts"
will create a coverage using all the input data found in /my/input/data/sources
.
The coverage and assets will have a generated UUID as ID, and no name.
Typically, you want to specify some options for assets and coverage. Options for assets start with
"-a:"
, options for the coverage start with "-c:"
.
For example,
"fusion.engine.sh -s[0]:/my/input/data/background.tif" -s[1]:/my/input/data/california.jp2
-a[0]:id:background.tif -a[1]:id:california.jp2 -c:id:california
will create a coverage "california" from two input data sources. The indexes determine the order: "california.jp2"
will be on top of "background.tif".
When you use this sample in a script, for example to regularly re-fuse a specific coverage, you may want to consider
the "-overwrite"
option.
Without it, fusion would resume from checkpoint if a previous fusion was unfinished, or do nothing if a previous
fusion was finished.
This is a command-line sample. Click More info for run instructions.
This command-line sample demonstrates how to plug in a custom raster format into the fusion engine.
It illustrates how support for ArcInfo ASCII Grid can be added by extending the
fusion.engine
sample.
Run the sample using the shell script in the samples
folder:
fusion.engine.format.bat -s:<source> -t:<target-tile-store>
For a detailed list of command-line options, run the sample without arguments.
See also the fusion.engine
sample for detailed instructions.
The minimal arguments are the input data source(s) and the target Tile Store URI:
"-s:<source>"
The input data source(s), which may be a single file or a directory.
"-t:<target-tile-store>"
The target Tile Store, which may be a local directory ("file:" URI) or a remote Tile Store ("http:" URI).
For example, "fusion.engine.sh -s:/my/input/data/sources.asc -t:http://my.server:8081/LuciadFusion/lts"
will create a coverage using all the input data found in /my/input/data/sources
.
The coverage and assets will have a generated UUID as ID, and no name.
This is a command-line sample. Click More info for run instructions.
This command-line sample demonstrates how to pre-process one or more input files into a single point cloud. It illustrates both basic usage of the pre-processor. It can be used as a stand-alone command-line tool in scripts. Because of 32-bit VM restrictions, it uses a default maximum heap of 768 MB (-Xmx768m), which may be too limited to process large data sets. For a 64-bit VM, you may want set this to higher value in the sample's startup script, for example -Xmx2g.
Run the sample using the shell script in the samples
folder:
fusion.pointcloud.bat --input=<source> --output=<target-directory>
For a detailed list of command-line options, run the sample without arguments.
The minimal arguments are the input data source(s) and the target path:
"--input=<source>"
The input source, which may be a single file or a directory.
"--output=<target>"
The target directory, which will be created if necessary.
For example, "fusion.pointcloud.sh --input=/my/input/data/sources --target=/my/output/pointcloud"
will create a point cloud store using all the input data found in /my/input/data/sources
.
The output of this process can be imported into LuciadFusion Studio by adding the entire output directory as a "Data Root". Once the data root is crawled, you should be able to see a new data entry that represents the preprocesed dataset in your "Data" tab. To serve it, create a new Service using this dataset, and set the service type to "OGC 3D Tiles".
The preprocessed output can also be opened directly in a Lightspeed-based client such as Lucy. To do this, open the "tileset.json" found in the root of the output directory.
When you use this sample in a script, for example to regularly re-fuse a specific coverage, you may want to consider removing the target directory first. Without this, the preprocessor would add data from the input sources to the existing point cloud, or do nothing if all of the input sources were already to the point cloud previously.
This is a command-line sample. Click More info for run instructions.
This sample illustrates how to data in SHP, MIF or MAP formats can be transformed and exported as GML31 data.
Run the sample using the shell script in the samples
folder:
encoder.gml3.bat [-gmlschema gmlSchema] [-xmlschema xmlSchema] [-namespace namespace] vectorFile resultFile
These are the parameters to pass:
This is a command-line sample. Click More info for run instructions.
This sample uses the FlightPlan data model from the LuciadLightspeed fundamentals as source model. It shows how this data model can be transformed into a GML data model. It shows how the GML application schema can be generated. It then encodes a model containing flight plans as a GML document. Then this document is decoded back into a model containing flight plans.
Run the sample using the shell script in the samples
folder:
transformation.gml.bat
This is a command-line sample. Click More info for run instructions.
This command-line tool demonstrates how to decode rasters in various formats and encode them in JPEG2000 format, using a TLcdJPEG2000ModelEncoder.
Run the sample using the shell script in the samples
folder:
encoder.raster.jpeg2000.bat [options] <input_raster> <output_jpeg2000>
The supported options are:
-levels <n> -layers <n> -quality <f> -lossless -tilesize <width> <height>
This sample demonstrates how to load and display KML data on a map.
The sample will automatically load a basic KML file containing most KML features, and fit the map on the data.
The model content tree next to the map is a tree-based structure showing the contents of all KML files that are currently displayed on the map.
Objects can be selected either via the map or via the model content tree. When an object is selected a balloon will pop-up, displaying additional information on the object.
The sample will automatically resolve network links in KML files, and refresh the model contents if a refresh mode is specified in the link.
When KML files containing time information (timestamp, timespan) are loaded, a time toolbar will become visible, showing the time interval for which data is available. The time slider can be used to control which data should be shown on the map.
This sample demonstrates how to load and display KML data on a map.
The sample will automatically load two KML files:
The model content tree next to the map is a tree-based structure showing the contents of all KML files that are currently displayed on the map.
Objects can be selected either via the map or via the model content tree. When an object is selected a balloon will pop-up, displaying additional information on the object.
The sample will automatically resolve network links in KML files, and refresh the model contents if a refresh mode is specified in the link.
When KML files containing time information (timestamp, timespan) are loaded, a time toolbar will become visible, showing the time interval for which data is available. The time slider can be used to control which data should be shown on the map.
This is a command-line sample. Click More info for run instructions.
This sample demonstrates how to convert models into KML. The KML format is particularly useful for sharing a situational map with a broader set of stakeholders, who do not necessarily have access to LuciadLightspeed, but can open KML data in other map visualization tools. LuciadLightspeed allows you to convert map data into KML. This sample illustrates one way to convert vector data into KML and customize the conversion. It gives you full control of the style and the geometry information that will be converted in the KML model. The model encoder TLcdKML22ModelEncoder can then export the KML model.
Run the sample using the shell script in the samples
folder:
encoder.kml22.bat
Run the sample to convert the files and the in-memory model into KML. The three new KML files are located in the Kml directory inside the data resources folder for the samples. You can visualize the KML files in the general decoder samples, the KML decoder samples, or any KML visualization tool.
First, the KML encoding sample decodes a SHP file representing tracks, and converts a subset of the tracks into a KML model. The KML model is then encoded in a file. Another SHP file representing the USA states is also decoded, and some states are encoded in KML. Next, the sample creates an in-memory model of airspaces. Each airspace is an extruded shape with a circle or a polygon as its base shape. The airspace model is also converted into KML and encoded.
This sample illustrates how Lidar data from .las files can be visualized in a Lightspeed view.
With this sample, you can open one or more .las files and apply different styling.
The following styling options are available if at least one layer supports it:
Additionally, a shading technique to enhance depth perception is enabled by default. Using the controls in the panel, the settings can be changed:
Open .las files using the "Open File" icon, or by dragging files onto the sample.
Change the styling and filtering using the panel on the right. The styling will be applied to the layers that support it. Layers that don't support it use Height styling.
Change the depth perception settings using the panel on the right. The settings will be applied to all layers.
This sample demonstrates how to introduce clustering in a GXY application
using
TLcdTransformingModelFactory
and
TLcdClusteringTransformer
.
The sample contains a large number of recorded humanitarian events in Africa. When a number of events are close together (in view-space), they become hard to distinguish. Therefore a cluster is shown instead of the individual events.
This sample uses two different clustering strategies:
ILcdClassifier
on the transformer.
This scale-dependent clustering behavior is created by calling the
TLcdClusteringTransformer.createScaleDependent
method.
Navigate around the map and see the clusters update when necessary.
This sample demonstrates how to display balloons in an
ILspView
using
TLspBalloonManager
.
The sample generates four icons, each of which contains a balloon. A balloon is made visible when a single object is selected. The balloon contains an icon and an editable text field containing the position of the icon in geodetic coordinates.
For a more extensive description of the balloon manager API see the developers' guide.
Select one of the icons. A balloon will appear. Editing the coordinate panel in the balloon and hitting return will change the location of the icon. The balloon arrow also gets relocated with this operation. Balloons are only shown when one domain object is selected.
This sample demonstrates how to introduce clustering in a Lightspeed application
using
TLcdTransformingModelFactory
and
TLcdClusteringTransformer
.
The sample contains a large number of recorded humanitarian events in Africa. When a number of events are close together (in view-space), they become hard to distinguish. Therefore a cluster is shown instead of the individual events. Selecting a cluster also selects and displays its contained elements.
This sample uses two different clustering strategies:
ILcdClassifier
on the transformer.
This scale-dependent clustering behavior is created by calling the
TLcdClusteringTransformer.createScaleDependent
method.
Navigate around the map and see the clusters update when necessary. A cluster's contained elements can be displayed by selecting it. Moving a cluster also moves the contained elements.
This sample demonstrates how to implement and use a custom controller. The first controller (active by default) shows an information panel when hovering over an object. The second controller allows you to navigate using arrow and other keys.
When using the first controller, use the mouse to hover over some of the counties in the USA and an information panel will pop-up with some information about the county. When using the second controller, the following keys can be used:
This sample demonstrates how to add support for painting and editing a custom shape: the hippodrome. The hippodrome consists of two 180 degrees arcs and two lines connecting these arcs and at a given distance from the line between the center points (width).
Please refer to the documented sample code and the developer's guide for more information.
This sample is an adaptation of the Editing sample (which illustrates the editing and creation capabilities of the editors that are available in the Lightspeed API).
The Shapes layer in this sample has a regular shape painter (TLspShapePainter
) to
paint the
shapes' bodies.
In addition, this sample adds another shape painter with a different styler that
is identified by a
custom paint representation. This special styler provides the painter with the bounds
of the shape as opposed to the shape itself. Hence, each shape is painted twice: once
using its own geometry and once using the bounds geometry.
For more detailed information on how to create an application which uses custom paint representations, see the developer's guide or the documented source code of this sample.
Try editing and creating new shapes and notice how both paint representations (the shape itself and its bounds) are painted and updated.
This sample demostrates how LuciadLightspeed's animation framework can be used to animate the style of an object. The animation is implemented in AnimatedAreaStyler, a custom ILspStyler implementation which uses an ILcdAnimation to update style properties and fire style change events when needed.
When the sample is started, the style of one of the countries should automatically be animated.
This sample illustrates how to customize the visualization of editing handles using some custom stylers. This sample uses two stylers to:
Select an ellipse in the sample. This should activate editing on that shape, and you should see the following customizations:
This sample demonstrates how LuciadLightspeed's animation and style frameworks can be used to highlight and show custom animations for the object under the cursor.
The sample consists of a layer containing shapes for each country. When the mouse is moved over a country, a pie chart appears showing the demographic distribution in that country.
This layer has two stylers:
AnimatedHighlightAreaShapeStyler
which takes care of the styling of the countries/pie charts themselves ( fill/line colors )
AnimatedHighlightAreaLabelStyler
which takes care of the styling of the labels of the countries/pie charts
ALcdAnimationManager
and
ALcdAnimation
in combination with a mouse
adapter to progressively adjust the styles of each object.
The pie charts are created and styled by passing their style and geometry to a
ALspStyleCollector
along with the object to which they belong.
Move your cursor over the different countries of the world. When the cursor is on top of a country, a pie chart will gradually rise and display population statistics specific of that country. When the cursor moves away from the highlighted country, the pie chart for that country will gradually vanish.
This sample demonstrates how to implement "thematic mapping", i.e. to adjust the style of an object to that object's attributes.
The sample consists of a layer of country shapes on which custom colors are being styled.
The colors for the countries are linearly interpolated between a minimum color and a maximum color
chosen by the user, with the population of each country as a weight for the interpolation.
More populated areas will therefore tend towards the maximum color, while less populated
areas will tend towards the minimum color. This styling is accomplished by using a custom
styler implementation, namely a
samples.lightspeed.customization.style.thematic.CountryStyler
Click on either the left or right gradient button on the toolbar to set the lowest or highest population color respectively. You will notice that the color of the countries is an interpolated value between those two colors, based on their population.
This sample adds functionality to view the TLcdDataModel of an ILcdModel that has an ILcdDataModelDescriptor as a model descriptor.
The 'Data Model Tree' is visible on start-up, showing the data model tree for the currently selected layer.
The data model tree contains all declared TLcdDataType instances of the TLcdDataModel. Each TLcdDataType contains a series of properties and TLcdDataProperties.
All TLcdDataTypes that are also model element TLcdDataType instances are highlighted in a special color.
Note that TLcdDataModel instances can define data types that are cyclical. There is no explicit check for this issue in the sample code, as it was not needed for this special case.
Open some random files and see how the data model tree gets updated each time you select a new layer which has an ILcdModelDescriptor as model descriptor on its model.
This sample shows how to create a day/night map in a Lightspeed view. The areas in civil/nautical/astronomical twilight and night are drawn in progressively darker shades. An icon on the map indicates the point where the sun is directly overhead. The day/night map animates in fast time over a period of 1 year.
The day/night map is constructed as follows:
The sample automatically shows an animated day/night map. A label on the top edge of the map shows the current date and time of the map.
The hardware capability report sample generates a detailed list of the hardware related
capabilities of the device running the sample. The sample generates a hardware
report with the OpenGL and OpenCL capabilities of the system using the
com.luciad.view.lightspeed.util.TLspPlatformInfo
utility class.
Reported capabilities include:
When contacting Luciad support about any Lightspeed-related problems, it is always appreciated if you include the report generated by this sample.
This sample demonstrates the ability to load and visualize data from sources in different formats
on a Lightspeed map using ILcdModelDecoder
and ILspLayerFactory
.
A File and a URL action are configured to load data in almost every available format.
The sample uses a composite ILcdModelDecoder
to decode the data into anILcdModel
.
After this, a composite ILspLayerFactory
creates a layer that controls how
the model of the loaded data is displayed.
The model decoders and layer factories are retrieved using a service look-up mechanism, and
contain both built-in and sample implementations.
The toolbar includes several controllers to visually compare layers.
Add new data by pressing the appropriate toolbar button or by dragging and dropping files or URLs on the map. Not all styled LuciadLightspeed formats have a dedicated Lightspeed layer factory (an example of this is DGN), in which case a fallback layer factory is used. As a result, the visualization of some data might not be correctly styled. The data shown in the highlighted sample screenshot is an OGC 3D Tiles mesh data set for Marseille, located at https://sampleservices.luciad.com/ogc/3dtiles/marseille-mesh/tileset.json.
The toolbar allows selecting the following visual inspection controllers:
This sample illustrates the editing and creation capabilities of the editors that are available in the Lightspeed API. The sample contains one shape layer for both editing and creation. Shape creation is performed using TLspCreateController. Shape editing is performed using TLspEditController.
Consult the developer's guide or the documented source code of this sample for detailed information on how to create an application that uses Lightspeed editors.
To edit one of the shapes, click on the shape and interact with one of its edit handles. Please refer to the javadoc of the different editor classes in the com.luciad.view.lightspeed.editor package to see what functionality is provided by each of the handles.
To create a new shape, activate one of the create controllers in the toolbar. Most of the controllers also have an extruded creation variant. This variant creates an extruded shape with the base shape that is created by the normal editor. For instance, the ellipse create controller creates an extruded ellipse when extrusion is activated. Extrusion can be activated by the extrusion button in the creation toolbar.
For most shapes creation is simply performed by a sequence of mouse clicks or taps. Some additional instructions for special cases:
When creating or editing shapes you can disable snapping by pressing the control key (cmd on macOS). Insert or remove a point from a polyline or polygon by holding down the control key (cmd on macOS) while pressing. Select multiple shapes by holding the shift while pressing. Use the delete key to remove selected shapes.
This sample visualizes the EGM2008 geoid in 3D. The geoid heights are exaggerated; they actually vary between -110m and +90m. Blue colors indicate that the geoid heights are negative (geoid below the ellipsoid of the WGS84 datum). Green colors indicate that the geoid heights are positive (geoid above the ellipsoid).
Geoid heights are typically used behind the screens, in calculations with references that have geodetic datums based on geoids. They are relevant for elevation data, for instance, which are commonly defined with respect to a few standardized geoid models. For accurate computations, elevations above a geoid can then be transformed to elevations above an ellipsoid.
The geoid heights are retrieved from the geodetic datum that is created by the TLcdGeoidGeodeticDatumFactory.
This sample demonstrates how to display grid layers in a Lightspeed view.
The following grid layers are included:
In addition, the sample shows how to change text and line styles and other grid styling properties.
This sample demonstrates how to visualize point data using 3D icons. Icons can be loaded from files in either Collada, OpenFlight or WaveFront OBJ format.
The sample shows animated 3D points. At startup, they are displayed using an airplane icon. Use the "open" button on the toolbar to load a .DAE, .OBJ or .FLT file. Doing so will replace the airplane model.
This sample demonstrates how to project images on terrain.
The sample shows an image being projected on terrain by an animated plane. Notice how the projected image deforms when projected on the terrain. The white lines indicate the projection frustum. This frustum can be toggled on or off in the layer pane.
This sample illustrates how multispectral raster imagery can be visualized and analyzed in an ILspView.
The sample starts with pre-loaded satellite image files covering the region of Las Vegas. The images are obtained from the LandSat7 USGS archive. They are multi-spectral GeoTIFF files that consist of 7 bands. The sample also allows you to load other GeoTIFF files from disk.
The panel below the layer controls demonstrates the LuciadLightspeed imaging operators and filters, and allows you to configure how the image in the selected layer is displayed. You can adjust brightness, contrast, opacity, and apply a sharpening filter using the sliders.
You can also choose which of the 7 image bands are displayed, and to which color channel they are mapped. To display the pre-loaded images in the the LandSat7 natural color preset for instance, select the bands 3, 2 and 1 in the Red, Green and Blue drop-down menus respectively. Other interesting band combinations that highlight specific aspects of the image data are 4-3-2, to display the near infrared (NIR) data, and 7-4-2 to display short-wavelength infrared (SWIR) data. The band combination 7-4-2 displays vegetation in bright shades of green, for instance.
The Curves panel displays the data distribution of the displayed image bands in a histogram. You can adjust the dynamic range for the bands in each color channel by manipulating the line displayed on top of the histogram into a curve. You can also enhance the image contrast automatically by applying the Equalization function on the Luminance tab.
The toolbar allows selecting a swipe and flicker controller to visually compare layers.The swipe controller displays a swipe line that can be dragged horizontally or vertically, displaying only half of the first set of layers on the left or top side, and half of the other set of layers on the other side. The flicker controller allows to quickly toggle between multiple layer sets by clicking the mouse. See the documentation of TLspSwipeController and TLspFlickerController for more info.
The sample makes use of TLspImageFilterStyle and the ALcdImageOperator API to perform the band selection and dynamic range adjustments.
Load additional files with drag and drop, or by clicking the Open button on the toolbar. When you select the resulting layer in the layer control panel, three additional panels appear below the layer controls.
In the General panel, you can apply several image filters to the selected raster layer. Use the sliders to adapt the image contrast, brightness, opacity and sharpness.Click Reset to return to the default filter settings.
The Visible bands panel allows you to choose which image bands are made visible, and in which color. The drop-down
menus next to the Red, Green and Blue color channels contain a list of the image bands present in the
selected raster layer. To map an image band to a particular color channel, select the band number from the
drop-down menu next to the preferred color.
To see just one band in grayscale, click the grayscale icon and select a band from the drop-down menu.
The Curves panel consists of four tabs. The Red, Green and Blue tabs displays a histogram and a tone curve for the
color-mapped bands of the loaded image. To see the histogram and tone curve for a particular band, select the tab
with the color to which you mapped the band. To change the tone curve in a particular color channel, select the
line on the histogram, and drag its control points until it forms a curve, and your image displays the required
color balance. You can add or delete points on the selected curve by ctrl-clicking. The Luminance tab displays
a histogram and curve for the brightness of the image. You can manipulate the tone curve to improve the contrast
in the image. To enhance image contrast automatically, click Equalize. As a result, the contrast will be
stretched automatically, and the curve will change.
To reset curves to their original settings, click Reset.
To visually compare layers, select the swipe controller from the toolbar. Compare for example the Las Vegas image from 2000 and 2003. By dragging the swipe line you should be able to easily see the differences between the two image files. Enable the flicker controller from the toolbar and select the two Las Vegas image files. Quickly click the mouse to toggle between the two layers.
This sample demonstrates how to display balloons in a TLspFXView
using TLspFXBalloonManager
.
This sample requires JavaFX. Depending on the JDK you are using, you may need to install it separately.
Refer to the technical notes in the documentation for more information.
The sample shows two points on the map, each of which is tied to a balloon. A balloon is made visible when a single object is selected. The balloon contains an editable text field containing the position of the icon in geodetic coordinates.
For a more extensive description of the balloon manager API see the developers' guide.
Select one of the icons. A balloon will appear. Editing the coordinate panel in the balloon and hitting return will change the location of the icon. The balloon arrow also gets relocated with this operation. Balloons are only shown when one domain object is selected.
This sample demonstrates the ability to load, visualize and print data from sources in different formats
on a Lightspeed JavaFX map using ILcdModelDecoder
and ILspLayerFactory
.
This sample requires JavaFX. Depending on the JDK you are using, you may need to install it separately.
Refer to the technical notes in the documentation for more information.
A file and a URL action are configured to load data in almost every available format.
The sample uses a composite ILcdModelDecoder
to decode the data into anILcdModel
.
After this, a composite ILspLayerFactory
creates a layer that controls how
the model of the loaded data is displayed.
The model decoders and layer factories are retrieved using a service look-up mechanism, and
contain both built-in and sample implementations.
Add new data by pressing the appropriate toolbar button or by dragging and dropping files or URLs on the map. Not all styled LuciadLightspeed formats have a dedicated Lightspeed layer factory (an example of this is DGN), in which case a fallback layer factory is used. As a result, the visualization of some data might not be correctly styled.
Use the print button on the toolbar to preview and print the current contents of the map.
This sample illustrates the editing and creation capabilities of the editors that are available in the Lightspeed API.
This sample requires JavaFX. Depending on the JDK you are using, you may need to install it separately.
Refer to the technical notes in the documentation for more information.
The sample contains one shape layer for both editing and creation. Shape creation is performed using TLspCreateController. Shape editing is performed using TLspEditController.
Consult the developer's guide or the documented source code of this sample for detailed information on how to create an application that uses Lightspeed editors.
To edit one of the shapes, click on the shape and interact with one of its edit handles. Please refer to the javadoc of the different editor classes in the com.luciad.view.lightspeed.editor package to see what functionality is provided by each of the handles.
To create a new shape, activate one of the create controllers in the toolbar. Most of the controllers also have an extruded creation variant. This variant creates an extruded shape with the base shape that is created by the normal editor. For instance, the ellipse create controller creates an extruded ellipse when extrusion is activated. Extrusion can be activated by the extrusion button in the creation toolbar.
For most shapes creation is simply performed by a sequence of mouse clicks or taps. Some additional instructions for special cases:
When creating or editing shapes you can disable snapping by pressing the control key (cmd on macOS). Insert or remove a point from a polyline or polygon by holding down the control key (cmd on macOS) while pressing. Select multiple shapes by holding the shift while pressing. Use the delete key to remove selected shapes.
This sample demonstrates how to add touch support into a JavaFX application.
This sample requires JavaFX. Depending on the JDK you are using, you may need to install it separately.
Refer to the technical notes in the documentation for more information.
The sample features large buttons to allow easy manipulation with fingers instead of a mouse as input device.
Use one finger to pan around and to select or edit objects. Use two fingers to zoom or rotate.
To edit one of the shapes, you just have to touch the shape and interact with one of its editing handles. Please refer to the javadoc of the different editor classes in the API to see what functionality is provided by each of the handles.
To create a new shape, activate one of the create controllers in the toolbar. Note that most of the controllers also have an extruded creation variant. This variant creates an extruded shape with the base shape that is created by the normal editor. For instance, the ellipse create controller creates an extruded ellipse when extrusion is activated. Extrusion can be activated by the extrusion button in the creation toolbar (third button).
Some shapes like polylines, polygons, and complex polygons have different (dynamic) creation steps that can be ended by pressing the Commit button. For example, to create a complex polygon containing two triangular shapes, the sequence of interactions should be: tap-tap-tap, commit (to end first polygon), tap-tap-tap, commit (to end second polygon), commit (to end complex polygon creation).
This sample demonstrates how labels can be made editable. The labels are editable in the sense that they can be moved to a new location, as well as in the sense that they offer the user an interactive component that can be used to edit information related to the domain objects.
Move the mouse over a label of a city. An interactive, editable label will be shown instead of the regular label. You can enter a comment for the labeled city in the text field. To apply the changes, press the Enter key or press the green tick mark at the top of the interactive label. To cancel the outstanding changes, press the red 'cancel' icon at the top of the label or press the Escape key.
The interactive label can be moved by clicking and dragging on the title bar of the interactive label.
This sample demonstrates various labeling algorithms:
Note that the river's springs are determined as the first point of the first polyline, which may not correspond to reality.
To see the effects of the labeling algorithms select a layer, by clicking it in the layer control and:
To modify the label styling, drag the opacity slider, or change the font using the Font combobox.
This sample demonstrates how Swing components can be overlaid on an ILspView. Specifically, the sample shows a JInternalFrame which contains a secondary map view, alongside with navigation controls for the main view.
To avoid issues with the mixing of lightweight and heavyweight components, the sample uses TLspSwingView rather than TLspAWTView. A JLayeredPane is added to the main view. Within this layered pane, one layer is a JDesktopPane containing the internal frame with the second view. Another layer contains the standard navigation controls and scale indicator for the main view (as can also be seen in other samples).
Move, resize, minimize and maximize the internal frame. Observe how it sits between the main view and its overlaid navigation controls.
This sample demonstrates how the view-world transformation can be customized in order to constrain the navigation freedom. This behavior can be enabled or disabled using a checkbox in the toolbar.
Take note of the checkbox labeled "Limit Navigation" in the upper right corner of the screen, by default it is checked. As long as this checkbox is checked your navigational options are constrained:
Uncheck the "Limit Navigation" checkbox and retry panning, zooming and rotating the view and notice the difference with the constrained version of these behaviors.
This sample shows to add a map overview for an ILspView. The map overview is overlaid on the main view. It shows the bounds of the area of the world that is visible in the main view.
The map overview is itself a TLspSwingView, which is added to the main view's overlay panel. The visible map area is obtained using ALspViewXYZWorldTransformation.getGeodeticVisibleArea(). The map overview continuously fits to this polygon.
Navigate in the main view. Switch between 3D and the various 2D projections. Observe how the map overview updates continuously and how the polygon in the map overview corresponds to the area of the world that can be seen in the main view.
This sample demonstrates how 3D shapes in LuciadLightspeed can be discretized and saved as 3D meshes in a custom file format.
The intent of this sample is to show you how to export 3D shapes from LuciadLightspeed as 3D meshes for re-use in a LuciadRIA client. The produced JSON file can easily be parsed by the LuciadRIA MeshFactory.
To save a 3D shape as a JSON mesh-file, select a shape in the view, and press the save button in the toolbar.
This sample demonstrates how to use
TLspNavigationControlsFactory
to create
Swing-based controls for view navigation and overlay these controls on a view.
The default navigation controls are as usual visible in the top right corner. A secondary set of controls is added to the left side of the view. The distinct components are the same but they are separated and added in different corners and they always appear active. The compass navigation control on the left side points towards the magnetic north instead of the real north.
Use the secondary set of navigation controls to pan, zoom and rotate the view.
This sample contains three layers:
Navigate the map. Notice how the mouse location at the bottom indicates the pixel coordinates in the image.
Select one of the shapes and edit it or create a new shape.
Open an image file.
This sample contains two layers:
Navigate the map. Notice how the shapes at the top of the screen remain at the same position at any time.
Select one of the green shapes and edit it.
Select one of the blue ellipses. One of the icons and mini-ellipses is automatically selected as well.
Select one of the pencil icons or mini-ellipse. The corresponding ellipse is selected as well.
Edit one of the blue ellipses. The corresponding mini-ellipse is edited as well.
The sample loads 500.000 aircraft positions around New York.
The plots are painted with a plot layer (TLspPlotLayerBuilder
).
At a certain scale, heading arrows are displayed, and labels that are de-cluttered using the continuous de-cluttering algorithm.
Filtering can be done through the properties of the data model.
Styling is also based on the properties of the data model.
Change the filtering through the sliders and drop-down boxes. The filter is immediately effective.
Change the color and icons through the drop-down boxes. The change is immediately effective.
Enable and disable density plots through the checkbox. The change is immediately effective.
This sample demonstrates how to print a component containing a view, using the TLspViewComponentPrintable.
The sample creates a page layout containing the view and some decorations. You can preview the page or print it directly using the buttons in the toolbar.
This sample demonstrates how to configure the measurement controller and change different properties of it dynamically at runtime.
It is possible to modify the following ruler settings:
This sample shows how to programmatically create and display a model. It reveals how to create an ILcdModel, how to populate it with ILcdShape objects, and how to display that data in an ILspLayer on a Lightspeed view.
For a more extensive description of each of these steps see the developers' guide.
The sample shows a polyline, a polygon, and a point visualized by an icon. Try interacting with the shapes.
This sample is intended to illustrate the process of editing an object's style at runtime.
It creates a setup in which a
TLspEditableStyler
is used to edit the
styles of all the objects. To tweak the values of the provider at runtime, a widget was
implemented which provides a GUI for editing the most prominent style properties (see
StyleEditor
andStyleEditorModel
).
Note that for simplicity, this sample focuses on editing line- and fill styles, but the concepts used in this sample can be applied to editing other styles as well.
This sample demonstrates expression based-styling in a Lightspeed view using
TLspParameterizedLineStyle
, TLspParameterizedFillStyle
and
TLspParameterizedIconStyle
Use the layer selection panel on the right to select different layers, demonstrating different kinds parameterized
styles, ILcdExpression
and shapes.
The first layer shows Flightradar tracks styled with a TLspParameterizedLineStyle
. Only the segment
of a track that is within a specified time interval is visible.
The second layer shows European countries styled with a TLspParameterizedFillStyle
. The fill color
of the countries is derived from the population property of each country.
The last layer visualizes cities using a TLspParameterizedIconStyle
. An icon for a city is scaled based
on the population property and the distance to the mouse cursor.
This sample demonstrates the capabilities of TLspFillStyle
. It shows various layers with
shapes with different fill styles:
TLspFillStyle.StipplePattern
with convenience methods to
draw lines or filled/outlined rectangles, ovals or polygons.
BufferedImage
, and can
be scaled, rotated or translated. Additionally, the texture can be set to be applied
relative to the bounds of the object or relative to the bounds of the world.
The sample has various layers containing shapes with different fill styles.
Move around in 2D and 3D to see the effect.
Edit the shapes to see how the different fill styles adapt.
The icon style sample demonstrates the icon styling functionality of TLspShapeLayerBuilder, i.e.: rotation and transparency of icons, drawing icons with a vertical line and drawing icons either with a size in world coordinates or in view coordinates. All this is accomplished using TLspIconStyle.
The sample contains three layers with icons, all located around San Francisco:
Zoom in on San Francisco and see how each icon layer resizes its icons differently. Also notice how the rotatable icons layer changes the color of its icons based on the scale of the view. Use the rotation slider to change the orientation of the rotatable icons.
The Raster Style sample illustrates how the style of a raster can be changed on the fly:
The sample starts with a raster style with 100% brightness, 100% contrast, 100% opacity and no custom filter. For more detailed information on how to use raster styles and providers, see the developer's guide or the documented source code of this sample.
The sample shows 3 types of layers:
Select a raster layer in the layer control and change its style using the panel on the left.
This sample demonstrates how line data can be visualized using complex strokes. This is achieved by using TLspComplexStrokedLineStyle.
The sample shows a number of shapes with different strokes. Use the layer selection panel on the right to select different layers, demonstrating different kinds of strokes. Select and edit the shapes to see how the stroke pattern adjusts itself. Switch to a 3D view to see how stroked lines appear when they are draped over the terrain.
This applet demonstrates the use of the touch-based ILspControllers
.
It features a single controller chain to navigate around the map, and select and edit objects.
The sample features large buttons to allow easy manipulation with fingers instead of a mouse as input device.
Use one finger to pan around and to select or edit objects. Use two fingers to zoom.
This sample demonstrates how ALspController
can be extended to implement a custom
touch controller.
The first custom controller displays a tooltip for objects that are touched.
The second custom controller fits the view to the bounds of an object if a touch-and-hold action is performed on that object.
Activate the first custom controller ("information panels"). While you touch an object on the map (e.g. a county), a tooltip will pop up showing some of that object's attributes.
Activate the second custom controller ("fit to object"). Touch and hold an object until a red circle visually notifies you that the touch-and-hold time has been reached. If you now release your finger, the view will fit to the bounds of that object.
This applet demonstrates the use of the touch-based ILspControllers
for editing purposes.
Navigate, select and edit objects. You can make a layer selectable by first tapping on its name in the layer list, and then tapping on the "Toggle layer selectable" button.
To edit one of the shapes, you just have to touch the shape and interact with one of its editing handles. Please refer to the javadoc of the different editor classes in the API to see what functionality is provided by each of the handles.
To create a new shape, activate one of the create controllers in the toolbar. Note that most of the controllers also have an extruded creation variant. This variant creates an extruded shape with the base shape that is created by the normal editor. For instance, the ellipse create controller creates an extruded ellipse when extrusion is activated. Extrusion can be activated by the extrusion button in the creation toolbar (right most button).
Some shapes like polylines, polygons, and complex polygons have different (dynamic) creation steps that can be ended by pressing the Commit button. For example, to create a complex polygon containing two triangular shapes, the sequence of interactions should be: tap-tap-tap, commit (to end first polygon), tap-tap-tap, commit (to end second polygon), commit (to end complex polygon creation).
This sample demonstrates the effect of touch events on a touch enabled Lightspeed view. It contains a setup that simulates touch events and passes them to the Lightspeed view. The touch controller set on the view is a navigation controller by default and will interpret the incoming events by panning and zooming the view.
The simulation can be started by clicking the "Simulate touch events" button in the toolbar.
Start a simulation of how touch events are handled in a Lightspeed view by clicking the button in the toolbar.
This sample shows how different constraints can be added to the view's camera to automatically follow one or more moving objects.
The sample shows a model with three airplanes. Their position is constantly updated. The sample attaches a tracking constraint to the camera so the airplanes are always in view.
The different possible tracking constraints are:
TLspLookFromTrackingCameraConstraint3D
: used to fix the camera at a certain position. Panning
and zooming are not possible, but rotating still is. Optionally, the direction of the camera can be fixed as
well, so rotating is also impossible.
TLspLookAtTrackingCameraConstraint3D
: used to fix the camera in a certain direction. Panning is
not possible, but zooming and rotating still is.
TLspLookAtTrackingCameraConstraint2D
: same as above for 2D views.
The combobox on the right shows the available tracking modes. It changes the world reference, view's camera, and the tracking mode.
Supported tracking modes for a 3D view are:
This sample demonstrates the use of the vertical view package. The 2D view in the upper part contains a flight layer with two flight routes. Each flight route is modeled as a list of 3D points.
The vertical view in the lower part is used to display the vertical profile of the flight that is selected in the 2D view. Apart from this profile, a number of sub-profiles associated to it can be shown in a vertical view. In this case, two sub-profiles are associated to the view: the terrain and the air route. FlightVVModel, an implementation of ILcdVVModel holds the main-profile points and the information about the sub-profile.
Select a flight. A vertical marker is shown in both views. Change the height of the flight by dragging its points up or down. You can zoom the X and Y axes by using the sliders to the right and at the bottom. You can disregard flight points at the left or right of the flight using the sliders at the top. Finally, the panel at the right allows you to select the altitude unit.
The OGC Symbology Encoding (Styled Layer Descriptor) standard describes an XML format to describe the style of a layer. This sample demonstrates how to decode such a style from a file and how to apply it to a Lightspeed layer.
The application displays a number of layers and a set of styles. The styles can be applied to the layers. Some of the styles are specific for a particular layer, while others can be applied to any layer.
The text area at the right displays the description of the style as it is defined in the SLD file.
Select a layer in the layer control and a style in the dropdown list. Selecting the style will automatically apply it to the selected layer.
This sample demonstrates the ability to load metadata encoded following the ISO 19139 standard schema.
Click the open button and select a file from the LuciadLightspeed/samples/resources/Data/metadata folder. The central frame will display the metadata as encoded in the file.
This sample demonstrates a simple gazetteer functionality.
Some metadata files are loaded and the geographic extent of the data they describe is extracted from the metadata and displayed on the map as bounds.
Double click on the bounds to display all metadata linked to the bounds.
Right click with the mouse to load the data which is described in the metadata. The location(s) of the file to load is extracted from the metadata.
This sample shows how to visualize dynamic tracks in a GXY map.
The sample shows several random parabolic trajectories and animates 2000 dynamic tracks moving
along these trajectories. The dynamic tracks layer is simulated using a
TLcdSimulator
with a custom ALcdSimulatorModel
.
Each track has a label that displays its identifier, and the grounded state of the track.
Press the "Play" button to start or the simulation. The tracks start moving across their individual trajectories.
As the tracks move around, the labels are gently repositioned to avoid overlap. If you hover the mouse over a label of a moving track, it stops moving. In the rare event labels get mixed up, you drag them to a new location. Labels move back automatically.
A time slider allows to see your progression in the simulation. When the simulation is not running, the slider also allows you to change the "simulation time" with your mouse.
You can adjust the replay speed factor using the "speed up" slider.
This sample shows how to visualize dynamic tracks in a Lightspeed map and timeline.
The sample shows 2000 random parabolic trajectories and animates 2000 dynamic tracks moving
along these trajectories. The dynamic tracks layer is simulated using a
TLcdSimulator
with a custom ALcdSimulatorModel
.
Tracks are visualized with airplane icons. In 3D projections, a line connects each icon with its zero-elevation
point.
Each track also has a trail of grey dots indicating previous positions. The trail is added to
the icons by using a custom ILspStyler
.
The track labels are decluttered using the TLspContinuousLabelingAlgorithm
,
a specialized algorithm for moving objects in a Lightspeed view.
The time line at the bottom is a non geo-referenced Lightspeed view that you can pan and zoom.
Press the "Play" button to start the simulation. The tracks start moving across their individual trajectories. The time view is also updated. If you pan the time view, the simulation is also updated. You can adjust the replay speed by zooming in or out on the time line.
Select a plane in the main view. Its altitude over time is displayed in the time view along with the name of its landing and take-off city.
Zoom in and pan around the world to see how the labels of the dynamic tracks are automatically decluttered depending on the current situation. You can also select and move all of the track labels.
The OGC Styled Layer Descriptor standard describes an XML format to describe the style of a layer. This sample demonstrates how to decode such a style from a file and how to apply it to a layer.
The application displays a number of layers and a set of styles. The styles can be applied to the layers. Some of the styles are specific for a particular layer, while others can be applied to any layer.
The text area at the right displays the description of the style as it is defined in the SLD file.
Select a layer in the layer control and a style in the dropdown list. Clicking the apply button will attempt to apply the style to the selected layer. Selecting 'Default' in the list resets the style of the layer.
This is a command-line sample. Click More info for run instructions.
This application demonstrates how to encode spatial data to a GeoPackage file, using TLcdGeoPackageModelEncoder.
Run the sample using the shell script in the samples
folder:
encoder.sqlite.geopackage.bat source_file destination_gpkg_file
Pass two arguments to this sample: an input file and a (new or existing) .gpkg file.
This sample demonstrates how to use an OGC Web Coverage Service (WCS) in a client application equipped with a 2D GXY view, using the Luciad WCS client API.
Using the client API, applications can create a "proxy" ILcdModel that transparently obtains coverage data from the WCS.
When a connection is made with a WCS service, the combo box in the upper right of the sample is populated with the list of coverages offered by this WCS. These coverages can be selected and visualized on the map.
During startup, the sample will try to connect to one of two default OGC WCS services:
samples.ogc.server.Main
sample.
Querying the list of available coverages: fill in a URL in the text field below the map and press the "Query WCS service" button. This will send a GetCapabilities request to the service and parse the list of available coverages. When successful, the coverages will be listed in the combo box in the upper right corner of the sample.
Retrieving and visualizing a coverage: select a coverage in the combo box in the upper right of the sample. Click the "Get coverage" button to send a GetCoverage request to the service and visualize the requested data on the map.
This sample demonstrates how to use an OGC Web Feature Service (WFS) in a client application equipped with a 2D GXY view, using the Luciad WFS client API.
Using the client API, applications can create a "proxy" ILcdModel that transparently obtains feature data from a WFS. This WFS proxy model can optionally be configured with an OGC Filter to be applied to the data and, as is done in the sample, a "maxfeatures" parameter to limit the number of features that are retrieved from the service.
When a connection is made with a WFS service, the combo box in the upper right of the sample is populated with the list of features types offered by this WFS. Selecting a feature types from the list retrieves and visualize the feature data on the map. You can also connect to other WFS services through the URL panel below the map.
During startup, the sample will try to connect to one of two default OGC WFS services:
samples.ogc.server.Main
sample.
To query the list of available feature types, fill in a server and press the "Query" button. This will send a GetCapabilities request to the service and parse the list of available features types. When successful, the feature types will be listed in the combo box in the upper right corner of the sample.
To visualize a feature type, just select it from the combo box. This will send a GetFeature request to the service for the selected feature type, and create a layer to visualize the retrieved feature data.
This sample demonstrates how to use an OGC Web Feature Service (WFS) in a client application equipped with a 2D / 3D Lightspeed view, using the Luciad WFS client API.
Using the client API, applications can create a "proxy" ILcdModel that transparently obtains feature data from a WFS. This WFS proxy model can optionally be configured By default, this results in a map loaded with:
When a connection is made with a WFS service, the combo box in the upper right of the sample is populated with the list of features types offered by this WFS. Selecting a feature types from the list retrieves and visualize the feature data on the map. You can also connect to other WFS services through the URL panel below the map.
During startup, the sample will try to connect to one of two default OGC WFS services:
samples.ogc.server.Main
sample.
To query the list of available feature types, fill in a server and press the "Query" button. This will send a GetCapabilities request to the service and parse the list of available features types. When successful, the feature types will be listed in the combo box in the upper right corner of the sample.
To visualize a feature type, just select it from the combo box. This will send a GetFeature request to the service for the selected feature type, and create a layer to visualize the retrieved feature data.
This sample demonstrates how to query ECDIS data from a LuciadFusion OGC Web Map Service (WMS) in a WMS client application, taking into account S-52 display settings.
This sample requires a LuciadFusion WMS service supporting SLD-based S-52 styling.
You can use the S-52 customizer panel on the right side of the map to tweak the display settings for the ECDIS WMS layers. The WMS client will encode the S-52 display settings into an S-52 SLD extension, and embed this SLD in the GetMap request that is sent to the server. The Fusion WMS server will return the ECDIS image, rendered with the settings from the SLD.
During startup, the sample will try to connect to a public LuciadFusion OGC WMS service (http://sampleservices.luciad.com/wms). Additionally, you can connect to other LuciadFusion WMS services through the URL panel.
Map interaction: the toolbar offers a set of actions to navigate on and interact with the map. This includes the ability to pan and zoom, to measure distances and to switch the projection. When the selection projection does not match the available projects in the WMS service, the data is automatically reprojected, fully transparent for the user.
S-52 display settings: The S-52 display settings customizer panel right of the map allows to modify the S-52 display settings. Any change to the settings will immediately trigger a new query to the WMS server with updated S-52 SLD styling parameters, and update the client view accordingly.
This sample demonstrates how to query ECDIS data from a LuciadFusion OGC Web Map Service (WMS) in a WMS client application, taking into account S-52 display settings.
This sample requires a LuciadFusion WMS service supporting SLD-based S-52 styling.
You can use the S-52 customizer panel on the right side of the map to tweak the display settings for the ECDIS WMS layers. The WMS client will encode the S-52 display settings into an S-52 SLD extension, and embed this SLD in the GetMap request that is sent to the server. The Fusion WMS server will return the ECDIS image, rendered with the settings from the SLD.
During startup, the sample will try to connect to a public LuciadFusion OGC WMS service (http://sampleservices.luciad.com/wms). Additionally, you can connect to other LuciadFusion WMS services through the URL panel.
Map interaction: the toolbar offers a set of actions to navigate on and interact with the map. This includes the ability to pan and zoom, to measure distances and to switch the projection. When the selection projection does not match the available projects in the WMS service, the data is automatically reprojected, fully transparent for the user.
S-52 display settings: The S-52 display settings customizer panel right of the map allows to modify the S-52 display settings. Any change to the settings will immediately trigger a new query to the WMS server with updated S-52 SLD styling parameters, and update the client view accordingly.
This sample demonstrates how map data from an OGC Web Map Service (WMS) can be retrieved and visualized in a GXY (2D) view.
Using the client API, applications can create a "proxy" ILcdModel that transparently obtains map data from the WMS.
When a connection is made with a WMS service, the layer list in the upper right of the sample is populated with the list of layers offered by this WMS. These layers can be selected and visualized on the map.
You can switch between a tiled and a non-tiled painting strategy. Tiled painting typically offers better performance while non-tiled painting allows pixel-perfect results in a 2D view.
The sample also demonstrates the use of WMS feature info requests. If the WMS advertises GetFeatureInfo support, you can click on the map. This requests additional feature information for that location from the service. If feature information is available, it will be painted as an overlay label on the map at the clicked location.
The sample demonstrates making use of multi-dimensional data when selecting WMS layers for which the WMS server advertises them.
The check box "Auto-update WMS" is enabled by default, which means that the sample will check at each pan/zoom action whether the capabilities at the server have been updated. Any changes in the available layers are applied automatically; if there are any new layers defined at the server, they will be added. Layers that are not available anymore at the server will be removed automatically.
During startup, the sample will try to connect to one of two default OGC WMS services:
samples.ogc.server.Main
sample.
WMS layer selection: the list in the upper right of the samples shows the available WMS layers. Selecting and deselecting layers triggers a map refresh, taking into account the current WMS layer selection.
Map interaction: the toolbar offers a set of actions to navigate on and interact with the map. This includes the ability to pan and zoom, to measure distances and to switch the projection. When the selection projection does not match the available projects in the WMS service, the data is automatically reprojected, fully transparent for the user.
Painting settings: disable the tiled checkbox in the panel. The update latency will increase but the results are now pixel-perfect when the view is using a 2D reference that is supported by the WMS server.
Feature info: click on the crosshair button in the toolbar to activate the feature info controller. Clicking on the cities or rivers of the USA or on the streets of Washington DC shows a label with the feature information next to the clicked point, if available.
Enable the check box "Auto-update WMS" to let the application check for new/removed WMS layers at each pan or zoom action. When used with the sample Luciad WMS service, one can add data in the samples/resources/Data/dynamic folder to try this feature. The following data formats are supported: SHP, MIF, CADRG, DMED, DEM, GeoTIFF, raster (.rst), ETOPO and a custom format (.txt). This folder is monitored each 10 seconds. When new data is found or when data is removed, the advertised layers in the WMS capabilities are automatically updated, and the client sample will automatically pick up the changes. Newly added data should therefore soon become visible at the client, after a pan or zoom action.
This sample demonstrates how map data from an OGC Web Map Service (WMS) can be retrieved and visualized in a Lightspeed view.
Using the client API, applications can create a "proxy" ILcdModel that transparently obtains map data from the WMS.
When a connection is made with a WMS service, the layer list in the upper right of the sample is populated with the list of layers offered by this WMS. These layers can be selected and visualized on the map.
You can switch between a tiled and a non-tiled painting strategy. Tiled painting typically offers better performance while non-tiled painting allows pixel-perfect results in a 2D view.
The sample also demonstrates the use of WMS feature info requests. If the WMS advertises GetFeatureInfo support, you can click on the map. This requests additional feature information for that location from the service. If feature information is available, it will be painted as an overlay label on the map at the clicked location.
The sample demonstrates making use of multi-dimensional data when selecting WMS layers for which the WMS server advertises them.
During startup, the sample will try to connect to one of two default OGC WMS services:
samples.ogc.server.Main
sample.
WMS layer selection: the list in the upper right of the samples shows the available WMS layers. Selecting and deselecting layers triggers a map refresh, taking into account the current WMS layer selection.
Map interaction: the toolbar offers a set of actions to navigate on and interact with the map. This includes the ability to pan and zoom, to measure distances and to switch the projection. When the selection projection does not match the available projects in the WMS service, the data is automatically reprojected, fully transparent for the user.
Painting settings: disable the tiled checkbox in the panel. The update latency will increase but the results are now pixel-perfect when the view is using a 2D reference that is supported by the WMS server.
Feature info: click on the crosshair button in the toolbar to activate the feature info controller. Clicking on the cities or rivers of the USA or on the streets of Washington DC shows a label with the feature information next to the clicked point, if available.
This sample is a configuration editor for a Luciad Web Map Server.
This sample starts the OGC web services sample on localhost port 8080, giving access to an OGC
Web Map Service (WMS), a Web Feature Service (WFS), and a Web Coverage Service (WCS).
LuciadFusion also adds a Web Catalogue Service (CSW) to this sample.
The services can be accessed through a set of client samples delivered with LuciadLightspeed, or through the service's administrative page available at the following URL: http://localhost:8080/LuciadOGCServices This administrative page is built using HTML / JavaScript and is delivered with the services sample. It provides a graphical front-end to the OGC services and gives access to their capabilities.
You can run one of the client samples delivered with LuciadLightspeed to connect with the OGC services:
This sample demonstrates how to create your own Spring profiles. This is a useful feature that can be used to have different configurations in different environments without changing anything in your application.
For the sake of simplicity, the sample application activates the custom staging profile programmatically. The preferred way of setting the active profile is to use program arguments, vm parameters or JNDI attributes. See the deployment guide for more information about Spring profiles.
This sample demonstrates how to create your own authentication logic. This implementation intends to replace the default built-in LuciadFusion Platform security authentication logic. This is useful in scenarios where users intend to implement their own user authentication logic. For the sake of simplicity, this sample uses user authentication via a database, but the concept can be extended to implement more complex authentication logic.
This sample demonstrates how to create your own authorization logic. This implementation intends to replace the default built-in LuciadFusion Platform HTTP security configuration. This is useful in scenarios where users intend to implement their own security and authorization logic.
Example Fusion application to create an extra Spring endpoint. In this case a simple "Hello World" service, that exposes the "/hello" and "/hello/{name}" endpoints.
Custom service type example.
This sample shows how to add a custom service type that can be used within LuciadFusion Studio. A SHP Quiz service type is added that creates quizzes from SHP files published in the services of this type.