Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Convex Hull of One Point

Open
#288 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start at OperatorConvexHull.local().execute with the OnePointCursor test shown in the issue, and inspect how a single Point is handled. Run or recreate testOnePoint; done means the convex-hull result is a non-empty degenerate polygon and the assertion passes.

Written by the indexing model from the issue text.

Description

Expected: non-empty degenerate polygon.
Actual: empty geometry.
Is there a different way I should be calling the convex-hull operator?
Relates SF4H-181.


  private static class OnePointCursor extends GeometryCursor {
    private boolean flag = true;
    OnePointCursor() {}
    public Geometry next() {
      if (flag) {
        flag = false;
        return new Point(1.2, 3.4);
      } else
        return null;
    }
    public int getGeometryID() {
      throw new UnsupportedOperationException();
    }
  }

  @Test
  public static void testOnePoint() {
    GeometryCursor geomCursor = new OnePointCursor();
    GeometryCursor convexResult = OperatorConvexHull.local().execute(geomCursor, true, null);
    Geometry result = convexResult.next();
    System.err.println(result);  // {"rings":[]}
    assertFalse(result.isEmpty());  // junit.framework.AssertionFailedError
  }

cc @JordanMLee

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.