turnNodeWeight


URI

<networkDataName_uri>/turnnodeweight/{nodeID}/fromedge/{fromEdgeID}/toedge/{toEdgeID}/weightfield/{weightField}[.<format>]

Supported methods

PUT

Parent resource

networkDataName

Introduction

The turnNodeWeight resource represents the weight of a turn node. Performing a PUT request with proper parameters on the turnNodeWeight resource can update the weight of a turn node.

Supported Methods:

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

Resource hierarchy

HTTP request methods

Below is an example of performing an HTTP request on a URI, with rjson as the output format. In the URI: supermapiserver is the name of the server; RoadNet@Changchun is the network data to be updated; and TurnCost is the weightField name set in the configuration file.

http://supermapiserver:8090/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun/turnnodeweight/106/fromedge/6508/toedge/6504/weightfield/TurnCost.rjson

PUT request

Updates the weight of a turn node.

Request parameter

Proper parameters need to be included in the URI when performing a PUT request on the turnNodeWeight resource. The parameters that must be passed before "?" are as follows:

Name Type Description
nodeID int The target turn node ID.
fromEdgeID int The start edge ID of the target turn node.
toEdgeID int The end edge ID of the target turn node.
weightField String The name of the turn weight filed.

Response structure

After a PUT request is performed on the turnNodeWeight resource, the entity body of the response message contains a set of descriptions about whether the update is successful. The structure is as follows:

Field Type Description
succeed boolean Whether the weight of the edge was successfully updated.
errorMsg String Details about the error if failure occurs.
code int Code of the error.

Response example

Performing a PUT request on the following URI is to update the weights of turn nodes for the RoadNet@Changchun dataset:

http://supermapiserver:8090/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun/turnnodeweight/106/fromedge/6508/toedge/6504/weightfield/TurnCost.rjson

The weight for the turn node specified in the request body is:

50.0

Given that the update is successful, the returned description of the operation result in rjson forma is as follows:

{

"succeed": true

}

See