Skip To Content ArcGIS for Developers Sign In Dashboard

Analyze by least squares adjustment

  • URL:https://<parcelfabricservice-url>/analyzeByLeastSquaresAdjustment
  • Required Capability:ArcGIS Parcel Fabric
  • Version Introduced:10.8.1

Description

Analyzes the parcel fabric measurement network by running a least squares adjustment on the input parcels. A least-squares adjustment is a mathematical procedure that uses statistical analysis to estimate the most likely coordinates for connected points in a measurement network.

Different types of adjustments can be run on the parcel fabric depending on whether you are evaluating spatial accuracy or improving spatial accuracy. The following two least squares analysis types can be run on the parcel fabric:

  • Consistency check–Uses a free network adjustment to check measurements (dimensions) on input parcel lines for blunders and outliers.
  • Weighted least squares-Uses two or more fixed or weighted control points to estimate updated coordinates for points on the input parcels.

Use applyLeastSquaresAdjustment to apply the results of a least squares adjustment to parcel fabric feature classes.

Request parameters

ParameterDetails
gdbVersion

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

Syntax

gdbVersion=<version>
sessionId

Represents the token (guid) used to lock the version. If the calling client is editing a named version, the session ID is required. 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. If the client is editing the default version, the session ID is not required.

Syntax

sessionId=<guid>
analysisType

Represents the type of least squares analysis that will be run on the input parcels.

  • CONSISTENCY_CHECK–A free-network least-squares adjustment will be run to check dimensions on parcel lines for inconsistencies and mistakes. Fixed or weighted control points will not be used by the adjustment.
  • WEIGHTED_LEAST_SQUARES–A weighted least-squares adjustment will be run to compute updated coordinates for parcel points. The parcels being adjusted should connect to at least two fixed or weighted control points.

Syntax

analysisType=<string>
convergenceTolerance

Represents the maximum coordinate shift expected after iterating the least squares adjustment. A least squares adjustment is run repeatedly (in iterations) until the solution converges. The solution is considered converged when maximum coordinate shift encountered becomes less than the specified convergence tolerance. The default value is 0.05 meters or 0.164 feet.

Syntax

convergenceTolerance=<long>
parcelFeatures

Represents the input parcels that will be analyzed by a least squares adjustment.

Syntax

parcelFeatures=[{"id":"<guid>","layerId":"<layerID>"},{...}]
async

(Optional)

If true, the request is processed as an asynchronous job and a URL is returned that points a location displaying the status of the job. See the topic on asynchronous usage for more information. The default is false.

Values: true | false

f

The default response format. The default response is html.

Values: html | json | pjson

Example usage

This example shows the steps for doing a consistency check on input parcels using the analyzeByLeastSquaresAdjustment operation.

Note:
The sessionId parameters 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={24deea33-b826-42de-9cc3-7200093da4be}

  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={24deea33-b826-42de-9cc3-7200093da4be}

  3. Run a consistency check on the specified parcels using the analyzeByLeastSquaresAdjustment operation.

    Request URL and parameters:

    https://machine.domain.com/webadaptor/rest/services/CountyFabric/ParcelFabricServer/analyzeByLeastSquaresAdjustment
    f=json
    gdbVersion=admin.Version1
    sessionId={24deea33-b826-42de-9cc3-7200093da4be}
    analysisType=CONSISTENCY_CHECK
    convergenceTolerance=0.16404199475065617
    parcelFeatures=[{"id":"{455428FC-63F9-4967-94E7-2A5C0D259B90}","layerId":"7"},{"id":"{D4A18A8A-7217-4FE9-853F-F28F155AB6EE}","layerId":"7"},{"id":"{1675EC35-7C8D-4A0E-8B1C-F51B7B989718}","layerId":"7"},{"id":"{13AF598B-1BB8-4ACB-A642-BDC1CA6E81F6}","layerId":"7"},{"id":"{71C444CF-34B1-47EA-86B5-4F543A58043B}","layerId":"13"},{"id":"{EA131013-1980-4A93-B7FD-DDD14291DC6A}","layerId":"13"},{"id":"{FCE266F4-757B-42FA-81E2-7030E341483B}","layerId":"13"}]
    async=true
  4. If edits are complete, stop the edit session.
  5. Stop and release the service session.

JSON Response syntax

Response when async is true:

{
  "statusUrl": <url>,
  "success": <true | false>
}

JSON Response example

Response when async is true:

{
  "statusUrl": "https://machine.domain.com/server/rest/services/Parcel_Fabric/ParcelFabricServer/jobs/j7342ce4d28494f3aa2ba27dc88092c90",
  "success": true
}