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

    Function clipLine

    • Data should always be in a 0->1 coordinate system to use this clip function

      Type Parameters

      • M extends Properties = Properties

      Parameters

      • geom: VectorLineString<M>

        the original geometry line

      • bbox: BBox

        the bounding box to clip the line to

      • isPolygon: boolean

        true if the line comes from a polygon

      • offset: number = 0

        the starting offset the line starts at

      • buffer: number = 0.0625

        the buffer to apply to the line (spacing outside the bounding box)

      Returns ClipLineResultWithBBox<M>[]

      • the clipped geometry