User Tools

Site Tools


api:dk11:java:tatukgis.jdk.tgis_csunits.aslinear_double_boolean

TGIS_CSUnits.AsLinear method

DK for Java | tatukgis.jdk.TGIS_CSUnits.AsLinear | Constructors | Methods | Properties

Convert a linear value to a string representation with the appropriate unit symbol.

Available also on: Delphi | .NET | ActiveX | Python.

Syntax

// Java
public java.lang.String AsLinear(
  double _value,
  bool _prec
);
// Oxygene
public
  function AsLinear(
    _value : Double;
    _prec : Boolean
  ) : String;

Parameters

Name Type Description
_value double
Double
Value in base linear units.
_prec bool
Boolean
If True, fixed decimal digits are used; if False, only significant digits are shown without trailing zeros.

Result

Type Description
java.lang.String
String
Formatted value with unit symbol.

Remarks

If the unit type is TGIS_CSUnitsType.Auto, the returned string uses an automatically selected linear subunit.

USAGE: Format a measured length for display using the most suitable linear unit symbol.

length_text = units.AsLinear(shape.LengthCS, True)

References

2026/09/20 23:57

Page Tools