Skip to main content

Distance

This class provides a standardized interface for representing and converting distance measurements across a wide variety of units. It supports arithmetic operations, such as multiplication with other distance objects to produce area measurements or with numeric types for scaling. The class also includes an extensive mapping of unit aliases to ensure compatibility with Spatial Reference WKT definitions.

Attributes

AttributeTypeDescription
STANDARD_UNITstring = "m"The base unit of measurement used for internal calculations and normalization, defined as meters.
UNITSdictA mapping of unit names to their conversion factors relative to the standard unit of meters.
ALIASdictA dictionary mapping common unit names and Spatial Reference WKT terms to their internal unit keys.
LALIASdictA lowercase version of the ALIAS mapping used for case-insensitive unit lookups.

Constructor

Signature

def Distance()