This document discusses the JSON Schematic Diagram Content Object as returned by the REST API.
The Schematic Diagram Content Object is returned with the following information:
name
: The diagram name (String),extent
: The diagram extent (<envelope>),layers
: An array of <layer> objects that compose the schematic diagram,rootNodes
: OPTIONAL - An array of schematic feature identifiers (Long) that identify schematic root nodes in the diagram,endNodes
: OPTIONAL - An array of schematic feature identifiers (Long) that identify schematic end nodes in the diagram.
Each <layer>
item in the layers
array corresponds to a schematic feature class associated with the diagram template on which the diagram is based.
All the schematic feature classes that are associated with the diagram template are detailed in this layers
array, even those for which no schematic features are contained in the diagram.
For each <layer>
item, the following information is returned:
featureSet
: The featureSet
object related to the feature layer, formatted as follows:
"displayFieldName"
: "",
"fieldAliases"
: The list of the field aliases formated as follows: {"<field1Name>": "<field1Alias>", ..., "<fieldNName>": "<fieldNAlias>"}
geometryType
: The type of geometry for the schematic features in this layer (esriGeometryPoint
| esriGeometryPolyline
| esriGeometryPolygon
)spatialReference
: The spatial reference for the related the schematic feature class (<spatialReference>),fields
: An array of triplets that precises the name, type and alias for each field {"name": "<fieldName>", "type": <fieldType>, "alias": "<fieldAlias>"},features
: The array of schematic <feature> objects contained in the diagram for the feature layer. This array is empty when there are no schematic features for this layer contained in the schematic diagram.featureClassID
: The ID of the schematic feature class related to the feature layer (Long),selectedIDs
: An array of the schematic feature identifiers (Long) that are currently selected in the diagram (optional){
"name" : "<DiagramName>",
"extent" : <envelope>,
"layers" : [ //First feature layer
{
"featureSet": {
"displayFieldName": "",
"fieldAliases": {"<field1>": "<aliasField1>", ..., "<fieldN>": "<aliasFieldN>"},
"geometryType": "esriGeometryPoint" | "esriGeometryPolyline" | "esriGeometryPolygon",
"spatialReference": <spatialReference>,
"fields": [
{"name": "<field1Name>", "type": <field1Type>, "alias": "<field1Alias>"},
...,
{"name": "<fieldNName>", "type": <fieldNType>, "alias": "<fieldNAlias>"},
],
"features": [<schFeature1>, ..., <schFeatureN>] //List of the schematic feature objects for this feature layer that are contained in the diagram
},
"featureClassID": <featureClassID1>, //This correponds to the OBJECTID of the schematic feature class related to the layer
"selectedIDs" : ["<schFeature1_ID>", ..., "<schFeatureM_ID>"] //List of the SCHEMATICTID for each schematic feature currently selected in this layer
}, //Next feature layer
{
...
}
],
"rootNodes" : ["<schFeature1_ID>", ..., "<schFeatureM_ID>"], //List of the SCHEMATICTID of the root schematic feature nodes
"endNodes" : ["<schFeature1_ID>", ..., "<schFeatureK_ID>"] //List of the SCHEMATICTID of the end schematic feature nodes
}
//This sample diagram content corresponds to a small diagram containing only three schematic feature nodes and two schematic feature links
{
"name": "SmallDiagram",
"extent": {
"xmin": -20188492.5143,
"ymin": 13197754.015000001,
"xmax": -15695315.069899999,
"ymax": 18282139.017800003,
"spatialReference": {"wkid": 102585, "latestWkid": 102585}
},
"layers": [
//The first layer corresponds to the only link schematic feature class associated with the schematic diagram template on which this diagram is based
{
"featureSet": {
"displayFieldName": "",
"fieldAliases": {
//The 21 first fields below are always the same for a layer which references a link schematic feature class
"ID": "ID",
"DIAGRAMCLASSID": "DIAGRAMCLASSID",
"DIAGRAMOBJECTID": "DIAGRAMOBJECTID",
"SCHEMATICTID": "SCHEMATICTID",
"ISINITIAL": "ISINITIAL",
"ISDISPLAYED": "ISDISPLAYED",
"RELATIONOBJECTID": "RELATIONOBJECTID",
"RELATIONCLASSID": "RELATIONCLASSID",
"DATASOURCEID": "DATASOURCEID",
"UCID": "UCID",
"UOID": "UOID",
"USID": "USID",
"UPDATESTATUS": "UPDATESTATUS",
"SUBTYPE": "SUBTYPE",
"PROPERTYSET": "PROPERTYSET",
"FROMTID": "FROMTID",
"TOTID": "TOTID",
"FROMPORT": "FROMPORT",
"TOPORT": "TOPORT",
"FLOWDIRECTION": "FLOWDIRECTION",
"UGUID": "UGUID",
//The next Category field corresponds to a custom attribute for this link schematic feature class
"Category": "Category",
"SHAPE.len": "SHAPE.len"
},
"geometryType": "esriGeometryPolyline",
"spatialReference": {"wkid": 102585, "latestWkid": 102585},
"fields": [
{"name": "ID", "type": "esriFieldTypeOID", "alias": "ID"},
{"name": "DIAGRAMCLASSID", "type": "esriFieldTypeInteger", "alias": "DIAGRAMCLASSID"},
{"name": "DIAGRAMOBJECTID", "type": "esriFieldTypeInteger", "alias": "DIAGRAMOBJECTID"},
{"name": "SCHEMATICTID", "type": "esriFieldTypeString", "alias": "SCHEMATICTID", "length": 128},
{"name": "ISINITIAL", "type": "esriFieldTypeInteger", "alias": "ISINITIAL"},
{"name": "ISDISPLAYED", "type": "esriFieldTypeInteger", "alias": "ISDISPLAYED"},
{"name": "RELATIONOBJECTID", "type": "esriFieldTypeInteger", "alias": "RELATIONOBJECTID"},
{"name": "RELATIONCLASSID", "type": "esriFieldTypeInteger", "alias": "RELATIONCLASSID"},
{"name": "DATASOURCEID", "type": "esriFieldTypeInteger", "alias": "DATASOURCEID"},
{"name": "UCID", "type": "esriFieldTypeInteger", "alias": "UCID"},
{"name": "UOID", "type": "esriFieldTypeInteger", "alias": "UOID"},
{"name": "USID", "type": "esriFieldTypeInteger", "alias": "USID"},
{"name": "UPDATESTATUS", "type": "esriFieldTypeInteger", "alias": "UPDATESTATUS"},
{"name": "SUBTYPE", "type": "esriFieldTypeInteger", "alias": "SUBTYPE"},
{"name": "PROPERTYSET", "type": "esriFieldTypeBlob", "alias": "PROPERTYSET"},
{"name": "FROMTID", "type": "esriFieldTypeString", "alias": "FROMTID", "length": 128},
{"name": "TOTID", "type": "esriFieldTypeString", "alias": "TOTID", "length": 128},
{"name": "FROMPORT", "type": "esriFieldTypeInteger", "alias": "FROMPORT"},
{"name": "TOPORT", "type": "esriFieldTypeInteger", "alias": "TOPORT"},
{"name": "FLOWDIRECTION", "type": "esriFieldTypeInteger", "alias": "FLOWDIRECTION"},
{"name": "UGUID", "type": "esriFieldTypeGUID", "alias": "UGUID", "length": 38},
{"name": "Category", "type": "esriFieldTypeString", "alias": "Category", "length": 50},
{"name": "SHAPE.len", "type": "esriFieldTypeDouble", "alias": "SHAPE.len"}
],
//The next Features section details the two schematic feature links based on this layer that are contained in the sample diagram
"features": [
{
"attributes": {
"ID": 1,
"DIAGRAMCLASSID": 948,
"DIAGRAMOBJECTID": 2,
"SCHEMATICTID": "1299-5-0",
"ISINITIAL": -1,
"ISDISPLAYED": -1,
"RELATIONOBJECTID": -2,
"RELATIONCLASSID": -2,
"DATASOURCEID": 1,
"UCID": 1299,
"UOID": 5,
"USID": 0,
"UPDATESTATUS": 1,
"SUBTYPE": 0,
"FROMTID": "1296-38-0",
"TOTID": "1296-41-0",
"FROMPORT": 0,
"TOPORT": 0,
"FLOWDIRECTION": 1,
"UGUID": null,
"Category": "Big",
"SHAPE.len": 0
},
"geometry": {
"paths": [[[-15695315.069899999, 15956722.621100001],[-20188492.5143, 18282139.017800003]]],
"spatialReference": {"wkid": 102585, "latestWkid": 102585}
}
},
{
"attributes": {
"ID": 2,
"DIAGRAMCLASSID": 948,
"DIAGRAMOBJECTID": 2,
"SCHEMATICTID": "1299-6-0",
"ISINITIAL": -1,
"ISDISPLAYED": -1,
"RELATIONOBJECTID": -2,
"RELATIONCLASSID": -2,
"DATASOURCEID": 1,
"UCID": 1299,
"UOID": 6,
"USID": 0,
"UPDATESTATUS": 1,
"SUBTYPE": 0,
"FROMTID": "1296-38-0",
"TOTID": "1296-40-0",
"FROMPORT": 0,
"TOPORT": 0,
"FLOWDIRECTION": 1,
"UGUID": null,
"Category": "Small",
"SHAPE.len": 0
},
"geometry": {
"paths": [[[-15695315.069899999, 15956722.621100001],[-18257214.489999998,13197754.015000001]]],
"spatialReference": {"wkid": 102585, "latestWkid": 102585}
}
}
]
},
//The following featureClassID item identifies the ID of the link schematic feature class related to the layer
"featureClassID": 947
},
{
"featureSet": {
"displayFieldName": "",
"fieldAliases": {
//The 19 first fields below are always the same for a layer which references a node schematic feature class
"ID": "ID",
"DIAGRAMCLASSID": "DIAGRAMCLASSID",
"DIAGRAMOBJECTID": "DIAGRAMOBJECTID",
"SCHEMATICTID": "SCHEMATICTID",
"ISINITIAL": "ISINITIAL",
"ISDISPLAYED": "ISDISPLAYED",
"RELATIONOBJECTID": "RELATIONOBJECTID",
"RELATIONCLASSID": "RELATIONCLASSID",
"DATASOURCEID": "DATASOURCEID",
"UCID": "UCID",
"UOID": "UOID",
"USID": "USID",
"UPDATESTATUS": "UPDATESTATUS",
"SUBTYPE": "SUBTYPE",
"PROPERTYSET": "PROPERTYSET",
"INITIALX": "INITIALX",
"INITIALY": "INITIALY",
"ROTATION": "ROTATION",
"UGUID": "UGUID",
//The next Type and Name fields correspond to two custom attributes for this node schematic feature class
"Type": "Type",
"Name": "Name"
},
"geometryType": "esriGeometryPoint",
"spatialReference": {"wkid": 102585, "latestWkid": 102585},
"fields": [
{"name": "ID", "type": "esriFieldTypeOID", "alias": "ID"},
{"name": "DIAGRAMCLASSID", "type": "esriFieldTypeInteger", "alias": "DIAGRAMCLASSID"},
{"name": "DIAGRAMOBJECTID", "type": "esriFieldTypeInteger", "alias": "DIAGRAMOBJECTID"},
{"name": "SCHEMATICTID", "type": "esriFieldTypeString", "alias": "SCHEMATICTID", "length": 128},
{"name": "ISINITIAL", "type": "esriFieldTypeInteger", "alias": "ISINITIAL"},
{"name": "ISDISPLAYED", "type": "esriFieldTypeInteger", "alias": "ISDISPLAYED"},
{"name": "RELATIONOBJECTID", "type": "esriFieldTypeInteger", "alias": "RELATIONOBJECTID"},
{"name": "RELATIONCLASSID", "type": "esriFieldTypeInteger", "alias": "RELATIONCLASSID"},
{"name": "DATASOURCEID", "type": "esriFieldTypeInteger", "alias": "DATASOURCEID"},
{"name": "UCID", "type": "esriFieldTypeInteger", "alias": "UCID"},
{"name": "UOID", "type": "esriFieldTypeInteger", "alias": "UOID"},
{"name": "USID", "type": "esriFieldTypeInteger", "alias": "USID"},
{"name": "UPDATESTATUS", "type": "esriFieldTypeInteger", "alias": "UPDATESTATUS"},
{"name": "SUBTYPE", "type": "esriFieldTypeInteger", "alias": "SUBTYPE"},
{"name": "PROPERTYSET", "type": "esriFieldTypeBlob", "alias": "PROPERTYSET"},
{"name": "INITIALX", "type": "esriFieldTypeDouble", "alias": "INITIALX"},
{"name": "INITIALY", "type": "esriFieldTypeDouble", "alias": "INITIALY"},
{"name": "ROTATION", "type": "esriFieldTypeDouble", "alias": "ROTATION"},
{"name": "UGUID", "type": "esriFieldTypeGUID", "alias": "UGUID", "length": 38},
{"name": "Type", "type": "esriFieldTypeString", "alias": "Type", "length": 1},
{"name": "Name", "type": "esriFieldTypeString", "alias": "Name", "length": 50}
],
//The next Features section details the three schematic feature nodes based on this layer that are contained in the sample diagram
"features": [
{
"attributes": {
"ID": 1,
"DIAGRAMCLASSID": 948,
"DIAGRAMOBJECTID": 2,
"SCHEMATICTID": "1296-38-0",
"ISINITIAL": -1,
"ISDISPLAYED": -1,
"RELATIONOBJECTID": -2,
"RELATIONCLASSID": -2,
"DATASOURCEID": 1,
"UCID": 1296,
"UOID": 38,
"USID": 0,
"UPDATESTATUS": 1,
"SUBTYPE": 0,
"INITIALX": -15695315.0699,
"INITIALY": 15956722.621099999,
"ROTATION": 0,
"UGUID": null,
"Type": "E",
"Name": "ROMY"
},
"geometry": {
"x": -15695315.069899999,
"y": 15956722.621100001,
"spatialReference": {"wkid": 102585, "latestWkid": 102585}
}
},
{
"attributes": {
"ID": 2,
"DIAGRAMCLASSID": 948,
"DIAGRAMOBJECTID": 2,
"SCHEMATICTID": "1296-40-0",
"ISINITIAL": -1,
"ISDISPLAYED": -1,
"RELATIONOBJECTID": -2,
"RELATIONCLASSID": -2,
"DATASOURCEID": 1,
"UCID": 1296,
"UOID": 40,
"USID": 0,
"UPDATESTATUS": 1,
"SUBTYPE": 0,
"INITIALX": -18257214.489999998,
"INITIALY": 13197754.015000001,
"ROTATION": 0,
"UGUID": null,
"Type": "D",
"Name": "TAGA"
},
"geometry": {
"x": -18257214.489999998,
"y": 13197754.015000001,
"spatialReference": {"wkid": 102585, "latestWkid": 102585}
}
},
{
"attributes": {
"ID": 3,
"DIAGRAMCLASSID": 948,
"DIAGRAMOBJECTID": 2,
"SCHEMATICTID": "1296-41-0",
"ISINITIAL": -1,
"ISDISPLAYED": -1,
"RELATIONOBJECTID": -2,
"RELATIONCLASSID": -2,
"DATASOURCEID": 1,
"UCID": 1296,
"UOID": 41,
"USID": 0,
"UPDATESTATUS": 1,
"SUBTYPE": 0,
"INITIALX": -20188492.5143,
"INITIALY": 18282139.0178,
"ROTATION": 0,
"UGUID": null,
"Type": "A",
"Name": "UMOL"
},
"geometry": {
"x": -20188492.5143,
"y": 18282139.017800003,
"spatialReference": {"wkid": 102585, "latestWkid": 102585}
}
}
]
}, //The following featureClassID item identifies the ID of the node schematic feature class related to the layer
"featureClassID": 946
}
]
}
Example 1: The Schematic Diagram Content Object returned for the GWC_CorinthNorth diagram based on the id=3 diagram template under the S1_Schematics sample Schematics service when executing the loadDiagram operation
http://servicesbeta6.esri.com/arcgis/rest/services/S1_Schematics/MapServer/exts/SchematicsServer/templates/3/loadDiagram?name=GWC_CorinthNorth&f=pjson
Example 2: The Schematic Diagram Content Object returned for the ARACAIU diagram based on the id=0 diagram template under the S2_InternalPlants sample Schematics service when executing the loadDiagram operation
http://servicesbeta6.esri.com/arcgis/rest/services/S2_InternalPlants/MapServer/exts/SchematicsServer/templates/0/loadDiagram?name=ARACAIU&f=pjson