3D service cache mechanism

Feedback


In order to improve the overall performance of 3D data application, you should preprocess the data before using it, that is, you should create hierarchical cache. Take the preprocessing of image data for example, you should simplify the image data into the image collection of various resolutions and create a series of layers of different resolutions by resample methods, and then split and store each layer and build corresponding spatial index mechanism, so as to improve the display speed of image zooming and browsing. Such action of preprocessing the vector data, image data, terrain data or model data to create hierarchical cache is called 3D caching.

Cache mechanism

SuperMap iServer's 3D service supports general cache mechanism provided by server. For example, HTTP cache, Request cache, and it also supports its special 3D cache, including dynamic cache and manual prechache.

Dynamic cache

SuperMap iServer supports dynamic cache to increase clients' access speed of 3D scene.

After publishing 3D service, if it is the first time for a client to access service and read data, server will dynamically generate the corresponding layer's 3D. There is no need of generating cache for user's next access. In other words, except loading data and generating cache for use's first time access, server will call cache data in client directly, thereby increasing server's response speed when client is accessing 3D service.

SuperMap iServer's 3D service enables dynamic cache by default, without manual setting. About cache type and format generated by SuperMap 3D service, please refer to: Storage format.

Precache

Precache of 3D service means that putting the precache of file or whole scene into SuperMap iServer's corresponding cache directory, i.e, copying cache file to [SuperMap iServer installation directory]\webapps\iserver\output\{scene}.

After stores tiled cache file to above directory in advance, client will use cache data directly when browsing 3D service scene, no long generate dynamic cache. About data type and format of precache supported by SuperMap 3D service, please refer to: Storage format. When using 3D service's precache function, please keep the path and cache name compliant. The advantage of using whole 3D scene cache is that, in SuperMap iDesktop just one operation can tile all data in the scene into cache, and storing whole scene data to 3D service cache directory make it easier to ensure the consistency of every data cache file's name and directory. Therefore precaching for whole scene is recommended.

Notice

Cache format

Cache format

SuperMap iServer supports these cache formats: Image cache,terrain cache,vector cache, vector model cache, 2D and 3D map cache and whole 3D scene cache.

Cache type

Cache format

Description

Vector *.scv Cache name:datasetname@datasourcename
Image *.sci Cache name:datasetname@datasourcename_MIX
Terrain *.sct Cache name:datasetname@datasourcename_Terrain_ZIP
Model *.scv, *.osgb, *.s3m  
Map *.sci(map cache)
*.sci3d(scene cache)
Cachename:mapname
  • *.sci is Cache of SuperMap UGC V5.0 global subdivision, can be used for precaching of 3D service
  • *.sci3d is the format of scene cache file. Dynamic cache generates scene cache file automatically.
 
Scene cache   Cachename:3Dscenename
Scene cache is a group of files, which is the corresponding 3D cache respectively generated by each type of data mentioned above.

Notice: for *.sci format SuperMap UGC V5.0 map cache, only global partitioning can be used for 3D service.

Storage format: orgional and compact

Original--when the cache storage type is the original type, namely StorageType.Original, the cache files are of original picture formats, and the cache data appears as the picture format in multiple folders. The cache files are of *.bil format for terrain cache, and of *.png format for image cache.

Compact--when the cache storage type is StorageType.Compact, the cache files are of large-file cache format, and the cache data is of compact-file format. The cache files are not original cache pictures. Rather, they compact and encrypt all the cache pictures in the folders and store them into a group of files. This group of files can be divided into three parts: index files, a group of data files and lock files. The index files are of *.sc (SuperMap Cache File) format; the data files are of *.scXX (SuperMap Cache File Data) format, where the XX are not two letters but two hexadecimal numbers (00 ~ FF). Only two hexadecimal numbers are supported here, that is, 256 data files at most are supported. The number of data files is decided by the size of cache data. The size of a data file is 2G at most. In addition, there may be a lock file (of *.~ format) in windows, that is used to realize multi-process or multi-threading reading and writing of the cache. Compared with the original type, the compact storage type has following advantages:

(1) Good for transmitting and copying massive cache files;

(2) Shortens the time spent on creating cache;

(3) Improves the performance of getting cache files on the client;

(4) Supports encryption.