/** * Fill quadtree which will span a raster over the entire specified graph g. But do this in a * pre-defined resolution which is controlled via capacity. This data structure then uses approx. * capacity * 4 bytes. So maximum capacity is 2^30 where the quadtree would cover the world * boundaries every 1.3km - IMO enough for EU or US networks. */ @Override public LocationIndex prepareIndex() { initBuffer(); initAlgo(latSize, lonSize); StopWatch sw = new StopWatch().start(); GHBitSet filledIndices = fillQuadtree(latSize * lonSize); int fillQT = filledIndices.getCardinality(); float res1 = sw.stop().getSeconds(); sw = new StopWatch().start(); int counter = fillEmptyIndices(filledIndices); float fillEmpty = sw.stop().getSeconds(); logger.info("filled quadtree index array in " + res1 + "s. size is " + getCapacity() + " (" + fillQT + "). filled empty " + counter + " in " + fillEmpty + "s"); flush(); return this; }
/** * Fill quadtree which will span a raster over the entire specified graph g. But do this in a * pre-defined resolution which is controlled via capacity. This data structure then uses approx. * capacity * 4 bytes. So maximum capacity is 2^30 where the quadtree would cover the world * boundaries every 1.3km - IMO enough for EU or US networks. */ @Override public LocationIndex prepareIndex() { initBuffer(); initAlgo(latSize, lonSize); StopWatch sw = new StopWatch().start(); GHBitSet filledIndices = fillQuadtree(latSize * lonSize); int fillQT = filledIndices.getCardinality(); float res1 = sw.stop().getSeconds(); sw = new StopWatch().start(); int counter = fillEmptyIndices(filledIndices); float fillEmpty = sw.stop().getSeconds(); logger.info("filled quadtree index array in " + res1 + "s. size is " + getCapacity() + " (" + fillQT + "). filled empty " + counter + " in " + fillEmpty + "s"); flush(); return this; }
/** * Fill quadtree which will span a raster over the entire specified graph g. But do this in a * pre-defined resolution which is controlled via capacity. This data structure then uses approx. * capacity * 4 bytes. So maximum capacity is 2^30 where the quadtree would cover the world * boundaries every 1.3km - IMO enough for EU or US networks. */ @Override public LocationIndex prepareIndex() { initBuffer(); initAlgo(latSize, lonSize); StopWatch sw = new StopWatch().start(); GHBitSet filledIndices = fillQuadtree(latSize * lonSize); int fillQT = filledIndices.getCardinality(); float res1 = sw.stop().getSeconds(); sw = new StopWatch().start(); int counter = fillEmptyIndices(filledIndices); float fillEmpty = sw.stop().getSeconds(); logger.info("filled quadtree index array in " + res1 + "s. size is " + getCapacity() + " (" + fillQT + "). filled empty " + counter + " in " + fillEmpty + "s"); flush(); return this; }
/** * Fill quadtree which will span a raster over the entire specified graph g. But do this in a * pre-defined resolution which is controlled via capacity. This datastructure then uses approx. * capacity * 4 bytes. So maximum capacity is 2^30 where the quadtree would cover the world * boundaries every 1.3km - IMO enough for EU or US networks. */ @Override public LocationIndex prepareIndex() { initBuffer(); initAlgo(latSize, lonSize); StopWatch sw = new StopWatch().start(); GHBitSet filledIndices = fillQuadtree(latSize * lonSize); int fillQT = filledIndices.getCardinality(); float res1 = sw.stop().getSeconds(); sw = new StopWatch().start(); int counter = fillEmptyIndices(filledIndices); float fillEmpty = sw.stop().getSeconds(); logger.info("filled quadtree index array in " + res1 + "s. size is " + getCapacity() + " (" + fillQT + "). filled empty " + counter + " in " + fillEmpty + "s"); flush(); return this; }