tileData


URI

  1. /data/index/{nRow}/{nCol}.{fileExtension}
  2. /data/path/{filePath}.{fileExtension}

Supported methods

GET, HEAD

Parent resource

data

Introduction

Tile data, i.e., cache files, can be identified either using the index of the tile data, or using the path of the data file. Therefore two types of URI template exist: URI1 is for accessing the tile data using the index; URI2 is for accessing the tile data using the path of the data file. The path of the data file in the latter case is a relative path (relative to the directory where the configuration file of the tile data is) and is separated with "/". Additionally, the tile data can be packaged and downloaded via URI2. Please see the detailed description of URI2 parameters for more information about how to download.

Note: The concept of index is not applicable for KML data. Thus only the URI2 mode can be applied to KML data. In this case, the KML dataset itself is retrieved through the relative path of the data file.

Supported Methods:

Supported output formats: The output format of a tileData resource is the file extension of the 3D dataset. The file extension of the tile data ({fileExtension}) is different for different types of tile data. The data types and their corresponding file extensions are listed below:

Table: Extensions of tile data files

Data type File extension
Cached image data png, jpeg
TCached terrain data bil
Cached 3D model data scvb, scvd cached data and model texture image format in JPG, bmp, png, etc.
KML data kml, kmz
SuperMap vector data scvb, scvd
(spatial information is returned from the server if scvb is the extension; attribute information is returned if scvd is the extension.)
Raster volume data scvo

Resource hierarchy

根资源 3D 资源 datas 资源 data 资源 tiledata 资源

HTTP request methods

Below is an example of performing an HTTP request on a URI with data "WorldMap". supermapiserver in the URI is the name of the server.

http://supermapiserver:8090/iserver/services/3D-sample/rest/realspace/datas/WorldMap/data/index/1/1.png?level=1

GET request

Get the tile data resource, i.e., a specific tile of cache file from the cached 3D data.

Request parameter

Proper parameters need to be included in the URI when performing a GET request on the tileData resource.

For URI1, the parameters passed before "?" are as follows:

Name Type Description
nCol int The column number of the tile for the cache file in the global subdivision grid.
nRow int The row number of the tile for the cache file in the global subdivision grid.
fileExtension String The file extension of the tile data. (See: Tile data file extension)

The parameters after "?" are all optional and listed as follows:

Name Type Description
scale double The scale of the data tiles. It is recommended that tile data is requested through scale parameter, but not level.
level int The level of the data tiles. While data are two dimensional tiles, or cache data before version 7.1, this parameter is required.
dataVersion String The data version.
userName String username
userPassword String The user password.
serviceVersion String The service version.
_cache boolean Whether to use cache, the default is True. False means close all the caches.

SuperMap iServer supports get image cache data by specific layer name, it can be done by passing sceneName and layerName parameter after URI1 “?”. The description is as the following:

Name Type Description
sceneName String [Optional parameter]
Scene name. It is required when requesting the image cache data of specific layer.
layerName String [Optional parameter]
Layer name. It is required when requesting the image cache data of specific layer.

 

For URI2, the parameters passed before "?" are as follows:

Name Type Description
filePath String Two purposes:

1. When an individual tile data file is to be downloaded, this parameter represents the relative path of the tile data file (relative to the directory where the configuration file of the tile dataset is.);

2. When a set of tile data files are to be packaged and downloaded, this parameter represents an array of target tile data files, including the relative path, the file name as well as its extension. The form is similar to: [/path1/a.png,/path1/b.png].

fileExtension String Two different cases corrresponding to filePath:
1. If the filePath represents the relative path of an individual tile data file, fileExtension is then the extension of the tile data file, such as *.png, (See: Tile data file extension);
2. If the filePath represents an array of tile data files to be packaged and downloaded, fileExtension is then the extension of the array of the tile data files, i.e., the format of the zipped file. Only *.7z is currently supported.

Response structure

Performing a GET request on the tileData resource returns the resource of the tile data (or the dataset itself for KML data), which can be saved and used by clients.

Example usage

The URI below is for performing a GET request on an example tileData resource:

http://supermapiserver:8090/iserver/services/3D-sample/rest/realspace/datas/WorldMap/data/index/1/1.png?level=1

The tile data at level 1, column 1, and row 1 of the WorldMap is returned, as shown below:

HEAD request

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.

HEAD request can be used to check if the tileData resource exists, or if the resource can be accessed by clients. It can also determine if the tileData resource supports an output format {fileExtension} if performing on a URI with .{fileExtension} included.

See