Configure the Image Service Provider
|
Feedback
|
Configure an image service provider as follows:
<provider class="com.supermap.services.providers.UGCImageServiceProvider" enabled="true" name="imageservice-ChinaImages">
<config class="com.supermap.services.providers.ImageProviderSetting">
<id>ChinaImages</id>
<title>ChinaImages</title>
<collectionConfigs>
<com.supermap.services.components.ImageCollectionSetting>
<id>ChinaTIFF</id>
<title>National. tif format image data</title>
<crs>EPSG:4326</crs>
<dataConnectionInfo>
<type>IMAGEFOLDER</type>
<server>H:\ChinaImages</server>
<ext>.tif</ext>
<datasetName>ChinaTIFF</datasetName>
</dataConnectionInfo>
<editable>false</editable>
<downloadable>false</downloadable>
<cacheEnable>true</cacheEnable>
</com.supermap.services.components.ImageCollectionSetting>
</collectionConfigs>
<description>Image data covering the Chinese region, coordinate system WGS84</description>
<datasourceConnectionInfo>
<engineType>UDBX</engineType>
<server>E:/imageserver/imageService/ChinaImages.udbx</server>
</datasourceConnectionInfo>
<outputPath>../../webapps/iserver/output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
</config>
</provider>
The class in <provider> identifies the implementation class of the UGC service provider, while the class in <config> identifies the configuration class corresponding to the service provider, namely ImageLayoutSetting.
The following is a detailed description of the configuration contents in < provider >. The configuration contents in < provider > are divided into two parts: First: basic information configuration. Second: Image combination configuration in the service (< collectionConfigs >).
The basic information configuration
- <id>: Image service configuration's ID。
- <title>: The name of the image service configuration.
- <description>: A detailed description of the image services.
- <datasourceConnectionInfo>: Configure data source connection information. Used to specify the data source for storing a collection of images. The images in the image service will be organized into image collections, which are stored in a SuperMap data source that supports UDBX file type data sources and PostGIS, PostgreSQL database type data sources.
- < engineType >: Data source types, supporting two types: UDBX: UDBX file type data source; PostGIS: PostGIS database based data source; PostgreSQL: PostgreSQL database type data source. Based on the selected data source type, selectively complete the configuration items under <datasourceConnectInfo>.
- < Server>: If data source type is UDBX, it is the path of UDBX data source file; if datasource type is database type, it is the database server.
- < Database & gt;: if data source type is database type, it is name.
- < User>: If datasource type is database type, it is the database access user name.
- < Password >: If datasource type is database type, it is the database password.
The image management configuration
Images in an image service are organized in an image management. An image service can contain multiple image managements. Only images with the same pixel format and number of bands can be added to the same image management.
<com.supermap.services.components. ImageCollections Setting> is a configuration for a collection of image services, therefore,can contain multiple <com. supermap. services. components ImageCollectionSetting>.
The following describes the image management configuration item in detail:
- <id>: image managementID, used to uniquely identify the image management in the service.
- <title> The title of image management, which is different from ID, has no character limit.
- <keywords> Keyword. Multiple keywords can be included and separated by commas.
- <dataConnectionInfo>: Image data configuration, used to configure the source of image data in the collection.
- <type>: Specifies the source of the image data in the collection. The source of the image can be provided in the following ways:
1. Image data directory, the parameter value is set as IMAGEFOLDER.
2. List file, the parameter value is set as: LISTFILE, a.txt file, the content of which is a list of image file paths, and one line records the full path corresponding to an image file.
3. For a single image file, the parameter value is set to SINGLEFILE.
4. Mosaic data set in udbx type or PostGIS, PostgreSQL database type data source. This parameter value is set to: DATASET.
- <server>: Configure the image data source. The content of the parameter value is different according to the value of "type":
1. The type value is IMAGEFOLDER, which is the image data directory path and supports multiple directory paths. You need to specify whether to search the files in the subfolder through "<recursive>" and specify the type of image files to be added through "<ext>".
2. The type value is LISTFILE, which is the path to the manifest file (.txt).
3. The type value is SINGLEFILE, and the parameter value is the path of an image file.
4. The type valueis DATASET, the value of the paramete is the data source of the mosaic data set, and if the data source is udbx type, the value of the parameter is the UDB Xudbx path; If the data source is a PostGIS or PostgreSQL database data source, the parameter value is the database server. In addition, the name, user name, and password parameters need to be further set.
- <ext>: Specifies the type of video file to be added, that is, the video file extension. Multiple file extensions can be specified and separated by commas, such as.tif.img.ecw.
- <recursive>: Whether to search for files in subfolders.
- <database>:Database Name.
- <user>: The database access user name.
- <password>: The database password.
- <datasetName>: if the image data source of the set is the existing mosaic dataset, the mosaic dataset name is specified here; if the image data source of the set is not the existing mosaic dataset, the parameter value is the image managementdataset name.
- <cacheEnable>: enable caching; If the parameter value is true, it indicates that the cache is enabled, and the dynamically generated tiles are cached when the images in the collection are browsed; if the parameter value is false, it indicates that the cache is disabled.
- <downloadable>: indicates whether the image data asset in image management supports downloading. If the parameter value is true, it indicates that downloading is supported; if the parameter value is false, it indicates that downloading is not supported.