Skip To Content

Synthesize Association Geometries

Description

The synthesizeAssociationGeometries operation is used to export geometries representing associations that are synthesized as line segments corresponding to the geometries of the features at the endpoints.

  • All features with an association must be in the specified extent for the geometry to be synthesized.
  • If only one of the association features intersects the extent, no geometry will be synthesized.

Request parameters

ParameterDetails
f

Description: Optional parameter specifying the output format of the response. The default response format is html.

Values: html | json | pbf

gdbVersion

Description: Optional parameter specifying the name of the geodatabase version. The default is DEFAULT.

Syntax: gdbVersion=<version>

sessionId

Description: Optional parameter specifying the token (guid) used to lock the version. If the calling client has previously started a service session (editing) and holds an exclusive lock on the specified version, the request will fail if the session ID is not provided. If the specified version is currently locked by any other session, the request will fail if the session ID is not provided or does not match the session ID that holds the exclusive lock.

Syntax: sessionId=<guid>

moment

Description: Optional parameter specifying the session moment (the default value is the version current moment). This should only be specified by the client when they do not want to use the current moment.

attachmentAssociations

Description: Optional Boolean parameter specifying whether to return attachment associations (the default is false).

Values: <true | false>

connectivityAssociations

Description: Optional Boolean parameter specifying whether to return connectivity associations (the default is false).

Values: <true | false>

containmentAssociations

Description: Optional Boolean parameter specifying whether to return containment associations (the default is false).

Values: <true | false>

maxGeometryCount

Description: Required parameter specifying the maximum number of geometries that can be synthesized and returned in the result.

extent

Description: Required parameter specifying the envelope of the area to synthesize association geometries.

Syntax:

{
 "xmin": <minimum x-coordinate>,
 "ymin": <minimum y-coordinate>,
 "xmax": <maximum x-coordinate>,
 "ymax": <maximum y-coordinate>,
 "spatialReference": {
  "wkid": <spatial reference well-known identifier>,
  "latestWkid": <the current wkid value associated with the wkid>	
 }
}

outSR

Optional parameter representing the output spatial reference.

Syntax:

"outSR": {"wkid" : <wkid>}

JSON Response syntax

JSON response:


{
  "maxGeometryCountExceeded" : <true | false>,
  "associations" : [
    {
      "globalId" : <guid>,
      "associationType" : <attachment | connectivity | containment>,
      "fromNetworkSourceId" : <long>,
      "fromGlobalId" : <guid>,
      "fromTerminalId" : <long>,
      "toNetworkSourceId" : <long>,
      "toGlobalId" : <guid>,
      "toTerminalId" : <long>,
      "geometry" : <geometry>
    }
  ],
  "success" : <true | false>,
  "error" : {                   // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <error message>,
    "details" : [ <detail> ]    
  }
}

Example usage

Export connectivity association geometries that are synthesized as line segments between associated features using the synthesizeAssociationGeometries operation.

Request URL and parameters:

https://myserver.esri.com/server/rest/services/LandUse/UtilityNetworkServer/synthesizeAssociationGeometries

f=json
gdbVersion=SDE.DEFAULT
connectivityAssociations=true
maxGeometryCount=25
extent=
{	
 "xmin": 6814287.099790375,
	"ymin": 1847003.4894856418,
	"xmax": 6814425.830360317,
	"ymax": 1847091.4713699604,
	"spatialReference": {
		"wkid": 3498,
		"latestWkid": 3498	
 }
}

JSON response:

{
 "maxGeometryCountExceeded": false,
 "associations": [
  {
   "globalId": "{1EC703AE-E366-49A3-B1BC-C47CCE64EB18}",
   "fromNetworkSourceId": 6,
   "fromGlobalId": "{401220B7-8BC5-4880-903C-1C12FDCA7AA4}",
   "fromTerminalId": 8,
   "toNetworkSourceId": 9,
   "toGlobalId": "{B7341BE2-22AC-472C-9525-AFB49D3744C6}",
   "toTerminalId": 1,
   "associationType": "connectivity",
   "geometry": {
    "paths": [
     [
      [
       6814350.21697822213,
       1847032.11133039
      ],
      [
       6814325.15600472689,
       1847030.02307997644
      ]
     ]
    ]
   }
  },
  {
   "globalId": "{BB40E459-14BF-4C95-BE03-D8DFDC41BE07}",
   "fromNetworkSourceId": 6,
   "fromGlobalId": "{401220B7-8BC5-4880-903C-1C12FDCA7AA4}",
   "fromTerminalId": 9,
   "toNetworkSourceId": 9,
   "toGlobalId": "{ECADD413-D492-4FC4-BA18-8846397D7872}",
   "toTerminalId": 1,
   "associationType": "connectivity",
   "geometry": {
    "paths": [
     [
      [
       6814294.87424114347,
       1847025.32427047193
      ],
      [
       6814325.15600472689,
       1847030.02307997644
      ]
     ]
    ]
   }
  }
 ],
 "success": true
}