Example: How to configure cache for 3D Services
|
Feedback
|
There are two ways to produce and use the 3D caches. Through iDesktop or Distributed Map Tiling service provided by iServer, iDesktop can produce all general 3D data caches. iServer can produce and store MongoDB 3D image and 3D terrain tiles in a distributed way.
Sample 1: Produce 3D tiles distributedly and how to use
The steps are as follows:
- Produce the 3D data in SuperMap iDesktop, an then drage it into a new 3D scene. Save the workspace and scene;
- In SuperMap iDesktop, directly publish above workspace as SuperMap iServer 3D service, such as http://localhost:8090/iserver/services/3D-sample/rest;
- Access Distributed Map Tiling service provided by iServer. Create the tiling task and select the 3D service component 3D-sample, scene, image layer beijing@beijing, storage location m2. Set the tiling scale to create the tiling task, please refer to Create Tiling Task-3D Tiles;
- After finishing the SuperMap iServer distributed tiling task, you can publish the above tiles stored in m2 of MongoDB through Quickly publish services. Select beijing@beijing, and 3D-REST for service type. After publishing, the service name is 3D-scene/rest;
- Click this service and access the datas resource, then you can see the beijing@beijing in the data list. Click the 3D representation to view the data in the 3D scene.
Sample 2: Configure to use the pre-caches of the entire 3D scene
The steps are as follows:
- In SuperMap iDesktop, make the 3D data, and drag to a new scene "scene1", then save the scene and its workspace;
- In SuperMap iDesktop, publish the above scene1 as a 3D service;
- In SuperMap iDesktop, right click this scene1, and select Create Scene Cache. In the pop-up window, you can use the default set to generate caches; Or you can set parameters for every types of the data such as tile size, then create the caches. After finishing, copy the entire caches to the cache directory of iServer, i.e., [SuperMap iServer Installation]\webapps\iserver\output\scene1. Note that the name of the cache folder and the scene must be the same, that is, scene1.
- When you visit 3D services at http://server:8090/iserver/services/realspace-sample/rest/realspace/scenes/scene1.realspace, the iServer will automatically use the pre-caches you created.
Sample 3: Configure to use UGC V5.0 map caches
In 3D services, you also can load the global partitioning map caches of SuperMap UGC V5.0 (*.sci) in a 3D scene. To configure the caches, do the following:
- In SuperMap iDesktop, create a map, then drag it into a new scene "scene2", save the scene and workspace;
- In SuperMap iDesktop, publish the above workspace as a 3D service;
- In SuperMap iDesktop, right click the WorldMap, and select Map Cache(Single-task) or Map Cache(Multi-task) . In the pop-up window, you can set the cache version 5.0, select Global, select the scales and other parameters, finally click Create to generate caches. After finished, you copy the entire caches to the server side, i.e., [SuperMap iServer Installation]\webapps\iserver\output\scene2. Note that the name of the map caches and the map must be the same, that is, WorldMap.
- When you visit 3D services at http://server:8090/iserver/services/realspace-sample/rest/realspace/scenes/scene2.realspace, the iServer will automatically use the pre-caches you created.