class LocationIndexTree implements LocationIndex {

    public void query(BBox queryShape, final Visitor function) {
        BBox bbox = graph.getBounds();
        final IntHashSet set = new IntHashSet();
        query(START_POINTER, queryShape,
                bbox.minLat, bbox.minLon, bbox.maxLat - bbox.minLat, bbox.maxLon - bbox.minLon,
                new Visitor() {
                    @Override
                    public boolean isTileInfo() {
                        return function.isTileInfo();
                    }

                    @Override
                    public void onTile(BBox bbox, int width) {
                        function.onTile(bbox, width);
                    }

                    @Override
                    public void onNode(int nodeId) {
                        if (set.add(nodeId))
                            function.onNode(nodeId);
                    }
                }, 0);
    }

    public  LocationIndexTree(Graph g, Directory dir);

}