Permalink
Browse files

update to M06 fixes, transaction, removed debug message #18

  • Loading branch information...
jexp committed Oct 23, 2013
1 parent ee15b9f commit 1292e3bbcde174a9449bbbcb64850be0d1474979
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/main/java/org/neo4j/collections/rtree/RTreeIndex.java
@@ -206,7 +206,11 @@ public void clear(final Listener monitor) {
@Override
public Envelope getBoundingBox() {
return getIndexNodeEnvelope(getIndexRoot());
try (Transaction tx = database.beginTx()) {
Envelope result = getIndexNodeEnvelope(getIndexRoot());
tx.success();
return result;
}
}
@Override
@@ -306,7 +310,7 @@ public void visit(SpatialIndexVisitor visitor, Node indexNode) {
}
public Node getIndexRoot() {
return getRootNode().getSingleRelationship(RTreeRelationshipTypes.RTREE_ROOT, Direction.OUTGOING).getEndNode();
return getRootNode().getSingleRelationship(RTreeRelationshipTypes.RTREE_ROOT, Direction.OUTGOING).getEndNode();
}
@@ -342,7 +346,6 @@ protected Envelope getIndexNodeEnvelope(Node indexNode) {
double[] bbox = (double[]) indexNode.getProperty(PROP_BBOX);
// Envelope parameters: xmin, xmax, ymin, ymax
System.out.println("bbox = " + Arrays.toString(bbox));
return new Envelope(bbox[0], bbox[2], bbox[1], bbox[3]);
}

0 comments on commit 1292e3b

Please sign in to comment.