[英]How can I find the bucketid when using GeospatialCoordinateEncoder in htm.java
查找bucketid encoder.getBucketIndices 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允許以這種方式解決問題)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.