配置地址匹配服务提供者 |
<provider class="com.supermap.services.providers.UGCAddressMatchProvider" enabled="true" name="addressmatch-BeijingAddress"> <config class="com.supermap.services.providers.UGCAddressMatchProviderSetting"> <dictionaryPath>./WEB-INF/config/addressMatchDictionary.dct</dictionaryPath> <isTraditional>true</isTraditional> <workspacePath>E:/supermap/data/BeijingAddress/BeijingAddress.smwu</workspacePath> <indexDir>E:/supermap/data/BeijingAddress/index</indexDir> <datasourceName>BeijingAddress</datasourceName> <datasetNames>company</datasetNames> <updateIndex>false</updateIndex> <geoDecodingRadius>500</geoDecodingRadius> <searchFields>NAME,园区名称,ADDRESS,county,city</searchFields> <indexEpsgCode>3857</indexEpsgCode> <binDistance>-1.0</binDistance> <maxReturn>10</maxReturn> <filterFields>city,county,ADDRESS</filterFields> <hour>3</hour> <minute>0</minute> <dayOfWeek>1</dayOfWeek> </config> </provider>
<provider class="com.supermap.services.providers.UGCAddressMatchProvider" enabled="true" name="addressMatch-index"> <config class="com.supermap.services.providers.UGCAddressMatchProviderSetting"> <isMultiInstance>false</isMultiInstance> <dictionaryPath>./WEB-INF/config/addressMatchDictionary.dct</dictionaryPath> <indexDir>E:\supermap_packages\data\BeijingAddress-new\BeijingAddress\index</indexDir> <poolSize>4</poolSize> <geoDecodingRadius>500.0</geoDecodingRadius> <indexEpsgCode>0</indexEpsgCode> <binDistance>-1.0</binDistance> <maxReturn>-1</maxReturn> <updateIndex>false</updateIndex> <hour>3</hour> <minute>0</minute> </config> </provider>
其中<provider>中的 class 标识的是 UGC 服务提供者的实现类,<config>中的 class 标识的是 UGC 服务提供者对应的配置类,即 UGCAddressMatchProviderSetting ,<config>中的内容是 UGCAddressMatchProviderSetting 对应的配置项:
<workspacePath>server=../samples/data/World/World.sxwu;password=supermap</workspacePath>
此外,工作空间路径支持从环境变量和系统配置文件中读取。可写为:
<workspacePath>server=${datapath1}/World.sxwu;password=supermap</workspacePath>详细说明请参见:预设本地工作空间路径
注:1.使用地址匹配服务时建议所有数据集的投影保持一致
2.当前仅支持对中文进行匹配,不支持英文