This scenario demonstrates how you can crawl a collection of elevation data and serve it to a LuciadRIA application in an LTS service.

A Luciad Tile Service (LTS) allows you to efficiently serve elevation data, because it offers that data in a hierarchical tile structure, called a coverage. Because an LTS service serves only LuciadFusion coverages, though, you must pre-process the elevation data ninto such a coverage first.

In the scenario, we use a folder with DHM files as an example for the elevation data, but it also applies if you have elevation data in a format such as DTED, ETOPO, and DEM. We are going to set up the folder containing elevation files as a data root for LuciadFusion Studio, create a product with the data, create an LTS service containing the product, and serve it after it has been pre-processed.

Setting up the data root

To set up the data root, go to SETTINGS > DATA ROOTS > ADD DATA ROOT, and select the folder with the DHM files.

Adding the folder with DHM files as a data root
Figure 1. Adding the folder with DHM files as a data root.

LuciadFusion starts the crawling process, and adds all the DHM files to the DATA tab.

Creating the product

An LTS service offers one coverage for each product it contains, so we need to create a product with the DHM elevation files first. Combining multiple individual elevation data files in a single product allows you to serve this data as a single coverage through an LTS service. If you want to offer multiple coverages, you should create a product for each coverage you want to offer.

If you already created a LuciadFusion coverage of your data with the Data Connectivity Manager (DCM) and added that coverage to LuciadFusion Studio, you must only create a product containing that coverage. Products containing a LuciadFusion coverage do not require any pre-processing. Keep in mind that you can only create a product containing exactly one LuciadFusion coverage if you plan to serve it in an LTS service.

To create the product:

  1. Select all the DHM files of your data set by holding SHIFT and clicking each DHM file on the DATA screen.

Selecting the DHM data in Studio
Figure 2. Selecting the DHM data in Studio
  1. Click CREATE PRODUCT.

  2. Give a meaningful name and title to the product. The product name will also be used as the name for the coverage when it is added to an LTS service.

Creating the product
Figure 3. Creating the product
  1. Click CREATE PRODUCT.
    The product has been created.

The product was created
Figure 4. The product was created

You can now create an LTS service with the product to start serving the elevation data in the product.

Setting up an LTS service

As mentioned earlier, an LTS service serves a coverage for each product that it contains. A product in an LTS service must contain either a single LuciadFusion coverage, or one or more elevation data files. A product containing a LuciadFusion coverage can be served directly in an LTS service. On the other hand, products containing elevation data are automatically pre-processed into a LuciadFusion coverage when you use them to create an LTS service, or when you add them to an LTS service. This is the case for the product with DHM data.

To create an LTS service for the product with DHM data:

  1. Go to the products page by clicking on the PRODUCTS tab.

  2. Select the product with DHM data.

Selecting the product with elevation data
Figure 5. Selecting the product with elevation data
  1. Click CREATE SERVICE.

  2. Enter a service title and name in the Create service dialog, and select the LTS service type.

Setting up the LTS service
Figure 6. Setting up the LTS service
  1. Leave the Start service? check box selected, and click CREATE SERVICE.

At this point, LuciadFusion Studio starts generating a Fusion coverage. While it is taking care of this pre-processing job, your new service will have the PENDING status.

The pre-processing may take a while if you loaded a large elevation data set. To track the status of the pre-processing job, you can go to the JOBS screen. It shows the running pre-processing job in the lower half of the screen. You can click the job entry for more details.

Monitoring progress of the pre-processing job
Figure 7. Monitoring progress of the pre-processing job

As soon as the pre-processing job is done, the LTS service status switches from PENDING to RUNNING.

The LTS service is running
Figure 8. The LTS service is running

If there is overlapping data in a product, the data might be re-ordered during pre-processing, and the resulting LuciadFusion coverage may store the data in in a different order than the original order in the product. LuciadFusion will order the data according to pixel density and other properties so that more detailed data is used in higher levels of the coverage.

LTS service pre-processing failure.

If any data other than elevation data is added to a product in an LTS service, the pre-processing step will fail. Currently, you can pre-process only elevation data into a LuciadFusion coverage. If you want to create a coverage with other data, you need to use the Data Connectivity Manager. See the Data Connectivity Manager User’s Guide for more information.

Once the LTS service is running, you can connect to it from a LuciadRIA application.

Connecting to an LTS service from LuciadRIA

To connect to an LTS service from LuciadRIA, you need to know the endpoint URL of the service, the coverage ID, and the coverage parameters.

Find out the endpoint URL

To find out what the endpoint URL is, go to the SERVICES tab in LuciadFusion Studio. Click the title of the LTS service in the list to open the details screen, and find the ENDPOINT URL entry.

Find out the service endpoint URL
Figure 9. Find out the service endpoint URL

Find out the coverage ID

If you are using LuciadRIA 2019.1 or a more recent version, you can create an LTSCapabilities instance from the endpoint URL to find the coverage ID.

If you are using LuciadRIA 2019.0 or an earlier version, you must get the coverage ID from LuciadFusion Studio. To find it, click the PRODUCTS tab in the details screen of the LTS service. Click the product for which you want to get the coverage ID.

Products tab of LTS service
Figure 10. Products tab of LTS service

The details screen of the product opens.

The product/coverage id
Figure 11. The product/coverage ID

For most products, you can find the coverage ID by looking at the address bar of your web browser: everything after products/ is the product ID, and therefore also the ID of the coverage.

Find out the product ID of an existing coverage

If the product is created from an existing coverage, LuciadFusion re-uses the ID of the existing coverage for the new coverage. In that case, you must find out the coverage ID in another way.

To determine the coverage ID, click the PRODUCTS tab in the details screen of the LTS service, and click the coverage product to open its product details screen.
Next, click the single data entry at the bottom of the product details screen. The details screen for the product data opens.

Find out which XML file to open for the coverage ID
Figure 12. Find out which XML file to open for the coverage ID

If the FORMAT entry equals FusionCoverage, you can find the coverage ID by opening the XML file specified in the PATH entry in a text editor and inspecting the value of the id attribute present on the root element.

Find the coverage parameters

The Table 1, “Coverage parameters” table lists the parameters of a coverage generated in a LuciadFusion pre-processing job for an LTS service. The parameters are optimized for consumption by LuciadRIA.

Table 1. Coverage parameters
Parameter Description Value

Type

The type of the coverage

Elevation

Tile width

The width of the tiles (in pixels)

32

Tile height

The height of the tiles (in pixels)

32

Level 0 row count

Number of rows at level 0

2

Level 0 column count

Number of columns at level 0

4

Levels

Number of levels in the tileset

24

Sampling mode

The sampling mode used when generating the tiles

Point

Bounding box

The 2D bounding box of the coverage

long:-180, lat:-90, width:360, height:180

Georeference

The geographic reference of the coverage’s bounding box

Geodetic reference (WGS 84 geodetic datum)

Format

The tile format of the coverage

image/tiff

You can also connect to the LTS service from a LuciadLightspeed application or from Lucy. Keep in mind that these coverage parameters were optimized for LuciadRIA.

Load in LuciadRIA

Now that you have the endpoint URL and coverage ID, you can load the data in LuciadRIA. Follow this tutorial to learn how to visualize LuciadFusion coverages in LuciadRIA.