Line between two points

Hierarchy

  • Line
    • Line

Constructors

  • Returns Line

  • Parameters

    • hasZ: boolean
    • hasM: boolean

    Returns Line

  • Parameters

    • points: Point[]

    Returns Line

  • Parameters

    • line: Line

    Returns Line

  • Constructor

    Since

    1.1.1

    Parameters

    • point1: Point

      first point

    • point2: Point

      second point

    Returns Line

Accessors

  • get geometryType(): GeometryType
  • Get the geometry type

    Returns

    geometry type

    Returns GeometryType

  • get hasM(): boolean
  • Does the geometry have m coordinates

    Returns

    true if has m coordinates

    Returns boolean

  • set hasM(hasM: boolean): void
  • Set if the geometry has m coordinates

    Parameters

    • hasM: boolean

      true if has m coordinates

    Returns void

  • get hasZ(): boolean
  • Does the geometry have z coordinates

    Returns

    true if has z coordinates

    Returns boolean

  • set hasZ(hasZ: boolean): void
  • Set if the geometry has z coordinates

    Parameters

    • hasZ: boolean

      true if has z coordinates

    Returns void

  • get is3D(): boolean
  • Does the geometry have z coordinates

    Returns

    true if has z coordinates

    See

    #hasZ()

    Returns boolean

  • get points(): Point[]
  • Get the points

    Returns

    points

    Returns Point[]

  • set points(points: Point[]): void
  • Set the points

    Parameters

    • points: Point[]

      points

    Returns void

Methods

  • Add a point

    Parameters

    • point: Point

      point

    Returns void

  • Add points

    Parameters

    • points: Point[]

      points

    Returns void

  • {@inheritDoc}

    Returns Point

  • {@inheritDoc}

    Parameters

    • obj: Geometry

    Returns boolean

  • Expand the envelope with the minimum bounding box for this Geometry

    Parameters

    • envelope: GeometryEnvelope

      geometry envelope to expand

    Returns void

  • Get the mathematical centroid point of a 2 dimensional representation of the Geometry (balancing point of a 2d cutout of the geometry). Only the x and y coordinate of the resulting point are calculated and populated. The resulting Point#getZ() and Point#getM() methods will always return null.

    Returns

    centroid point

    Returns Point

  • Get the geographic centroid point of a 2 dimensional representation of the degree unit Geometry. Only the x and y coordinate of the resulting point are calculated and populated. The resulting Point#getZ() and Point#getM() methods will always return null.

    Returns

    centroid point

    Returns Point

  • Get the inherent dimension (0, 1, or 2) for this Geometry

    Returns

    dimension

    Returns number

  • Get the minimum bounding box for this Geometry

    Returns

    geometry envelope

    Returns GeometryEnvelope

  • Returns the Nth point

    Returns

    point

    Parameters

    • n: number

      nth point to return

    Returns Point

  • Get the intersection between this line and the provided line

    Returns

    intersection

    Parameters

    Returns undefined | Point

  • Determine if this Curve is closed (start point = end point)

    Returns

    true if closed

    Returns boolean

  • Is this line in degrees

    Returns

    true if degrees

    Returns boolean

  • {@inheritDoc}

    Returns boolean

  • Does the geometry have m coordinates.

    Returns

    true if has m coordinates

    See

    #hasM()

    Returns boolean

  • {@inheritDoc}

    Returns boolean

  • Is in the provided unit type

    Returns

    true if in the unit

    Parameters

    Returns boolean

  • Get the number of points

    Returns

    number of points

    Returns number

  • {@inheritDoc}

    Returns Point

  • Update currently false hasZ and hasM values using the provided geometry

    Parameters

    • geometry: Geometry

      geometry

    Returns void

  • Determine if the geometries contain a M value

    Returns

    true if has m

    Parameters

    • geometries: Geometry[]

      list of geometries

    Returns boolean

  • Determine if the geometries contain a Z value

    Returns

    true if has z

    Parameters

    • geometries: Geometry[]

      list of geometries

    Returns boolean

Generated using TypeDoc