upstreamcirticalfaclilities


URI

<networkDataName_uri>/upstreamCirticalFaclilities[.<format>]

Supported methods

GET, HEAD

Parent resource

networkDataName

Introduction

upstreamCirticalFaclilities is the upstream critical facility searching resource of the network analysis, through which you can find the upstream key facilities.

Upstream key facility searching is to find the key facility nodes in the upstream of a given arc or node, and to return the ID array of key facility nodes and its downstream arc ID array.

Supported Methods:

Supported output formats: rjson, json, html, xml.

Resource hierarchy

HTTP request methods

Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.

http://supermapiserver:8090/iserver/services/facility/rest/networkanalyst/WaterNet@FacilityNet/upstreamcirticalfaclilities.rjson

GET request

Gets the key facility node ID array and its downstream arc ID array.

Request parameter

To execute a GET request on the upstreamCirticalFaclilities resource, you need to include some parameters in the URI, as follows:

Name Type Description
sourceNodeIDs int [Required]
Specified facility node ID array
edgeID int [Required] The specified arc ID in the network analysis, one of the two parameters-the edgeID parameter or the nodeID parameter is contained in the request URI, and both can not exist at the same time.
nodeID int [Required] The specified node ID in the network analysis, one of the two parameters-the nodeID parameter or the edgeID parameter is contained in the request URI, and both can not exist at the same time.
isUncertainDirectionValid boolean Specifies whether the uncertain flow is valid. If Specified as true, it indicates that the uncertain flow is valid and the analysis is continued when an uncertain flow is encountered; false indicates that the uncertain flow is invalid and it will stop searching in the direction where it encounters the uncertain flow.

Response structure

A GET request is made to the upstreamCirticalFaclilities resource, and it includes the key facility node ID array and its upstream arc ID array information in the entity body of the response message, as follows:

Field Type Description
cost double The cost in the network analysis result.
edges int The arc ID array in the network analysis result.
normalNodes int The node ID array in the network analysis result.

Response example

The returned rjson format representation after implementing the GET request on the upstreamCirticalFaclilities resource http://supermapiserver:8090/iserver/services/facility/rest/networkanalyst/WaterNet@FacilityNet/upstreamcirticalfaclilities.rjson?sourceNodeIDs=%5B75,76,77%5D&edgeID=75&isUncertainDirectionValid=true is as follows:

The response result returned is as the following:

{

    "cost": 0,

    "edges": [

        75,

        92,

        101,

        102

    ],

    "nodes": [77]

}

HEAD request

Returns the same HTTP response header as the GET request, but does not have the response entity. It can get the metadata information in the response header without transferring the whole response content. Metadata information includes media type, character encoding, compression encoding, entity content length, and so on.

The HEAD request can be used to determine whether the upstreamCirticalFaclilities resource exists or whether the client has authority to access the resource. It can quickly determine whether the upstreamCirticalFaclilities resource supports the representation in <format> format by performing HEAD request on URI with <format>.

See