Query Diagram Elements By Extent

URL:
https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/queryDiagramElementsByExtent
Methods:
POST
Version Introduced:
10.7

Description

The queryDiagramElementsByExtent operation retrieves the set of diagram features represented in the diagram that intersect a specified envelope. It is performed on a diagram resource. The result of this operation is a JSON object composed of three arrays—one for the resulting diagram junctions, another for the resulting diagram edges, and the third one for the diagram containers.

It returns the set of diagram junctions, diagram edges, or diagram containers that intersect a specified envelope—this one being optionally enlarged to include any containers that may be partially within it.

Request parameters

ParameterDetails

gdbVersion

The name of the geodatabase version.

Syntax: gdbVersion=<version>

Example: gdbVersion=ABV1

sessionId

The token (guid) used to lock the version.

Syntax: sessionId=<guid>

Example: sessionId=44G259DE-87B0-407D-8F2E-DCB7665DD0F0

moment

The session moment.

Syntax: moment=<moment>

Example: moment=1490867969324

extent

A JSON envelope object representing the extent you want the resulting diagram features to intersect.

Without specifying this parameter, the operation returns all the diagram features in the resource diagram.

Syntax:

Use dark colors for code blocksCopy
1
extent= { "xmin": <xmin>, "ymin": <ymin>, "xmax": <xmax>, "ymax": <ymax>, "zmin": <zmin>, "zmax": <zmax>, "mmin": <mmin>, "mmax": <mmax>, "spatialReference": <spatialReference> }

Example: Retrieving diagram features intersecting a given envelope:

Use dark colors for code blocksCopy
1
extent= { "xmin": 1030002.4739352614, "ymin": 1862854.181471862, "xmax": 1030398.5958464295, "ymax": 1863341.463633, "spatialReference": {"wkid": 102671} }

addContents

A boolean statement that determines whether to return the diagram features which strictly intersect the specified envelope.

  • false—To return the diagram features which strictly intersect the specified envelope (default)
  • true—To enlarge the searching envelope so it includes the extent of any containers that are partially within the specified envelope

Syntax: addContents=<true | false>

Example: addContents=true

returnJunctions

A boolean statement that determines whether to return diagram junctions.

  • true—To return the diagram junctions (default)
  • false—To not return the diagram junctions

Syntax: returnJunctions=<true | false>

Example: returnJunctions=true

returnEdges

A boolean statement that determines whether to return diagram edges.

  • true—To return the diagram edges (default)
  • false—To not return the edges junctions

Syntax: returnEdges=<true | false>

Example: returnEdges=true

returnContainers

A boolean statement that determines whether to return diagram containers.

  • true—To return the diagram containers (default)
  • false—To not return the diagram containers

Syntax: returnContainers=<true | false>

Example: returnContainers=true

returnGeometry

A boolean statement that determines whether to add the geometry for each returned diagram feature.

  • true—To return each queried diagram feature with its geometry (default)
  • false—To return each queried diagram feature without its geometry

Syntax: returnGeometry=<true | false>

Example: returnGeometry=true

outSR

Description: The spatial reference of the returned geometry.

The spatial reference can be specified as either a well-known ID or as a spatial reference JSON object.

If outSR is not specified, the geometry is returned in the spatial reference of the map.

f

The response format. The default response format is html.

Values: <html | json>

Example usage

Query all the junctions of the Basic_RMT001 diagram:

  • URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/Basic_RMT001/queryDiagramElementsByExtent

  • Parameters

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    gdbVersion=
    sessionId=
    moment=
    extent=
    addContents=
    returnJunctions=true
    returnEdges=false
    returnContainers=false
    returnGeometry=
    outSR=
    f=pjson
  • Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/Basic_RMT001/queryDiagramElementsByExtent?gdbVersion=&sessionId=&moment=&extent=&addContents=&returnJunctions=true&returnEdges=false&returnContainers=false&returnGeometry=&outSR=&f=pjson

Query all the diagram features that intersect a given extent {"xmin": 1034510.4869008437,"ymin": 1871859.3734351993,"xmax": 1034521.7178495117,"ymax": 1871863.1050550342,"spatialReference": {"wkid": 102671,"latestWkid": 3435}}:

  • URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/Basic_RMT003/queryDiagramElementsByExtent

  • Parameters

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    gdbVersion=
    sessionId=
    moment=
    extent={"xmin": 1034510.4869008437,
     "ymin": 1871859.3734351993,
     "xmax": 1034521.7178495117,
     "ymax": 1871863.1050550342,
     "spatialReference": {
      "wkid": 102671,
      "latestWkid": 3435
     }
    }
    addContents=
    returnJunctions=
    returnEdges=
    returnContainers=
    returnGeometry=
    outSR=
    f=pjson
  • Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/Basic_RMT003/queryDiagramElementsByExtent?gdbVersion=&sessionId=&moment=&extent=%7B%22xmin%22%3A+1034510.4869008437%2C%22ymin%22%3A+1871859.3734351993%2C%22xmax%22%3A+1034521.7178495117%2C%22ymax%22%3A+1871863.1050550342%2C%22spatialReference%22%3A+%7B%22wkid%22%3A+102671%2C%22latestWkid%22%3A+3435%7D%7D&addContents=&returnJunctions=&returnEdges=&returnContainers=&returnGeometry=&outSR=&f=pjson

JSON Response syntax

A JSON object composed of a maximum of three arrays depending on the value specified for the returnJunctions, returnEdges. and returnContainers parameters:

  • An array of <diagramJunction> JSON objects, when returnJunctions = true
  • An array of <diagramEdge> JSON objects, when returnEdges = true
  • An array of <diagramContainer> JSON objects, when returnContainers = true
Use dark colors for code blocksCopy
1
2
3
4
5
{
 "diagramJunctions": [< diagramJunction1 >, ..., < diagramJunctionK >],
 "diagramEdges": [< diagramEdge1 >, ..., < diagramEdgeM >],
 "diagramContainers": [< diagramContainer1 >, ..., < diagramContainerN >]
}

With the following JSON object syntaxes:

  • <diagramJunction> JSON object syntax
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
 "id": <ID>, //int
 "containerID": < containerID >, //int
 "featureOID": < jctOID >, //int
 "globalID": < diagFeatureGUID >, // string
 "assocSourceID": < assUNSourceID >, //int
 "assocGlobalID": "< assUNfeatureGUID >", // string
 "geometry": {
   "x": < x >, //double
   "y": < y >, //double
   "z": < z >, //double
   "m": < m >, //double
   "spatialReference": < spatialReference >
 },
 "rotation": < rotation > //int
}
  • <diagramEdge> JSON object syntax

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    {
     "id": < ID >, // long
     "containerID": < containerID >, // long
     "featureOID": < edgeOID >, // long
     "globalID": < diagFeatureGUID >, // string
     "assocSourceID": < assUNSourceID >, // long
     "assocGlobalID": "< assUNfeatureGUID >", // string
     "geometry": {
      "hasM" : <  true | false  >,
      "paths" : [[[< x11 >, < y11 >, < z11 >, < m11 >],…,[< x1N >, < y1N >, < z1N >, < m1N >]],
                 ,…,[[< xk1 >, < yk1 >, < zk1 >, < mk1 >],…,[< xkM >, < ykM >, < zkM >, < mkM >]]],
      "spatialReference": < spatialReference >
     },
     "fromID": < FromID >, // long
     "toID": < ToID >, // long
    }
  • <diagramContainer> JSON object syntax

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    {
     "id": < ID >, //int
     "containerID": < containerID >, // long
     "featureOID": < containerOID >, // long
     "globalID": < diagFeatureGUID >, // string
     "assocSourceID": < assUNSourceID >, // long
     "assocGlobalID": "< assUNfeatureGUID >", // string
     "geometry": {
       "hasZ" : true | false,
       "hasM" : true | false,
       "rings" : [[[< x11 >, < y11 >, < z11 >, < m11 >],...,[< x1N >, < y1N >, < z1N >, < m1N >]],
                 ,...,[[< xk1 >, < yk1 >, < zk1 >, < mk1 >],...,[< xkM >, < ykM >, < zkM >, < mkM >]]],
      "spatialReference": < spatialReference >}
    }

JSON Response example

Sample response when returnGeometry is True (default)

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
 "diagramJunctions": [
  {
   "id": 7,
   "containerID": 6,
   "featureOID": 18806,
   "globalID": "{D337C4F7-2B24-4072-988B-D45F7D10D376}",
   "assocSourceID": 6,
   "assocGlobalID": "{2403ED10-BBBE-4DF6-AF29-65998FADB99F}",
   "rotation": 0,
   "geometry": {
    "x": 1034253.57566926256,
    "y": 1869160.674764365,
    "m": null,
    "spatialReference": {
     "wkid": 102671,
     "latestWkid": 3435,
     "vcsWkid": 105703,
     "latestVcsWkid": 6360
    }
   }
  },
  {
   "id": 9,
   "containerID": 6,
   "featureOID": 18808,
   "globalID": "{6DD5ADB0-DF35-4F0D-8C21-186AAC5E1C4A}",
   "assocSourceID": 9,
   "assocGlobalID": "{C366397B-3088-46A1-80E7-ACFDA4BB812F}",
   "rotation": 0,
   "geometry": {
    "x": 1034253.57501309365,
    "y": 1869160.42476486415,
    "m": null,
    "spatialReference": {
     "wkid": 102671,
     "latestWkid": 3435,
     "vcsWkid": 105703,
     "latestVcsWkid": 6360
    }
   }
  }
 ],
 "diagramEdges": [
  {
   "id": 1199,
   "containerID": 6,
   "featureOID": 19820,
   "globalID": "{AB16E11A-D3B0-404D-A8F1-6283DA20B66F}",
   "assocSourceID": 1,
   "assocGlobalID": "{D1E28A6B-B6A2-4C6B-8604-E4B79D719B06}",
   "fromID": 7,
   "toID": 9,
   "geometry": {
    "hasM": true,
    "paths": [
     [
      [
       1034253.57566926256,
       1869160.674764365,
       null
      ],
      [
       1034253.57501309365,
       1869160.42476486415,
       null
      ]
     ]
    ],
    "spatialReference": {
     "wkid": 102671,
     "latestWkid": 3435,
     "vcsWkid": 105703,
     "latestVcsWkid": 6360
    }
   }
  }
 ],
 "diagramContainers": [

 ]
}

Sample response when returnGeometry is False

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
 "diagramJunctions": [
  {
   "id": 7,
   "containerID": 6,
   "featureOID": 18806,
   "globalID": "{D337C4F7-2B24-4072-988B-D45F7D10D376}",
   "assocSourceID": 6,
   "assocGlobalID": "{2403ED10-BBBE-4DF6-AF29-65998FADB99F}",
   "rotation": 0
  },
  {
   "id": 9,
   "containerID": 6,
   "featureOID": 18808,
   "globalID": "{6DD5ADB0-DF35-4F0D-8C21-186AAC5E1C4A}",
   "assocSourceID": 9,
   "assocGlobalID": "{C366397B-3088-46A1-80E7-ACFDA4BB812F}",
   "rotation": 0
  }
 ],
 "diagramEdges": [
  {
   "id": 1199,
   "containerID": 6,
   "featureOID": 19820,
   "globalID": "{AB16E11A-D3B0-404D-A8F1-6283DA20B66F}",
   "assocSourceID": 1,
   "assocGlobalID": "{D1E28A6B-B6A2-4C6B-8604-E4B79D719B06}",
   "fromID": 7,
   "toID": 9
  }
 ],
 "diagramContainers": [

 ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.