Skip To Content

Copy lines to parcel type

  • URL:https://<parcelfabricservice-url>/copyLinesToParcelType
  • Required Capability:ArcGIS Advanced Editing
  • Version Introduced:10.8

Description

The copyLinesToParcelType operation copies selected lines or the lines of selected parcels to the specified parcel type and specified record. Use this operation to construct new, child parcels based on parent parcel lines. If the copied lines form closed loops, parcel seeds will automatically be created for the loops. Copied lines can be edited (insert, delete, and update) before building parcels.

If the parcel type of the new parcels is the same as the copied lines, parcel history will be tracked.

Learn more about copying lines to a parcel type

Request parameters

ParameterDetails
gdbVersion

The name of the geodatabase version (the default is the DEFAULT version).

Syntax

gdbVersion=<version>
sessionId

The token (GUID) used to lock the version. If the calling client is editing a named version, the sessionId value is required. If the specified version is currently locked by another session, the request will fail if the sessionId value is not provided or does not match the sessionId value that holds the exclusive lock. If the client is editing the default version, the sessionId value is not required.

Syntax

sessionId=<guid>
parentParcels

(Required)

A list of the parent parcels with the lines that will be copied.

Syntax

parentParcels=[{"id":"<parcelguid>","layerId":"16"},{...}]
record

(Required)

The unique identifier (GUID) of the record. Copied lines will be associated with the specified record.

Syntax

record=<guid>
markParentAsHistoric

(Required)

Specifies whether parent parcels will be retired as historic when lines are copied.

Values: true | false

Syntax

markParentAsHistoric=<boolean>
useSourceLineAttributes

(Required)

Specifies whether the attributes of the original lines will be preserved and transferred to the copied lines.

Values: true | false

Syntax

useSourceLineAttributes=<boolean>
useSourcePolygonAttributes

(Required)

Specifies whether the attributes of the parent parcels will be preserved and transferred to the generated seeds.

Values: true | false

Syntax

useSourcePolygonAttributes=<boolean>
targetParcelType

(Required)

The target parcel type.

Syntax

targetParcelType=<layer id>
targetParcelSubtype

(Optional)

The target parcel subtype.

Syntax

targetParcelSubtype=<subtype id>
attributeOverrides

(Required)

The attributes that will be set on the copied parcel lines.

Syntax

attributeOverrides={"type":"PropertySet","propertySetItems":["<fieldname>",<value>, ...]}

When no attributes are set

attributeOverrides={"type":"PropertySet","propertySetItems":[]}
async

Specifies whether the request will be processed as an asynchronous job and a URL that points to a location displaying the status of the job will be returned. See the topic regarding asynchronous usage for more information. The default is false.

Values: true | false

Syntax

async=true|false
f

Specifies the output format of the response. The default response format is html.

Values: html | json

Example usage

This example shows the steps for copying lines from a tax parcel to a specified record using the copyLinesToParcelType operation.

Note:
The sessionId parameter value must be the same for starting the edit session, performing the edit operation, and stopping the edit session.

  1. Start a service session on the version.

    Request URL and parameters:

    
    https://machine.domain.com/webadaptor/rest/services/CountyFabric/VersionManagementServer/versions/E4DAED9D-C859-489B-9053-767A45F1D97C/startReading
    f=json
    sessionId={0BD2FFC2-8B4D-4F3E-B497-0CD1E166D259}

  2. Start an edit session on the version.

    Request URL and parameters:

    
    https://machine.domain.com/webadaptor/rest/services/CountyFabric/VersionManagementServer/versions/E4DAED9D-C859-489B-9053-767A45F1D97C/startEditing
    f=json
    sessionId={0BD2FFC2-8B4D-4F3E-B497-0CD1E166D259}

  3. Copy lines from a selected tax parcel to the specified record. Do not change the parcel type and retire the original parcel as historic.

    Request URL and parameters:

    
    https://machine.domain.com/webadaptor/rest/services/CountyFabric/ParcelFabricServer/copyLinesToParcelType
    f=json
    gdbVersion=admin.Version1
    sessionId={0BD2FFC2-8B4D-4F3E-B497-0CD1E166D259}
    parentParcels=[{"id":"{9887AFF5-1B86-42B4-8D2F-9CD45796362B}","layerId":"16"}]
    record={67D9858E-B4D8-4C12-84C9-685EBA04B741}
    useSourceLineAttributes=true
    useSourcePolygonAttributes=true
    targetParcelType=16
    attributeOverrides={"type":"PropertySet","propertySetItems":[]}
    async=false
  4. If edits are complete, stop the edit session.
  5. Stop and release the service session.

JSON Response syntax

The following response is returned when async is false:


{
  "exceededTransferLimit": <true | false>,
  "moment": <datetime>,
  "error": {  // only if success is false
    "extendedCode": <HRESULT>,
    "message": <error message>,
    "details": [<detail>]
  },
  "serviceEdits": {  // only if transfer limit is not exceeded
    "editedFeatures": {
      "updates": {
        "attributes": {},
        "geometry": {}
      },
      {
        "adds": {
          "attributes": {},
          "geometry": {}
        },
        {
          "spatialReference": {<spatial reference>}
        }
      },
      "id": <layerID>}
    }
  },
  "success": <true | false>
}

The following response is returned when async is true:


{
		"statusUrl": <url>
}

JSON Response example

The following is a response example when async is false:


{
  "moment": 1570214271337,
  "exceededTransferLimit": false,
  "serviceEdits": [
    {
      "id": 2,
      "editedFeatures": {
        "spatialReference": {
          "wkt": "PROJCS[\"User_Defined_Transverse_Mercator\",GEOGCS[\"GCS_User_Defined\",DATUM[\"D_User_Defined\",SPHEROID[\"User_Defined_Spheroid\",6378285.48,298.2641653866821]],PRIMEM[\"Greenwich\",0.0],UNIT
                 [\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",262000.0009333333],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-87.55],
                 PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",43.26666666666667],UNIT[\"Foot_US\",0.3048006096012192]]",
          "xyTolerance": 0.0032808333333333331,
          "zTolerance": 0.001,
          "mTolerance": 0.001,
          "falseX": -18187000,
          "falseY": -48539200,
          "xyUnits": 3048.00609601219276,
          "falseZ": -100000,
          "zUnits": 10000,
          "falseM": -100000,
          "mUnits": 10000
        },
        "adds": [
          {
            "attributes": {
              "ObjectID": 128541,
              "IsRetired": 1,
              "Shape__Area": 17475.9162143341237,
              "Shape__Length": 529.171513833105564
            },
            "geometry": {
              "rings": [
                [
                  [210323.412628661841, 171340.338895075023],
                  [210323.412628661841, 171477.680483907461],
                  [210450.656796745956, 171477.680483907461],
                  [210450.656796745956, 171340.338895075023],
                  [210323.412628661841, 171340.338895075023]
                ]
              ]
            }
          },
          {
            "attributes": {
              "ObjectID": 128542,
              "IsRetired": 1,
              "Shape__Area": 17475.9162143341237,
              "Shape__Length": 529.171513833105564
            },
            "geometry": {
              "rings": [
                [
                  [210323.412628661841, 171340.338895075023],
                  [210323.412628661841, 171477.680483907461],
                  [210450.656796745956, 171477.680483907461],
                  [210450.656796745956, 171340.338895075023],
                  [210323.412628661841, 171340.338895075023]
                ]
              ]
            }
          },
          {
            "attributes": {
              "ObjectID": 128543,
              "IsRetired": 1,
              "Shape__Area": 270.169233684910864,
              "Shape__Length": 75.9565410017967224
            },
            "geometry": {}
          },
          {
            "attributes" {}
          }
        ]
      }
    },
    {
      "id": 1,
      "editedFeatures": {
        "spatialReference": {
          "wkt": "PROJCS[\"User_Defined_Transverse_Mercator\",GEOGCS[\"GCS_User_Defined\",DATUM[\"D_User_Defined\",SPHEROID[\"User_Defined_Spheroid\",6378285.48,298.2641653866821]],PRIMEM[\"Greenwich\",0.0],UNIT
                 [\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",262000.0009333333],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-87.55],
                 PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",43.26666666666667],UNIT[\"Foot_US\",0.3048006096012192]]",
          "xyTolerance": 0.0032808333333333331,
          "zTolerance": 0.001,
          "mTolerance": 0.001,
          "falseX": -18187000,
          "falseY": -48539200,
          "xyUnits": 3048.00609601219276,
          "falseZ": -100000,
          "zUnits": 10000,
          "falseM": -100000,
          "mUnits": 10000
        },
        "updates": {...}
      }
    },
    {
      "id": 15,
      "editedFeatures": {
        "spatialReference": {
          "wkt": "PROJCS[\"User_Defined_Transverse_Mercator\",GEOGCS[\"GCS_User_Defined\",DATUM[\"D_User_Defined\",SPHEROID[\"User_Defined_Spheroid\",6378285.48,298.2641653866821]],PRIMEM[\"Greenwich\",0.0],UNIT
                 [\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",262000.0009333333],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-87.55],
                 PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",43.26666666666667],UNIT[\"Foot_US\",0.3048006096012192]]",
          "xyTolerance": 0.0032808333333333331,
          "zTolerance": 0.001,
          "mTolerance": 0.001,
          "falseX": -18187000,
          "falseY": -48539200,
          "xyUnits": 3048.00609601219276,
          "falseZ": -100000,
          "zUnits": 10000,
          "falseM": -100000,
          "mUnits": 10000
        },
        "adds": [
          {
            "attributes": {
              "objectid": 581811,
              "createdbyrecord": "{C25E67BB-5879-4ABB-9BD7-A4E7DCE792AD}",
              "retiredbyrecord": null,
              "parentlineid": "{1D339967-2AEF-4C65-8B13-BC156D41AD62}",
              "direction": 108.36827333,
              "distance": null,
              "radius": -60.00054585,
              "arclength": 30.32192978,
              "radius2": null,
              "cogotype": null,
              "iscogoground": null,
              "cogoaccuracy": 6,
              "rotation": null,
              "scale": null,
              "created_user": "admin",
              "create_date": 1570214271000,
              "last_edited_user": "admin",
              "last_edited_date": 1570214271000,
              "globalid": "{C76B75FF-C75D-41CF-A83F-9C1E5292613A}",
              "Shape__Length": 30.3219399666291451
            }
          }
        ]
      }
    }
  ],
  "success": true
}