Esri / Esri/geometry-api-java

Convex Hull of One Point

Open
#288 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
710
Forks
269
Avg merge
7d 23h
Merged PRs (30d)
1

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](https://github.com/Esri/spatial-framework-for-hadoop/pull/181).
```java

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.