Nuanced Pumpkin Mavens

    turf-linestring

    1.0.2 • Public • Published

    turf-linestring

    build status

    turf lineString module

    turf.linestring(coordinates, properties)

    Creates a LineString Feature based on a coordinate array. Properties can be added optionally.

    Parameters

    parameter type description
    coordinates Array.<Array.> - an array of Positions
    properties Object an Object consisting of key-value pairs to add as properties

    Example

    var linestring1 = turf.linestring([
        [-21.964416, 64.148203],
        [-21.956176, 64.141316],
        [-21.93901, 64.135924],
        [-21.927337, 64.136673]
    ]);
    var linestring2 = turf.linestring([
        [-21.929054, 64.127985],
        [-21.912918, 64.134726],
        [-21.916007, 64.141016],
        [-21.930084, 64.14446]
    ], {name: 'line 1', distance: 145});
     
    //=linestring1
     
    //=linestring2

    Installation

    Requires nodejs.

    $ npm install turf-linestring

    Tests

    $ npm test

    Install

    npm i turf-linestring

    DownloadsWeekly Downloads

    2,081

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • tcql
    • morganherlocker
    • mourner
    • jvrousseau
    • jseppi
    • cspanring
    • cwmma
    • lyzidiamond
    • tmcw