Line between two points

Hierarchy

  • Line
    • GridLine

Constructors

  • Returns GridLine

  • Parameters

    • hasZ: boolean
    • hasM: boolean

    Returns GridLine

  • Parameters

    • points: Point[]

    Returns GridLine

  • Parameters

    • line: Line

    Returns GridLine

  • Constructor

    Since

    1.1.1

    Parameters

    • point1: Point

      first point

    • point2: Point

      second point

    Returns GridLine

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: any

    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 first point

    Returns

    first point

    Returns Point

  • Get the second point

    Returns

    second point

    Returns Point

  • Get the unit

    Returns

    unit

    Returns undefined | Unit

  • Check if the line has a grid type

    Returns

    true if has grid type

    Returns boolean

  • Get the intersection between this line and the provided line

    Returns

    intersection

    Parameters

    • line: Line

      line

    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

  • Is this line in meters

    Returns

    true if meters

    Returns boolean

  • {@inheritDoc}

    Returns boolean

  • Is in the provided unit type

    Returns

    true if in the unit

    Parameters

    • unit: Unit

      unit

    Returns boolean

  • Get the number of points

    Returns

    number of points

    Returns number

  • Set the first point

    Parameters

    • point1: Point

      first point

    Returns void

  • Set the second point

    Parameters

    • point2: Point

      second point

    Returns void

  • Set the points

    Parameters

    • point1: Point

      first point

    • point2: Point

      second point

    Returns void

  • {@inheritDoc}

    Returns Point

  • Convert to degrees

    Returns

    line in degrees, same line if already in degrees

    Returns Line

  • Convert to meters

    Returns

    line in meters, same line if already in meters

    Returns Line

  • Convert to the unit

    Returns

    point in units, same point if equal units

    Parameters

    • unit: Unit

      unit

    Returns Line

  • 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