mapbox / mapbox/mapbox-java

Add support for turf-line-intersect

Open
#1,031 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Turf
Dominant language
Java
Stars
438
Forks
117
PR merge metrics
No merged PRs in 30d

Description

What kind of issue is this?

  • Questions are better to ask on Stack Overflow. We are actively monitoring the questions there and oftentimes, others have already asked a similar question.
  • Feature request should start off by describing the problem the feature will resolve. Please open a GitHub ticket beforehand with information about the feature to spark some discussion about the topic and once you have our support.
  • Bug Report can be reported using the provided template below:
Expected Behavior

I want to detect which roads intersect the route line I've drawn on the map and the coordinate pairs for these intersections.

Current Behavior

Currently there is no way to do this that's doesn't require a lot customer math on the part of the developer. This is because our Java Turf library does not support turf-line-intersect.

Possible Implementation

Porting Turf's lineIntersect would be the most consistent, straightforward way to handle the above use case.

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 by reviewing the Java Turf library's unsupported entries in docs/turf-port.md and compare the requested behavior with Turf's lineIntersect documentation. Add support for detecting intersections between route and road lines and returning their coordinate pairs, then verify the resulting behavior against representative line geometries.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.