Configuring spatial analysis service provider |
SuperMap iServer supports the following types of spatial analysis service providers:
Configure a UGC spatial analysis service provider as illustrated below:
<!-- UGC spatial analysis provider--> <provider class="com.supermap.services.providers.UGCSpatialAnalystProvider" name="ugcSpatialProvider"> <config class="com.supermap.services.providers.UGCSpatialAnalystProviderSetting"> <workspacePath>../../samples/data/SpatialAnalyst/spatialAnalyst.sxwu</workspacePath> </config> </provider>
Where the class of <provider> identifies the implementation class of the UGC spatial analysis service provider, the class of <config> identifies the UGCSpatialAnalystProviderSetting, and the content of <config> is its corresponding configuring items:
<workspacePath> represents the path of the workspace used by the service provider. In addition, the workspace path supports reading from environment variables and system configuration files. It can be written as:
<workspacePath>${datapath1}/World.sxwu</workspacePath>For details, see: Presetting local workspace path
Configure a REST spatial analysis service provider as illustrated below:
<!-- REST spatial analysis provider--> <provider class="com.supermap.services.providers.RestSpatialAnalystProvider" name="restSpatialProvider"> <config class="com.supermap.services.providers.RestSpatialAnalystProviderSetting"> <restServiceRootURL>http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr</restServiceRootURL> <restProviderCacheConfig> <maxElementsInMemory>1</maxElementsInMemory> <maxSizeOnDisk>2048</maxSizeOnDisk> <timeToLiveSeconds>0</timeToLiveSeconds> <timeToIdleSeconds>0</timeToIdleSeconds> </restProviderCacheConfig> <useCache>true</useCache> </config> </provider>
Where the class of <provider> identifies the implementation class of the REST spatial analysis service provider, the class of <config> identifies the RestSpatialAnalystProviderSetting, and the content of <config> is its corresponding configuring items: