Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Geodesy

Provides geodesy calculations. Use the factory methods in the GeodesyFactory module to create instances of this interface. For boolean operations on shapes see the ConstructiveGeometryFactory module.

Hierarchy

  • Geodesy

Overview

Properties

reference

reference: CoordinateReference | null

The reference in which this geodesy performs its calculations

Methods

area

  • Calculates the area of the given shape.

    Note: Currently only polygons are supported.

    Parameters

    • shape: Shape

      The shape for which to calculate the area.

    Returns number

    The area of the shape in m^2.

distance

  • Calculates the distance between two points in meters in 2D space.

    If the reference of a point is null it will be assumed to be the same as this instance's calculation reference.

    Parameters

    Returns number

    the distance between the two points in meters

distance3D

  • Calculates the distance between two points in 3D space expressed in meters (Cartesian Geodesy only).

    This method can be used only on Geodesy instances created by createCartesianGeodesy. Invoking this method on other types of Geodesy results in throwing a ProgrammingError.

    throws

    ProgrammingError if method invoked on incorrect Geodesy instance.

    Parameters

    Returns number

    the distance between two points in 3D space expressed in meters.

forwardAzimuth

  • Calculates the forward azimuth between two points.

    If the reference of a point is null it will be assumed to be the same as this instances calculation reference.

    Parameters

    Returns number

    the forward azimuth between the two points in degrees

interpolate

  • Interpolate a point at the fraction of the segment defined by the two points.

    If the reference of the input point(s) is null it will be assumed to be the same as this instance's calculation reference.

    Parameters

    • startPoint: Point

      the starting point

    • endPoint: Point

      the end point.

    • fraction: number

      a fraction between 0.0 and 1.0.

    • Optional lineType: LineType

      the line type along which to compute the point (LineType.SHORTEST_DISTANCE if not specified)

    Returns Point

    an interpolated point specified with respect to the calculation reference

  • Computes the point at a given distance and azimuth from the given point.

    If the reference of the input point(s) is null it will be assumed to be the same as this instance's calculation reference.

    If the distance is negative, this will result in an interpolation in the opposite direction.

    Parameters

    • point: Point

      the starting point

    • distance: number

      the distance in meters

    • azimuth: number

      the azimuth (this is an angle in degrees)

    • Optional lineType: LineType

      the line type along which to compute the point (LineType.SHORTEST_DISTANCE if not specified)

    Returns Point

    an interpolated point specified with respect to the calculation reference

shortestDistanceToLine

  • (fromPoint: Point, linePointOne: Point, linePointTwo: Point, options: { clipToSegment?: boolean }, resultPointSFCT: Point): number
  • Calculates the shortest distance from point fromPoint to the line linePointOne-linePointTwo . Puts the result in the given point as a side effect, and returns the distance from fromPoint to that calculated point.

    Parameters

    • fromPoint: Point

      The point from which to calculate the distance to the line.

    • linePointOne: Point

      The first point of the line

    • linePointTwo: Point

      The second point of the line

    • options: { clipToSegment?: boolean }

      The options for the calculation

      • Optional clipToSegment?: boolean

        If false, the shortest distance will be calculated for the whole line. Otherwise it will only be calculated for the line segment linePointOne-linePointTwo.

        default

        false

    • resultPointSFCT: Point

      Point on the line linePointOne-linePointTwo that is calculated to be at the shortest distance from fromPoint. This point may be clipped onto the line segment depending on the value of clipToSegment property in the options.

    Returns number

    The distance to the line (or line segment) in meters

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method