查找bucketid encoder.getBucketIndices()
的函数需要输入值的双精度或字符串。
但是,GeospatialCoordinateEncoder
的输入值为bucket[]
,其中包含经度和纬度以及另一倍速。
我该如何解决这些问题?
这是代码:
public int[] getBucketIndices(double input) {}
public int[] getBucketIndices(String input) {}
问题是GeospatialCoordinateEncoder的输入值为:
int[] encoding1 = encode(ge, new double[] { -122.229194, 37.486782 }, speed);// ge is GeospatialCoordinateEncoder
public int[] encode(CoordinateEncoder encoder, double[] coordinate, double radius) {
int[] output = new int[encoder.getWidth()];// return n/** number of bits in the representation (must be >= w) */
encoder.encodeIntoArray(new Tuple(coordinate[0], coordinate[1], radius), output);
return output;//
}
get bucketid函数
int bucketIdx = encoder.getBucketIndices(value)[0];
最佳答案
我们没有忘记你。答案是,到目前为止,尚未为Java或Python版本的GeospatialCoordinateEncoder开发此功能。我们现在正在讨论此操作的实现-当我们做出决定时,我将在此处发布github问题链接(如果StackOverflow允许以这种方式解决问题)。