join-lines

0.1.2 • Public • Published

join-lines

Join GeoJSON LineStrings together.

Usage

import joinLines from 'join-lines'

Given an array of GeoJSON LineString's, will find all that touch at endpoints and join them together.

Parameters

  • input Array An array of GeoJSON LineString coordinates
  • options Object?
    • options.preserveDirections Object If true then no line will be flipped in the other direction, if false then this may happen. (optional, default false)
    • options.tolerance Object Tolerance allowed to still join endpoints which are close but not exactly touching. (optional, default 0)

Returns Array An array of joined LineString coordinates.

/join-lines/

    Package Sidebar

    Install

    npm i join-lines

    Weekly Downloads

    1

    Version

    0.1.2

    License

    ISC

    Unpacked Size

    14.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • andrewharvey