Esri / Esri/geometry-api-java

Convex Hull of One Point

未关闭
#288 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
710
派生
269
平均合并
7 天 23 小时
30 天内合并 PR
1

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。