Problem cutting polyline with point.

Open
#285 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with the cut operator and the Polyline constructor shown in the issue, reproducing the failure with two zero-length cutter polylines created from getNearestCoordinate results. Trace how zero-length cutters are handled and add coverage for cutting a polyline at points on it; done means the requested segment can be obtained without the operator failing.

Written by the indexing model from the issue text.

Description

I'm trying to cut polyline using two points. I use getNearestCoordinate to cast them on polyline. Then I'm creating two cutters:

Polyline cutter1 = new Polyline(castedFirstPoint, castedFirstPoint);
Polyline cutter2 = new Polyline(castedSecondPoint, castedSecondPoint);

The problem is that cut operator fails if cutter len is 0. It would be nice to make such case (polyline, point which lies on poly line) working since I'm not seeing any other way to get part of polyline from firstPoint to secondPoint. Or maybe I'm missing something.

Dominant language
Java
Stars
710
Forks
268
Avg merge
7d 23h
Merged PRs (30d)
1

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.

More from Esri/geometry-api-java

All issues in Esri/geometry-api-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.