Configure Transportation Analyst Service Provider

Feedback


SuperMap iServer supports the following types of transportation analyst service providers:

Configure UGC Transportation Analyst Provider

Configure a UGC transportation analyst provider as follows:

<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>
                <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>  
                <analystModeSetting>
                        <sscSetting>
                                <enabled>true</enabled>
                                <levelField>level_User</levelField>
                                <sscPath>C:\test.ssc</sscPath>
                                <autoGenerateSsc>false</autoGenerateSsc>
                        </sscSetting>
                </analystModeSetting>  
              <autoCheckNetwork>false</autoCheckNetwork> 
              <initFacilityAnalyst>true</initFacilityAnalyst>  
              <directionField>SmResistanceA</directionField>
        </config>
</provider>

Where, class in < provider > identifies the implementation class of the UGC transportation analyst provider, and the class in < config > identifies the configuration class corresponding to the local transportation network analysis service provider, that is, TransportationAnalystSetting . The contents in < config > are the corresponding configuration items, mainly including:

For a detailed description of these parameters, please refer to: Configuration of UGC Transportation Analyst Provider.

Note: When there is SSC documents shall be used directly. If there is no SSC file and the automatic generation parameter is enabled, the SSC file will be automatically generated. The SSC file is stored in the path specified by the sscPath parameter. When the configuration enables the best path analysis SSC analysis model but does not enable the automatic generation of SSC files and there is no existing SSC file, the service will not be available.

Note: Before configuring a local transportation network service provider, it is recommended to establish field indexes for the fields that identify network arc segment IDs and network node IDs.

 

Configure REST Traffic Network Analysis Service Provider

Configure a REST transportation analyst service provider as follows:

<provider class="com.supermap.services.providers.RestTransportationAnalystProvider" name="restSpatialProvider"> 
        <config class="com.supermap.services.providers.RestTransportationAnalystProviderSetting">
                <restServiceRootURL>http://localhost:8090/iserver/services/transportationanalyst-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 transportation analyst service provider, and the class in < config > identifies the configuration class corresponding to the REST traffic network analysis service provider, that is, RestTransportationAnalystProviderSetting . The contents in < config > are the corresponding configuration items, including:

Configure ArcGIS REST Network Analysis Service Provider

Configure an ArcGIS REST network analysis service providers as follows:

<provider class="com.supermap.services.providers.ArcGISRestNetworkAnalystProvider" enabled="true" name="transportationAnalyst-Streets_ND3"> 
      <config class="com.supermap.services.providers.ArcGISRestNetworkAnalystProviderSetting"> 
        <restServiceRootURL>http://localhost:6080/arcgis/rest/services/sample/NAServer</restServiceRootURL>  
        <token/>  
        <httpReferer/>  
        <networkDataset>Streets_ND</networkDataset>  
        <routeLayer>Route</routeLayer>  
        <serviceAreaLayer>Service Area</serviceAreaLayer>  
        <closestFacilityLayer>Closest Facility</closestFacilityLayer> 
      </config> 
    </provider> 

The class in < provider > identifies the implementation class of ArcGIS REST network analysis service providers, and the class in < config > identifies the configuration class corresponding to the ArcGIS REST network analysis service provider, that is, ArcGISRestNetworkAnalystProviderSetting. The contents in < config > are the corresponding configuration items, including: