Network Service Specification¶
The NetworkServer is a resource of every map service of the gView Server. It offers searches on a SpatialNET network (e.g. a low-voltage grid) that was built from the layers of the map (NetworkModule of the map, see gView Carto).
The interface is modelled on the resources of the ArcGIS REST API (.../services/{service}/{Resource},
parameter f=json|pjson, HTML form in the browser). It is a gView API and not compatible with the
Esri Utility Network Service.
Functions:
Network Description: figures, layers, weights, types and rules of the network.
Trace: connectivity from start nodes up to blocked nodes.
Reach: cost-limited search (shortest-path tree).
Path: shortest path between two nodes.
Supply: supply of sinks by sources.
Outage: customers that lose their supply when edges are switched off.
Nearest: nodes near a location.
Info: data of a node and its neighbours.
Validate: check of the network rules.
Structure of the API links¶
{service} is the service name, optionally with folder ({folder}/{service}).
Network Description
GET
https://{server}/geoservices/rest/services/[{folder}/]{service}/networkserver
Operations
GET/POST
https://{server}/geoservices/rest/services/[{folder}/]{service}/networkserver/tracehttps://{server}/geoservices/rest/services/[{folder}/]{service}/networkserver/reachhttps://{server}/geoservices/rest/services/[{folder}/]{service}/networkserver/pathhttps://{server}/geoservices/rest/services/[{folder}/]{service}/networkserver/supplyhttps://{server}/geoservices/rest/services/[{folder}/]{service}/networkserver/outagehttps://{server}/geoservices/rest/services/[{folder}/]{service}/networkserver/nearesthttps://{server}/geoservices/rest/services/[{folder}/]{service}/networkserver/infohttps://{server}/geoservices/rest/services/[{folder}/]{service}/networkserver/validate
An operation without parameters returns an HTML form to try it out, the description without f an HTML page.
Parameters are sent as query string, form fields or JSON body (application/json, also "f": "json"). As soon as a
parameter (other than token) is given, the search runs; without f the result is JSON.
Examples (service sqlite/net):
/geoservices/rest/services/sqlite/net/networkserver?f=pjson
/geoservices/rest/services/sqlite/net/networkserver/trace?start=Trafo%2336&f=geojson&outSR=4326
/geoservices/rest/services/sqlite/net/networkserver/reach?start=Trafo%2336&maxCost=250&f=pjson
Table of contents: