CalculateTolerances

Title  Calculate Tolerances and Resolutions

Description

Calculate the XY, Z, and M tolerances based on a measure unit for systems that will use a linear referencing system (LRS).

Usage

          
Specify the spatial reference and the unit of measure for the M values.
The tolerances are printed as geoprocessing messages. These values should be entered when defining the spatial reference of the feature dataset.

License

Basic

Extensions

Location Referencing

Syntax

CalculateTolerances (spatial_reference, {measure_unit})

Parameter Explanation Data Type
spatial_reference Dialog Reference

The spatial reference of the dataset.

GPSpatialReference
measure_unit (Optional) Dialog Reference

Unit of measurement for the M values.

GPString

Code Samples

CalculateTolerances example 1 (Python window)

Calculate resolutions and tolerances for metric units.

import arcpy

arcpy.udms.CalculateTolerances(3457, "METERS")

CalculateTolerances example 2 (stand-alone script)

Calculate resolutions and tolerances for metric units.

import json

import arcpy

spatial_reference = arcpy.SpatialReference(3457)  # Louisiana SPCS South
units = "METERS"

result = arcpy.udms.CalculateTolerances(
    spatial_reference=spatial_reference,
    measure_unit=units,
)

# For programmatic access, the tolerances are resolutions are returned as JSON.
res = json.loads(result[0])
for k, v in res.items():
    print(f"{k}\t{v}")