Class PixelGridTraversal

java.lang.Object
com.graphhopper.storage.index.PixelGridTraversal

public class PixelGridTraversal extends Object
We need all grid cells intersected by a line. The best algorithm is a 'voxel grid traversal algorithm' and described in "A Fast Voxel Traversal Algorithm for Ray Tracing" by John Amanatides and Andrew Woo (1987): http://www.cse.yorku.ca/~amana/research/grid.pdf
Author:
Michael Zilske
  • Constructor Details

    • PixelGridTraversal

      public PixelGridTraversal(int parts, BBox bounds)
  • Method Details

    • traverse

      public void traverse(org.locationtech.jts.geom.Coordinate a, org.locationtech.jts.geom.Coordinate b, Consumer<org.locationtech.jts.geom.Coordinate> consumer)