- URL:
- https://<root>/<serviceName>/NetworkDiagramServer/diagrams/<diagramName>/queryDiagramElementsByExtent
- Methods:
POST
- Version Introduced:
- 10.7
Description
The query
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
Parameter | Details |
---|---|
|
The name of the geodatabase version. Syntax: Example: |
|
The token (guid) used to lock the version. Syntax: Example: |
|
The session moment. Syntax: Example: |
| 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:
Example: Retrieving diagram features intersecting a given envelope:
|
| A boolean statement that determines whether to return the diagram features which strictly intersect the specified envelope.
Syntax: Example: |
| A boolean statement that determines whether to return diagram junctions.
Syntax: Example: |
| A boolean statement that determines whether to return diagram edges.
Syntax: Example: |
| A boolean statement that determines whether to return diagram containers.
Syntax: Example: |
| A boolean statement that determines whether to add the geometry for each returned diagram feature.
Syntax: Example: |
|
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 |
|
The response format. The default response format is html. Values: |
Example usage
Query all the junctions of the Basic_RMT001 diagram:
-
URL:
https
://myserver.esri.com/server/rest/services/ Naperville/ Network Diagram Server/diagrams/ Basic _RM T001/query Diagram Elements By Extent -
Parameters
Use dark colors for code blocks Copy 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/ Network Diagram Server/diagrams/ Basic _RM T001/query Diagram Elements By Extent?gdb Version=&session Id=&moment=&extent=&add Contents=&return Junctions=true&return Edges=false&return Containers=false&return Geometry=&out S R=&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/ Network Diagram Server/diagrams/ Basic _RM T003/query Diagram Elements By Extent -
Parameters
Use dark colors for code blocks Copy 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/ Network Diagram Server/diagrams/ Basic _RM T003/query Diagram Elements By Extent?gdb Version=&session Id=&moment=&extent=%7 B%22xmin%22%3 A+1034510.4869008437%2 C%22ymin%22%3 A+1871859.3734351993%2 C%22xmax%22%3 A+1034521.7178495117%2 C%22ymax%22%3 A+1871863.1050550342%2 C%22spatial Reference%22%3 A+%7 B%22wkid%22%3 A+102671%2 C%22latest Wkid%22%3 A+3435%7 D%7 D&add Contents=&return Junctions=&return Edges=&return Containers=&return Geometry=&out S R=&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
return
Junctions = true - An array of <diagramEdge> JSON objects, when
return
Edges = true - An array of <diagramContainer> JSON objects,
when return
Containers = true
{
"diagramJunctions": [< diagramJunction1 >, ..., < diagramJunctionK >],
"diagramEdges": [< diagramEdge1 >, ..., < diagramEdgeM >],
"diagramContainers": [< diagramContainer1 >, ..., < diagramContainerN >]
}
With the following JSON object syntaxes:
- <diagramJunction> JSON object syntax
{
"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 blocks Copy { "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 blocks Copy { "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)
{
"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
{
"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": [
]
}