In order to improve the browsing and access efficiency of the image service, the dynamic cache scheme can be enabled. After the scheme is enabled, the existing tile resources under the cache directory will be directly loaded when the front-end browses the image map. If no available tile is found, the image will be dynamically plotted.
The existing Tile resources in the cache directory come from the following two ways:
Enable dynamic cache. Only the tile of the browsed area can be cached. It is difficult to cache the tile of all levels in all areas.
Silently slice the image service to pre-generate image map tiles for all levels in all areas. This pre-slicing method is suitable for application scenarios with low image mapdata update frequency but large concurrent access volume.
Silent slicing is time-consuming and machine intensive, so before configuring and executing silent slicing, verify the following:
The default cache directory path of the image service: installation directory\webapps\iserver\output\"ImageServiceName"\. The folder named "Image Collection Name" under this directory stores the tile of the corresponding collection.
The image service cache directory can be modified as follows:
1. Enter the service management page and click "Provider", as shown in the following figure.
2. Expand "Advance Settings", where the Tile Storage path is the cache directory; Tile Storage type: supports raw, compact, and MongoDB.
3. After completing the configuration, click the "Save" button to make the configuration effective.
Dynamic cache tiles and silent slice tiles of all image collections in the image service share the cache directory (tile storage path) and tile storage type configuration described above.
1. Enter the service management page, as shown in the following figure.
2. Click the target collection name to enter the collection configuration page.
3. Switch to the "Tile Cache Config" page and turn on "CacheEnable".
Configure the image type of the slice and other parameters, and continue to set the following parameters on the "Tile Cache Config" page:
The level, row and column numbers of the tile are divided by the global rule. Based on the global of the image collection coordinate system, the X index (column number) starts from the top left corner of the global. The index number is 0 and increases from left to right; The Y index (row number) starts from the top left corner of Global, the index number is 0, and increases from top to bottom; the Z index (level) starts from 0, and the corresponding scale bar is: 1:591658710.9091.
The tile scheme is configured in the image collection, and different collections in the service can be configured with different tile schemes.
Dynamic cache tile and silent slice tile for imaging services, share this tile scheme configuration.
There are two ways to perform silent slicing:
Proceed to the "Tile Cache Config" page to configure the slice execution parameters in the Silent Slice area:
Silent slicing takes a long time and occupies a lot of machine resources. You can use the known idle time of server resources for slicing by scheduling tasks. In this way, slicing is performed for a fixed time period each day, after which slicing is aborted; when the time period is reached again, slicing is resumed (tile breakpoint continuation).
The program will generate tiles for the hierarchy of specify range. For hierarchy settings, please read the Notes first.
The hierarchy and row and column numbers of the tile are based on the global rule, that is, based on the global of the image collection coordinate system. The X index (column number) starts from the upper left corner of the global, and the index number is 0, and increases from left to right; The Y index (row number) starts from the top left corner of global, the index number is 0, and increases from top to bottom; the Z index (level) adopts the level of Global rules, starts from 0, and the corresponding scale bar is: 1:591658710.9091.
Note the following about the slice level range:
For example, if the minimum Hierarchy Settings of the slice is 7 and the maximum Hierarchy Settings is 15, the silent slice first reads the image map to generate a 15-level Tile, and then generates a 14-level tile based on the 15-level tile. A 13-level tile is generated based on the 14-level tile, and so on, until the 7-level tile is generated.
the number of processes that execute the slicing task in the background. It is recommended to set it according to the machine configuration and the idle resources of the machine.
Configure the executable time period of the slice, select the "Start Time" and "End Time" of the time period, and click the "Add" button to add the selected time period to the list. Multiple time periods can be added.
A known idle time period of server resources can be configured as a slice time period. In this way, slicing is performed for a fixed time period each day, after which slicing is aborted; when the time period is reached again, slicing is resumed (tile breakpoint continuation).
After the silent slice is configured, click the "Add" button to make the configuration effective.
If the execution mode is "Immediate", the background starts slicing immediately after the configuration is saved. On the "Backend Job" page, you can track the execution progress and execution status of the task.
If the execution mode is "Planned Task", after the configuration is saved, the slice will be started in the background when the slice time period is reached, and the corresponding task will appear on the "Backend Job" page; when the time period is exceeded, the slice will be terminated; when the time period is reached again, the slice will be continued, and a new "TillingTaskSetting" will appear on the background task page.
When you need to stop the silent slice schedule task of the collection or change the slice execution mode, you need to cancel the current execution mode first, as shown in the following figure, and then change it after saving the configuration.
When the configured silent slice is The execution completed and the silent slice is not turned off (the status shown in the figure above is turned off), the following configuration modifications may trigger the silent slice execution again:
It is recommended to close the silent slice in time after the completion of the silent slice, and open it again when it is necessary to re-slice.
When the image display style is modified and the configuration is saved and silent slicing is turned on, the image will be re-sliced automatically.
When the tile scheme of image collection is modified, such as image type, background transparency, storage type and tile directory, and silent slicing is enabled, the image will be re-sliced automatically.
When image files is added to the image collection, the display style and tile scheme operations are not modified, and enabling silent slicing does not trigger re-slicing. You need to manually delete the "Image Collection Name" directory under the image service cache directory, and enable silent slicing to re-slice.
For example, when image collection has finished slicing from level 7 to level 15 and needs to cut the tile from level 16 to level 17, the range settings of the cutting level will be set to level 16 to level 17 while enabling silent slicing, that is, the range of the level that has finished slicing will not be included.
When the tile storage type is MongoDB, the operation of adding tile to image collection is not supported.