Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GeometryMeasure

GeometryMeasure is a class that represents a measurement with unit, unit type, and geometry type.

example



var geoMeasure= new GeometryMeasure('miles', 1, 'LineString');

Hierarchy

  • GeometryMeasure

Index

Constructors

constructor

  • new GeometryMeasure(unitType: string, value: number, geoType: string): GeometryMeasure
  • new GeometryMeasure(unitType: string, value: number, geoType: string): GeometryMeasure
  • new GeometryMeasure(unitType: string, value: number, geoType: string): GeometryMeasure
  • Parameters

    • unitType: string

      string Type of measurement unit ('feet', 'inches', 'kilometers', 'meters', 'miles', 'yards', 'acres', 'hectares').

    • value: number

      numeric Units.

    • geoType: string

      string Type of geometry ('Point', 'Polygon', 'LineString').

    Returns GeometryMeasure

  • Parameters

    • unitType: string

      string Type of measurement unit ('feet', 'inches', 'kilometers', 'meters', 'miles', 'yards', 'acres', 'hectares').

    • value: number

      numeric Units.

    • geoType: string

      string Type of geometry ('Point', 'Polygon', 'LineString').

    Returns GeometryMeasure

  • Parameters

    • unitType: string

      string Type of measurement unit ('feet', 'inches', 'kilometers', 'meters', 'miles', 'yards', 'acres', 'hectares').

    • value: number

      numeric Units.

    • geoType: string

      string Type of geometry ('Point', 'Polygon', 'LineString').

    Returns GeometryMeasure

Properties

Private _geoType

_geoType: any

Private _readable

_readable: any

Private _unitType

_unitType: any

Private _updateReadable

  • _updateReadable(): void
  • Update the readable property.

    Returns void

Private _value

_value: any

geoType

  • get geoType(): string
  • The geoType property is the type of geometry associated with the measurement ('Point', 'Polygon', 'LineString'). For readability and conversion.

    Returns string

readable

  • get readable(): string
  • The readable property is the readable string version of the defined measurement.

    Returns string

unitType

  • get unitType(): string
  • The unitType property is the type of measurement unit ('feet', 'inches', 'kilometers', 'meters', 'miles', 'yards', 'acres', 'hectares').

    Returns string

value

  • get value(): number
  • The value property is the number of units in this measurement.

    Returns number

Methods

convertTo

  • convertTo(typout: string): GeometryMeasure
  • convertTo(typout: string): GeometryMeasure
  • convertTo(typout: string): GeometryMeasure
  • Convert the measurement to the specified unit type

    Parameters

    • typout: string

      string The name of the output unit type ('feet', 'inches', 'kilometers', 'meters', 'miles', 'yards', 'acres', 'hectares').

    Returns GeometryMeasure

    a converted GeometryMeasure.

  • Convert the measurement to the specified unit type

    Parameters

    • typout: string

      string The name of the output unit type ('feet', 'inches', 'kilometers', 'meters', 'miles', 'yards', 'acres', 'hectares').

    Returns GeometryMeasure

    a converted GeometryMeasure.

  • Convert the measurement to the specified unit type

    Parameters

    • typout: string

      string The name of the output unit type ('feet', 'inches', 'kilometers', 'meters', 'miles', 'yards', 'acres', 'hectares').

    Returns GeometryMeasure

    a converted GeometryMeasure.