gis-tools-ts - v0.6.0
    Preparing search index...

    Function pointOnLine

    • Check to see if a point is on a line. Uses predicates to ensure the point is truly on the line

      Type Parameters

      • M = Record<string, unknown>
      • D extends Properties = Properties
      • P extends Properties = Properties

      Parameters

      • line:
            | VectorLineString<D>
            | VectorLineStringGeometry<D>
            | VectorFeature<M, D, P, VectorLineStringGeometry<D>>

        the line to check against

      • point: VectorPoint

        the point to check if it is on the line

      • epsilon: number = 0

        the buffer to use to check if the point is on the line within epsilon. Defaults to 0

      Returns boolean

      True if the point is on the line