Configuring transportation analyst provider |
SuperMap iServer supports the following types of transportation analysis service providers:
Configure a UGC local transportation analysis service provider as below:
<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> <autoCheckNetwork>false</autoCheckNetwork> <initFacilityAnalyst>true</initFacilityAnalyst>
<directionField>SmResistanceA</directionField> </config> </provider>
Where the class of <provider> identifies the implementation class of the local transportation analysis service provider, the class of <config> identifies the TransportationAnalystSetting, and the content of <config> is its corresponding configuring items:
Datasources such as <workspaceConnectString>, <workspaceType>, <datasourceName> and <datasetName>. Where <workspaceConnectString> represents the path of the workspace used by the service provider. In addition, the workspace path supports reading from environment variables and system configuration files. It can be written as:
<workspaceConnectString>${datapath1}/World.sxwu</workspaceConnectString>For details, see: Presetting local workspace path
Data and algorithm parameters used by local transportation analysis, such as <turnDatasetInfo>, <weightFieldInfos>, <nodeIDField>, <nodeNameField>, <fromNodeIDField>, <toNodeIDField> and <tolerance>.
Whether to automatically check the network dataset <autoCheckNetwork>. False denotes to check manually. Users need to click the button on the Provider configuration interface for inspection. True denotes automated inspection.
For parameter introduction, please refer to Configuring Local Transportation Analysis Service Provider.
<initFacilityAnalyst>: Whether to initialize the facility network analysis, default is false. If set it true, it will opeen pipe burst analysis, critial facilities finding in upstream and downstream. For details ,see: burstAnalyse,upstreamcirticalfaclilities,downstreamcirticalfaclilities
<directionField>: The flow direction. This parameter is required if the value of <initFacilityAnalyst> is true.
<nodeIDFilterField>: This parameter, as an auxiliary configuration item, can generate an array of facilities for the facility network analysis. That is, if the facilities array is not specified before the analysis, the system will automatically generate the default facilities array according to the field value specified by the parameter (the node in the network with the value of 1 will be automatically identified as the facility). If the facilities array is not specified before the analysis, and this parameter is not set, the system will use all the network nodes as the facilities to analyze. This parameter is available if the value of <initFacilityAnalyst> is true.
Configure a REST transportation analysis service provider as below:
<!--REST transportation analysis service provider--> <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>
Where the class of <provider> identifies the implementation class of the REST transportation analysis service provider, the class of <config> identifies the RestTransportationAnalystProviderSetting, and the content of <config> is its corresponding configuring items:
configure the network analysis service provider of ArcGIS REST as below:
<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>
class in <provider> identifies the ArcGIS REST network analysis service providers realization class, class in <config> identifies the ArcGIS REST network analysis service providers corresponding configuration class, which means content in ArcGISRestNetworkAnalystProviderSetting,<config> is the corresponding configuration item,including: