mapbox / mapbox/tile-decorator

mergeLines issues

Open
#13 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
36
Forks
9
PR merge metrics
No merged PRs in 30d

Description

A couple of line merging issues. I've already started digging into these, just recording here:

### 1. don't join reversed edges
In traffic-maps, each direction of a way is a separate geometry. They aren't offset directly in geometry. The points are simply reversed:

A -> B (northbound)
B -> A (southbound)

Because of this, tile-decorator's mergeLines function is in some cases joining traffic opposites to eachother. This cause some offsetting artifacts in the style depending on line-join setting:

c298c5fe-d28e-11e6-8dd1-0296280398c2

### 2. adjacent edges

It seems that it's possible for mergeLines to fail merging segments that are adjacent & have identical properties

screen shot 2017-04-19 at 22 03 00

I believe this has been _possible_ before, but a recent regression has made it worse.

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.

Research direction

Start at tile-decorator's mergeLines function and inspect how it handles reversed and adjacent segments. Reproduce both reported cases using the issue's traffic-map examples or equivalent inputs. Done means opposite-direction edges remain separate and adjacent segments with identical properties merge without the reported style artifacts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.