Table of contents
GeoServer has been used for a period of time and I have a little understanding of it. In actual work, I encountered the original gdb file of ArcGIS. It is obviously not cost-effective to deploy another set of ArcGIS. The idea is to use ArcGIS for slice cache, and then use GeoServer to publish slice cache.
Using ArcGIS Desktop 10.2 and GeoServer 2.16, first start ArcMap in the ArcGIS suite, and load the original image data that needs to be sliced.
1. Use ArcGIS to slice
1.1 Modify ArcMap options
Open "Customize" - "ArcMap Options",
select the "Sharing" tab, check "Enable ArcGIS Runtime Tools" in the "Packaging" column, and click OK.
1.2 Create a slice cache solution
Open Geoprocessing – ArcToolbox.
Select "Data Management Tools" - "Tile Cache" - "Generate Tile Cache Tiling Scheme" in the toolbar.
Open the scheme details page, select the data source respectively, set the slice scheme output path, the generation method defaults to "NEW", adjust the scale series according to actual needs, and save the scheme.
1.3 Start slicing
Open "File" - "Share As" - "Slice Package".
Select the path to save the slice package.
In "Slice Format", select the slice scheme saved in the previous step. The slice formats are PNG, JPEG, and Mixed (mixed), which can be selected as needed.
Enter the necessary text description in the required item of "Project Description", otherwise, clicking "Analyze" will prompt an error and cannot continue. Click "Analyze" and follow the prompts to resolve all severities. Finally click "Share" to start slicing.
The higher the slicing level, the longer it will take later. Wait patiently for the slicing to complete. If the amount of data is too large, you can have a meal or wait until after get off work to start.
2. Use GeoServer to publish the tile cache
The tile cache generated by ArcGIS is shown below. The tile results are stored according to the zoom level, and conf.xml is the configuration file of the tile cache.
2.1 Enable GeoWebcache
GeoServer comes with GeoWebcache after version 2.14. Open the web.xml in the running directory of GeoServer for configuration.
Add GeoWebCache configuration items and specify the storage path.
</context-param>
<context-param>
<param-name>GEOWEBCACHE_CACHE_DIR</param-name>
<!--自定义路径-->
<param-value>D:\Download\Map</param-value>
</context-param>
After restarting GeoServer, GeoWebCache related files will be automatically generated in the path just specified
2.2 Publish slices
Add arcgis layer in geowebcache.xml
<arcgisLayer>
<name>202211</name>
<tilingScheme>D:\xxx\202211\v101\conf.xml</tilingScheme>
<tileCachePath>D:\xxx\202211\v101\_alllayers</tileCachePath>
<hexZoom>false</hexZoom>
</arcgisLayer>
Restart GeoServer, open the address http://xxxx/geoserver/gwc and you can see the published slices in geowebcache.
GIS development is as deep as the sea, and each pit is deeper than the other.