配置地址匹配服务提供者

发送反馈


配置地址匹配服务提供者

配置工作空间为地址匹配服务提供者示例

<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>

配置地址索引为地址匹配服务提供者示例

  1.     <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 对应的配置项:

注:1.使用地址匹配服务时建议所有数据集的投影保持一致

       2.当前仅支持对中文进行匹配,不支持英文