Add image for the service through the add image collection.
About Image Service Architecture
The image service uses image collections to manage images. Multiple collections can be added to the service.
Image collection uses the mosaic dataset model to manage image metadata, and the corresponding mosaic dataset is created when the collection is created.
The collection mosaic dataset is stored in the image service's store datasource for image collection, which is specified when the service is created.
When publishing the image service, it is not included to set the image data content. After the service is created successfully, add the image through the "New Collection".
On the iServer service management page, images can only be added and deleted by adding and deleting image collection; adding and deleting a single image can only be implemented through the REST API interface.
Add Image Collection and Configuration Data
1. Enter the image service management page.
2. Click "New Collection" to enter the collection configuration page.
3. Configure Image Collection.
Configurable set information includes: basic info, image data, monitoring directory and automatic appending, image display style, and tile scheme.
- Basic Info: Set ID and coordinate system reference must be set. After the set is created, these information cannot be modified.
- Image Data: The image data source must be set. After the collection is created, images can only be added to the collection through the API or "Auto Append".
- Auto Append: Monitor the image data directory and automatically append new images. It must be configured when the collection is created. After the collection is created, modify configuration is not supported. Only on and off are supported.
- Image display style: After the collection is created, it can be modified, and it can not be configured at this stage.
- Tile scheme: After the collection is created, it can be modified, and it can not be configured at this stage.
Each parameter is described in turn below:
- Collection ID: used to uniquely identify the Image Collection in the service. Set ID can contain Chinese, English characters and numbers, and special characters are not supported.
- Title: The title of the image collection, which briefly describes the characteristics of the collection.
- CRS (EPSG code): the coordinate system of the set. Images in different coordinate systems under the set will be dynamic projection as the set coordinate system. The coordinate system is specified by the EPSG code. For example, 4326 represents WGS 1984 geographic coordinate system. The default value of the coordinate reference for the collection is: 4326, the WGS 1984 geographic coordinate system. If "Add Type" is "Existing Dataset", this argument has no effect, and the coordinate system of the assembly is equal to that of an existing mosaic dataset.
- Add Type: The source of the image data in the collection. For example, if the image comes from the "ImageFolder", it means to add the image files under the specified file catalog to the collection.
For the selection of "Add Type", please refer to: Image Adding Method of Different Storage Media .
In addition, if you select different "Add Type", the parameters to be configured are different. For details, please refer to Add Image Data Methods and Corresponding Parameters .
- Folder Address: Specify the path of image data directory. Only local path and shared directory path are supported; Adding multiple directory paths is supported. Only one directory can be specified through the file selector. You need to manually enter multiple directories separated by commas, for example: D:\ImageA,D:\ImageB.
- File Type: Refers to the file type of the image added to the collection. Check the corresponding file type. Multiple selections are supported.
- Search files in sub folders: When enabled, supports images in sub folders in the add image directory.
- Add Data Processes Count: The number of processes performing the add image task. The default is 4. It needs to be set reasonably according to the number of image files and machine resources.
When the number of image files is large, the efficiency of adding images to the collection increases with the number of processes. When the number of image files is small, the efficiency of adding images to the collection does not increase with the number of processes.
Configure Auto Append Image
Auto append can automatically append new images under the directory to image collection by configuring the monitoring directory. When the image service data update frequency is high, automatic append can be enabled.
Automatic appending must be configured when the collection is created (monitoring directory and interval time are required parameters). After the collection is created, Modify Configuration is not supported, and only on and off are supported.
Automatic append applies only to the datasource that stores the image collection for the service as a database. The datasource storing the image collection is configured when the service is created, and can also be modified by entering the "advance settings" on the "Provider" page; the original datasource content will be copied to the modified datasource.
1. Open "Enable Auto Append". After opening, the new image files under the monitoring directory will be automatically added to the collection.
2. Configure the monitored directory list, enter the path of the monitored image data directory, and click "Add".
The monitoring directory is usually the same as the image data directory, but other directories can be set. Multiple data directories can be added. Currently, only Local Directory can be monitored. For remote directories, they can be mounted as local directory.
3. Configure the interval.
The interval time indicates how often the automatic append image operation is triggered from the time point when the automatic append trigger is started. The interval time is also the frequency for the monitoring directory program to summarize the newly added Image Files, that is, to summarize the newly added images in the interval from the current automatic addition trigger time point to the last trigger time point.
Other configurations
Continue to configure the collection other parameters as needed:
- Keywords: Easy to query and retrieve Image Collection.
- Editable: On, indicating that the collection allows you to add and delete images.
- Downloadable: On, indicates that images in the collection are allowed to be downloaded. The image can be downloaded, and other configurations need to be completed. Refer to Configuring the Data Download Capability of Image Service .
- License: Image data license agreement should be added with a URL to the license text.
- CollectionProvider: configure the data provider Details. Multiple data providers can be added through "Add Collection Provider".
Save the configuration
After the collection is configured, click the "Add" button, and the program saves the configuration and creates the Image Collection.
- View the "Backend Job" page, and the corresponding set creation task will appear. The task type is "Add Collection", and the creation progress, creation status and other information can be obtained.
- After The task executed successfully is collected by adding image, click "Detail" to view the execution report, including: add image file summary information, add failed image list and failure reasons, and optimize image inspection results based on service management (for example, image pyramid and statistic infomation are missing) and optimization scheme.
When there is a large amount of image data, it takes some time to create and initialize the image collection. The factors that affect the date created of the collection include the number of adding image file and the number of adding image processes. As well as the storage media of image files, it will affect the access efficiency of images. Generally, the access efficiency of local storage is higher than that of network storage; under network storage, the access efficiency is affected by network bandwidth.
- If the collection is configured with "Enable Auto Append", after the collection is created successfully, the background will start the directory monitoring program and the auto append trigger, as shown in the following figure, and take this time point as the starting point of the auto append image trigger interval.
Continue with Add Image Collection
Continue to add image set as needed, click "New Collection" to complete the above configuration and add.
After image data is published quickly with the "New Collection", you can preview the image in the image collection list.
Add Image Data Mode and Corresponding Parameters
The following modes are supported when configuring the "Add Type" above. For the mode selection, please refer to Image adding modes of different storage media .
- ImageFolder: Adds the image files under the specified file catalog to the collection.
- ListFile: Adds the image files (image file path) recorded in the specified.txt file to the collection.
- SingleFile: Adds a specified image to the collection.
- Existing Dataset: Adds an image from the specified existing mosaic dataset to the collection.
Select different "Add Type", and the parameters to be configured are different. The parameters corresponding to "ImageFoleder" have been introduced above, and the parameters corresponding to other modes are introduced below.
MListFile:
Manifest File Address: The full path of the .txt file where the video file Path is recorded.
The contents of the manifest file (.txt file) are a line of records corresponding to the full path of an image files. For the encoding of.txt files, UTF-8 must be "UTF-8 No BOM Format Encoding", and there are no other special requirements.
For images on different storage media, the image file path in the .txt file is written differently:
- Local storage: e.g.:/home/data/images/H48C002002.tif (Linux system) or E:\data\imageChina\H48C002002.tif (Windows system)
- Shared directory: e.g. \\\\172.16.120.34\\imageChina\\H48C002002.tif(Windows system)
- FTP server: e.g. ftp://127.0.0.1/imageChina/H48C002002.tif.
- Object storage: including Huawei OBS object storage service, Alibaba OSS object storage service and S3 simple storage service. Image file path of object storage is different due to different access protocols. For details, refer to Object Storage
The efficiency of the collection using the manifest file add image is better than that of the image data directory; for the object storage, the image in the FTP server can only be added to the collection through the manifest file.
SingleFile:
Image Files Address: Specify a full path of image files. Only local path and shared directory path are supported. Supported file types:.tif, .tiff, .ecw, .img.
Existing Dataset:
- Datasource Type: The type of the Datasource where the mosaic dataset is located.
- Dataset name: All images for this manage mosaic dataset will be added to the collection.
- Copy data: It is enabled by default, and the "Existing Dataset" will be copied to the image service "Datasource stored in Image Collection". Data management operations on collections do not affect existing mosaic datasets. Close. The collection directly references the existing mosaic dataset. The data management operation on the collection is the operation on the mosaic dataset.