turf-along

WebJar for turf-along

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

turf-along
Last Version

Last Version

3.0.12
Release Date

Release Date

Type

Type

jar
Description

Description

turf-along
WebJar for turf-along
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/turf-junkyard/turf-along

Download turf-along

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/turf-along/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>turf-along</artifactId>
    <version>3.0.12</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/turf-along/
implementation 'org.webjars.npm:turf-along:3.0.12'
// https://jarcasting.com/artifacts/org.webjars.npm/turf-along/
implementation ("org.webjars.npm:turf-along:3.0.12")
'org.webjars.npm:turf-along:jar:3.0.12'
<dependency org="org.webjars.npm" name="turf-along" rev="3.0.12">
  <artifact name="turf-along" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='turf-along', version='3.0.12')
)
libraryDependencies += "org.webjars.npm" % "turf-along" % "3.0.12"
[org.webjars.npm/turf-along "3.0.12"]

Dependencies

compile (4)

Group / Artifact Type Version
org.webjars.npm : turf-bearing jar [3.0.12,4)
org.webjars.npm : turf-destination jar [3.0.12,4)
org.webjars.npm : turf-distance jar [3.0.12,4)
org.webjars.npm : turf-helpers jar [3.0.12,4)

Project Modules

There are no modules declared in this project.

turf-along

build status

turf.along(line, distance, [units=miles])

Takes a LineString|line and returns a Point|point at a specified distance along the line.

Parameters

parameter type description
line Feature.<LineString> input line
distance Number distance along the line
[units=miles] String optional: can be degrees, radians, miles, or kilometers

Example

var line = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "LineString",
    "coordinates": [
      [-77.031669, 38.878605],
      [-77.029609, 38.881946],
      [-77.020339, 38.884084],
      [-77.025661, 38.885821],
      [-77.021884, 38.889563],
      [-77.019824, 38.892368]
    ]
  }
};

var along = turf.along(line, 1, 'miles');

var result = {
  "type": "FeatureCollection",
  "features": [line, along]
};

//=result

Returns Feature.<Point>, Point distance units along the line

Installation

Requires nodejs.

$ npm install turf-along

Tests

$ npm test
org.webjars.npm

deprecated turf modules: do not use or reference, for redirects only

turf is now a monorepo: all turf modules are in Turfjs/turf

Versions

Version
3.0.12