Skip to content

andrewharvey/join-lines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Join GeoJSON LineStrings together

Resources

Stars

Watchers

Forks

Packages

No packages published