Manual to Load Terrain Data


Overview

SuperMap supports generating 3D terrain cache for grid dataset to optimize the display of terrain data at the client side with tiles. SuperMap iClient3D for WebGL can access 3D services publishied by SuperMap iServer to load terrain data.

This document explains how WebGL Client load and browse terrain data.

    1. Build Cache Data
    2. Publish 3D Services
    3. Load Terrain Data at Client Side

Operations

Here is an example to illustrate the steps.

1. Build Cache Data

Introduction


SuperMap iDesktop can generate 3D terrain cache .sct based on terrain data.

Basic Steps


(1) Open SuperMap iDesktop, Workspace Manager>Datasource>Open File Datasource.



Fig. Opening a datasource

2 Select the terrain dataset to generate cache, right click to display the context menu, click Create Scene Cache.



Fig. Create Scene Cache

3 In the dialog box that displays, as shown below:



Fig. Create Scene Cache dialog box

4 In the dataset list are datasets to generate cache. You can click Add Dataset or Delete to manage datasets for generating cache. Following suggestions are provided for parameter settings.

    • Cache Type: TIN.
    • Tiling Type: Global.

5 For Parameter Settings, please follow the suggestions below:

    • Cache Name: Input cache name, with default being dataset name@datasource name.
    • Cache Path: The output path of the cache.
    • Start Layer: Gets or sets the count of the cache level.
    • End Layer: Gets or sets the end level in the building of the cache.

6 Keep Cache Extent and Scales by default. Click OK to generate cache.

Results


After generating cache, open the Terrain folder, you will see a file named info.sct, which is the configuration file for the terrain data cache. Folders named with numbers store cache data of different levels.



Fig. Results

2. Publish 3D Services

Introduction


After creating cache, we will see how to publish the terrain cache as 3D services to allow WebGL Client to load terrain data.

Basic Steps


1 Open SuperMap iDesktop, Workspace Manager>Scene>New Spherical Scene.



Fig. New spherical scene

2 Layer Manager>Terrain Layers>Add Terrain Cache Layer, select the *.sct configuration file generated.



Fig. Add terrain cache to scene

3 After adding terrain cache layer, save the scene and workspace.

4 Start iserver via 4 startup.bat under %SuperMap iServer_HOME%/bin.

5 Start bowser, enter Web Manager via http://localhost:8090/iserver/manager. Quickly publish a service at Home Page.


Fig. Quickly publish one or multiple services

6 In the Quickly publish service--Select datasource page, select the Workspace as the Data source, and click Next.


Fig. Select the Workspace as the Data source

7 In the Quickly publish service--Configure data page, click Remote Browse to select the workspace, click Next.



Fig. Select the workspace

8 In the Quickly publish service--Select service type page,Select REST 3D Service, click Next.



Fig. Select REST 3D Service

When finished, click Finish and Close.

Results


The service displays in the service list http://localhost:8090/iserver/services, as shown below.



Fig. The published service

3. Load Terrain Data at Client Side

Introduction


After publishing service, WebGL Client can load the image data.

Please place WebGL package at %SuperMap iServer_HOME%/webapps.

Basic Steps


1 Get the url of the 3D data.

    • Enter http://localhost:8090/iserver/services and find the published 3D service.
    • Enter root directory page, click realspace.
    • Enter 3D page, click datas.
    • Enter datas page, click links below.
    • Enter data page, copy the address of the url.


Fig. Copy url address

2 Enter the path of WebGL product package in %SuperMap iServer_HOME%/webapps, in the examples folder, open S3MTiles.html with text editor, and modify the following content.



Fig. Change parameter

3 Open the terrainAndImagery.html page, that is, enter the url http://localhost:8090/%WebGL Package%/examples/terrainAndImagery.html in the browser.

Results


After you open the page, the camera flies to the position of the terrain data, as shown below.



Fig. Terrain loaded at WebGL Client

Note: For more information about how to load image data, please refer to Load Image Data.

Copyright© 2000-2017 SuperMap Software Co., Ltd.