Skip To Content

Apply

Description

The Apply operation is performed on a Schematic Algorithm resource. The result of this operation is a Diagram Content Object.

It operates from a Schematic Diagram Content Object and the schematic algorithm parameters specified as input parameters, and returns results as schematic features.

It works as follows:

  • All the schematic features of the diagram (diagram content object) are sent to the server
  • The server object extension instantiates an in-memory diagram with the input schematic features
  • The algorithm is applied on the in-memory diagram selection (or all the diagram if no selection)
  • The server object extension returns all the schematic features of the resulting diagram to the client
  • The server object extension deletes the in-memory diagram

You can provide arguments to the Apply operation as query parameters defined in the parameters table below.

Request Parameters

ParameterDetails
f

Description: The response format. The default response format is html.

Values: html | json

parameters

Description: The parameters of the algorithm to apply.

Syntax and Examples:

JSON Structures:

Syntax:

parameters={
  "<AlgoParam1Name>" : <AlgoParam1Value>,
  ...
  "<AlgoParamNName>" : <AlgoParamNValue>
}

Example:

//Syntax sample for the Hierarchical - Compact Tree schematic algorithm

parameters={
  "Direction" : 2,
  "SpacingAlongDirection" : 2,
  "SpacingPerpendicularToDirection" : 2,
  "BreakPoint" : 0.5,
  "OrthogonalDisplay" : False,
  "AbsoluteUnits" : True
}

diagram

Required

Description: The Diagram Content Object on which the schematic algorithm applies.

Syntax: diagram=<See the Schematic Diagram Content Object topic for the JSON Syntax>

Example: diagram=<See the Schematic Diagram Content Object topic for the JSON Example>

Learn about Schematic Diagram Content Object—JSON Syntax

Learn about Schematic Diagram Content Object—JSON Example

JSON Response Syntax


            {
  "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
}

JSON Response Example


            //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
  }
 ]
}