Turfjs / Turfjs/turf

Problem with line offset

Open
#933 14 comments 0 reactions 1 assignee View on GitHub

@rowanwins is already working on this.

Since Sep 6, 2017.

@turf/line-offset bug
Dominant language
TypeScript
Stars
10.5k
Forks
1k
Avg merge
1h 11m
Merged PRs (30d)
4

Description

Hi guys, im having some issues with the line offset function, it was working ok with a test dataset but then I changed the data and it doesn't work anymore.

The function is returning an array with the first and last coordinate but a bunch of [NaN, NaN] in between. I'm not sure if I have to do something to the data before calling the function, it was working correctly but maybe im missing something.

https://codepen.io/Armindou/pen/dzLgRz?editors=1111

Thanks in advance!

This may be off-topic but the reason im using the line offset is because I need to create a polygon around the route, so what im trying to do is to get 2 offsets (a positive and a negative one), then merge them into a single line and making a polygon of it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.