The function for finding bucketid encoder.getBucketIndices() require a double or string of input value.
However, the input value of the GeospatialCoordinateEncoder is bucket[] which contain longitude and lantitude, and another double speed.
How can I solve these problem?
Here is the code:
public int[] getBucketIndices(double input) {}
public int[] getBucketIndices(String input) {}
the problem is the input value for the GeospatialCoordinateEncoder is :
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;//
}
the get bucketid function
int bucketIdx = encoder.getBucketIndices(value)[0];
we haven't forgotten about you. The answer is that so far this functionality was never developed for the GeospatialCoordinateEncoder in either its Java or Python version. We're discussing the implementation of this now - when we decide something, I'll post the github issue link here (if StackOverflow allows questions to be resolved in this manner).