SuperMap supports the generation of image caches for UDB, ORACLE, and SQLServer raster datasets, image datasets and SIT (SuperMap Image Tower) files that have been pyramided. The image cache is to process the image files into tile files. In order to optimize the publishing of image data on the server side and the browsing performance on the client side, SuperMap iClient3D for WebGL (hereinafter referred to as WebGL client) can access the 3D service published by SuperMap iServer to load image data.
This document mainly explains the detailed operation process of WebGL client to load and browse image data. The main operation process is as follows:
The following will take the example number "Mount Everest" for detailed operation demonstration.
This operation step generates *.sci3d 3D image cache files from the image data set through the SuperMap iDesktop desktop to facilitate the subsequent release of 3D services.
(1). Open the SuperMap iDesktop desktop product, and right-click "Data Source" in "Workspace Manager" to "Open File Data Source" ".
(2). Select the raster dataset you want to cache, right-click the "Generate Scene Cache" option.
Figure 1: Select "Generate scene cache"
(3). The "Generate Scene Cache" dialog box pops up, as shown in the figure below.
Figure 2: "Generate Scene Cache" dialog box
(4). Add data set: Click the "Add Data Set" button, select the data set that will be cached, click "OK", and set the following.
(5). In the dialog box "Parameter Settings", set the following:
Compact means that a certain compression and encryption mechanism is used to compress and encrypt the data when the cache is established; the original means that the data is not compressed and the original information of the image data is retained;
Block size represents the sample size of each cached block file generated, the unit is pixel, namely pixes*pixes.
(6). The information related to "Cache Range" and "Scale" can be left unchanged. Click the "Generate" button and wait for the generation to complete.
After the cache generation is completed, a *.sci3d cache configuration file and a folder storing image data are generated under the target path, as shown in the following figure.
Figure 3: Generate scene cache result
In the previous step, we generated the image cache data, and then published the image cache in the form of a 3D service to a local or remote server to facilitate the WebGL client to load the image service.
(1) In the "Workspace Manager" of the SuperMap iDesktop desktop product, right-click "New Spherical Scene" under "Scene".
(2) Select "Common Layer" under "Layer Manager", right-click "Add Image Cache Layer" , Select the *.sci3d file generated in the previous step.
Figure 4: Add image cache to the scene
(3) After adding the cache layer, save the scene and the workspace. The workspace file will be used to publish the 3D service of the workspace type.
(4) After saving the workspace, in the %SuperMap iServer_HOME%/bin directory, click the "startup.bat" batch file to start the SuperMap iServer service.
(5) Open the browser and enter http://localhost:8090/iserver/manager in the address bar Enter the "Service Management" page, and click "Quickly publish a service or a group of services" under "Home" Button.
Figure 5: Quickly publish one or a group of services
(6) The "Quick Publish Service-Select Data Source to Publish" dialog box pops up, select "Workspace" at "Data Source", click "Next".
Figure 6: Data source selection workspace
(7) The "Quick Publish Service-Configuration Data" dialog box pops up, click the "Remote Browsing" button to select the previously saved workspace, and click"Next".
Figure 7: Select workspace configuration data
(8) The "Quick Publish Service-Select Service Type to Publish" dialog box pops up, check "REST-3D Service", click "Next One step".
Figure 8: Check the 3D service
At this point, the service publishing has been configured. Follow the prompts to click the "Finish" and "Close" buttons.
After the service is published, it will be listed in the service list (http://localhost:8090/iserver/services) displays the 3D service, as shown in the figure below.
Figure 9: The newly released service is displayed under the 3D service
After publishing the 3D service, you can browse the image data through the WebGL client in this step.
Reminder: Please store the WebGL product package in the %SuperMap iServer_HOME%/webapps directory before operation.
(1) Obtain the 3D data url address, click to obtain in the following order:
Figure 10: Copy URL address
(2) Enter the storage path of the WebGL product package (%SuperMap iServer_HOME%/webapps), under the "examples" folder, Open the "terrainAndImagery.html" example in text mode, and modify the address in SuperMapimageryProvider() (the selected part in the figure) to the url address just copied, as shown in the figure below.
Figure 11: Modify some parameters of the example
(3) Open the "terrainAndImagery.html" webpage in localhost, and the browser input address is: http://localhost:8090/%WebGL product package%/examples/ terrainAndImagery.html
After opening the webpage, the camera flies to the location of the image data, the display effect is as follows:
Figure 12: WebGL browsing image data effect
Note: The effect of the above picture is the effect of loading image data and terrain data. For operations related to loading terrain data, please refer to Load terrain data Operation document.