Configure 3D Service Provider |
SuperMap iServer supports the following types of 3D service providers:
Configure a UGC 3D provider as follows:
<!-- Local 3D service provider -->
<provider class="com.supermap.services.providers.UGCRealspaceProvider" name="3DProvider">
<config class="com.supermap.services.providers.UGCRealspaceProviderSetting">
<workspacePath>../../samples/data/Realspace/RealspaceSample.sxwu</workspacePath>
<xmlParse>false</xmlParse>
</config>
</provider>
The class in < provider > identifies the implementation class of UGC 3D service providers, and the class in < config > identifies the implementation class of UGC 3D service providers. Class identifies the configuration class corresponding to UGC 3D service providers, that is, UGCRealspaceProviderSetting , and the content in < config > is the corresponding configuration item.
< workspacePath > represents the path to the workspace used by the service providers. In addition, the workspace path supports reading from environment variables and the system config file. It can be written as:
<workspacePath>${datapath1}/World.sxwu</workspacePath>
For detailed instructions, please refer to:Preset Local Workspace Path
Configure a REST 3D service providers as follows:
<!-- REST 3D Service Provider -->
<provider class="com.supermap.services.providers.RestRealspaceProvider" enabled="true" name="rest3DProvider-test">
<config class="com.supermap.services.providers.RestRealspaceProviderSetting">
<restServiceRootURL>http://localhost:8090/iserver/services/3D-sample/rest</restServiceRootURL>
<restProviderCacheConfig>
<maxElementsInMemory>1</maxElementsInMemory>
<maxSizeOnDisk>2048</maxSizeOnDisk>
<timeToLiveSeconds>0</timeToLiveSeconds>
<timeToIdleSeconds>0</timeToIdleSeconds>
</restProviderCacheConfig>
<useCache>true</useCache>
</config>
</provider>
The class in < provider > identifies the implementation class of the rest 3D service providers, and the class in < config > identifies the configuration class corresponding to the REST 3D service provider, that is, RestRealspaceProviderSetting , and the content in < config > is the corresponding configuration item. Including:
Configure a MongoDB 3D service providers as follows:
<!-- MongoDB 3D service provider-->
<provider class="com.supermap.services.providers.MongoDBRealspaceProvider" enabled="true" name="mongoDB3DProvider-scene">
<config class="com.supermap.services.providers.MongoDBRealspaceProviderSetting">
<serverAdresses>
<string>192.168.120.47:27017</string>
</serverAdresses>
<database>smtiles</database>
<username>iserver</username>
<password>iserver</password>
<tilesetNames>
<string>1181328118</string>
</tilesetNames>
</config>
</provider>
The class in < provider > identifies the implementation class of MongoDB 3D service provider, and the class in < config > identifies the configuration class corresponding to the MongoDB 3D service provider, that is, MongoDBRealspaceProviderSetting . The content in < config > is the corresponding configuration item. Including:
Configure a local 3D realspace provider as follows:
<!-- 3D Slice Cache Service Provider-->
<provider class="com.supermap.services.providers.LocalRealspaceProvider" enabled="true" name="local3DCache-osgb">
<config class="com.supermap.services.providers.LocalRealspaceProviderSetting">
<configFile>..../samples/Data/3D_Cache/osgb/jinjiang_Compressed-test.scp</configFile>
<isMultiInstance>false</isMultiInstance>
<clipregions>
<com.supermap.services.components.commontypes.georegion3d>
<id>0</id>
<points class="com.supermap.services.components.commontypes.Point3D-array">
<com.supermap.services.components.commontypes.point3d>
<x>121.0</x>
<y>38.0</y>
<z>-6.0</z>
</com.supermap.services.components.commontypes.point3d>
<com.supermap.services.components.commontypes.point3d>
<x>121.0</x>
<y>38.0</y>
<z>-48.0</z>
</com.supermap.services.components.commontypes.point3d>
<com.supermap.services.components.commontypes.point3d>
<x>121.0</x>
<y>38.0</y>
<z>-49.0</z>
</com.supermap.services.components.commontypes.point3d>
</points>
<parts>
<int>3</int>
</parts>
<type>REGION3D</type>
<rotationx>0.0</rotationx>
<rotationy>0.0</rotationy>
<rotationz>0.0</rotationz>
<scalex>0.0</scalex>
<scaley>0.0</scaley>
<scalez>0.0</scalez>
</com.supermap.services.components.commontypes.georegion3d>
</clipregions>
</config>
</provider>
The class in < provider > identifies the implementation class of the local 3D realspace provider, and the class in < config > identifies the configuration class corresponding to the 3D slice caching service provider, that is, LocalRealspaceProviderSetting, and the content in < config > is the corresponding configuration item. Including:
Configure a 3D tiles realspace provider:
<!--3DTiles caching service provider-->
<provider class="com.supermap.services.providers.ThreeDTilesRealspaceProvider" enabled="true" name="ThreeDTilesCache-attribute">
<config class="com.supermap.services.providers.ThreeDTilesRealspaceProviderSetting">
<configFile>E:/test-data/pointHanging/NewDGN/attribute.json</configFile>
<isMultiInstance>false</isMultiInstance>
</config>
</provider>
The class in < provider > identifies the implementation class of the 3dtiles realspace provider, and The class in < config > identifies the configuration class corresponding to the 3DTiles caching service provider, that is, ThreeDTilesRealspaceProviderSetting. The content in < config > is the corresponding configuration item. Including:
Configure an OSS 3D tiles cache service providers:
<!-- 3D tiles cache service provider-->
<provider class="com.supermap.services.providers.OssRealspaceProvider" enabled="true" name="oss3DCache-233232">
<config class="com.supermap.services.providers.OssRealspaceProviderSetting">
<configPath>Config.scp</configPath>
<ossWebsite>http://oss-cn-beijing.aliyuncs.com</ossWebsite>
<bucketName>233232</bucketName>
<accessKeyId>LTAI4G8HxYSCzAsbSuperMap</accessKeyId>
<accessKeySecret>GQDvAQ2UXkjrwrtVo0cOVX1SuperMap</accessKeySecret>
<isMultiInstance>false</isMultiInstance>
<cacheKey>SuperMapUXkjrwrtVo0</cacheKey>
</config>
</provider>
The class in < provider > identifies the implementation class of 3D tiles cache service providers, and the class in < config > identifies the configuration class corresponding to the OSS 3D tile caching service provider, namely OssRealspaceProviderSetting. The content in < config > is the corresponding configuration item. Including:
Configure an S3 3D tiles cache service providers:
<!-- S3 3D tile caching service provider-->
<provider class="com.supermap.services.providers.SuperMapTilesRealspaceProvider" enabled="true" name="s33DCache-sichuanImage-2">
<config class="com.supermap.services.providers.SuperMapTilesRealspaceProviderSetting">
<configFile>/sct/sichuan_Image/sichuan_Image.sci3d</configFile>
<s3ConnectionInfo>
<endpoint>http://172.16.1.1:9090</endpoint>
<region>us-east-1</region>
<accessKey>minioadmin</accessKey>
<secretKey>minioadmin</secretKey>
</s3ConnectionInfo>
<cacheKey>123456</cacheKey>
<isMultiInstance>false</isMultiInstance>
</config>
</provider>
The class in < provider > identifies the implementation class of S3 3D tiles cache service providers, and the class in < config > Class identifies the configuration class corresponding to S3 3D tiles cache service providers, namely SuperMapTilesRealspaceProviderSetting . The content in < config > is the corresponding configuration item. Including:
Configure a UGCV5 (MVT) 3D service providers:
<!--UGCV5 (MVT) 3D service provider-->
<provider class="com.supermap.services.providers.MVTTileRealspaceProvider" enabled="true" name="3Dmvt-ShiJieDiTuDay">
<config class="com.supermap.services.providers.ThreeDTilesRealspaceProviderSetting">
<configFile>F:/World Map_Day/World Map_Day.sci</configFile>
<isMultiInstance>false</isMultiInstance>
</config>
</provider>
The class in < provider > identifies the implementation class of UGCV5 (MVT) 3D service providers, and the class in < config > identifies the configuration class corresponding to the UGCV5 (MVT) 3D service provider, that is, ThreeDTilesRealspaceProviderSetting . The content in < config > is the corresponding configuration item. Including: