首页 / 浏览问题 / 云GIS / 问题详情
连通性分析出错
20EXP 2019年12月09日
我发布了一个交通网络分析服务,想做连通性分析,但是返回的结果不对,一直显示的有连通。发布时我是把iserver-services.xml中的initFacilityAnalyest字段改为true,那么directionField字段应该设置成什么?smedgeid?

1个回答

这个要根据您自己的数据来设置,就是在用桌面进行地图配置的时候数据中设置的相关的流向字段。您也可以参考我们自带的服务中的流向字段的值的设定
5,668EXP 2019年12月09日
请问是在哪一步进行配置的呢?还有你们自带的服务的流向字段在哪看?

iserver自带的范例需要下载非deploy包,和iserver-services.xml文件同级目录会有一个iserver-services-sample.xml文件,其中就有相关的一些womeniserver自带的服务范例可以参考。这个是我从我们的范例的xml文件中找到的设定initFacilityAnalyest和directionField的范例,您可以参考一下

<provider class="com.supermap.services.providers.UGCTransportationAnalystProvider" inner-providerNames="ugcDataProvider-Changchun" name="transportationAnalystProvider-Changchun"> 
      <config class="com.supermap.services.providers.TransportationAnalystSetting"> 
        <workspaceConnectString>../../samples/data/NetworkAnalyst/Changchun.sxwu</workspaceConnectString>  
        <!-- 交通换乘分析允许的最大并发数。该值一般不应大于系统CPU核数的一半,不设置或值为0时,iServer会在启动时根据CPU核数动态设置。
		<poolSize>0</poolSize> -->  
        <datasourceName>Changchun</datasourceName>  
        <datasetName>RoadNet</datasetName>  
        <ruleField>TRule</ruleField>  
        <forwardSingleWayRuleValues> 
          <string>FT</string> 
        </forwardSingleWayRuleValues>  
        <backwardSingleWayRuleValues> 
          <string>TF</string> 
        </backwardSingleWayRuleValues>  
        <twoWayRuleValues> 
          <string>twoWay</string> 
        </twoWayRuleValues>  
        <prohibitedWayRuleValues> 
          <string>prohibit</string> 
        </prohibitedWayRuleValues>  
        <edgeIDField>SmEdgeID</edgeIDField>  
        <edgeNameField>RoadName</edgeNameField>  
        <nodeIDField>SmNodeID</nodeIDField>  
        <nodeNameField>SmNodeID</nodeNameField>  
        <fromNodeIDField>SmFNode</fromNodeIDField>  
        <toNodeIDField>SmTNode</toNodeIDField>  
        <tolerance>500.0</tolerance>  
        <weightFieldInfos> 
          <com.supermap.services.components.commontypes.WeightFieldInfo> 
            <name>length</name>  
            <forwardWeightField>Length</forwardWeightField>  
            <backWeightField>Length</backWeightField> 
          </com.supermap.services.components.commontypes.WeightFieldInfo>  
          <com.supermap.services.components.commontypes.WeightFieldInfo> 
            <name>time</name>  
            <forwardWeightField>FT_TIME</forwardWeightField>  
            <backWeightField>TF_TIME</backWeightField> 
          </com.supermap.services.components.commontypes.WeightFieldInfo> 
        </weightFieldInfos>  
        <turnDatasetInfo> 
          <workspaceConnectString>../../samples/data/NetworkAnalyst/Changchun.sxwu</workspaceConnectString>  
          <datasourceName>Changchun</datasourceName>  
          <datasetName>RoadNet_TURN</datasetName>  
          <nodeIDField>NodeID</nodeIDField>  
          <fromEdgeIDField>FEdgeID</fromEdgeIDField>  
          <toEdgeIDField>TEdgeID</toEdgeIDField>  
          <weightFields> 
            <string>TurnCost</string> 
          </weightFields> 
        </turnDatasetInfo>  
        <initFacilityAnalyst>true</initFacilityAnalyst>  
        <directionField>SmResistanceA</directionField> 
      </config> 
    </provider>  

...