spatialhadoop2 icon indicating copy to clipboard operation
spatialhadoop2 copied to clipboard

RTree knn ArrayIndexOutOfBoundsException

Open cugwind opened this issue 8 years ago • 0 comments

if (distances.elementAt(k - 1) > query_radius) { result_correct = false;

      //query_radius = distances.elementAt(k);//when shapes.size() == k  throw   ArrayIndexOutOfBoundsException

==> if (shapes.size() == k) { query_radius = distances.elementAt(k - 1) + 0.000001d; } else { query_radius = distances.elementAt(k); }

    } else {
      result_correct = true;

}

cugwind avatar Dec 09 '16 06:12 cugwind