Class DiskTreeReader

  • All Implemented Interfaces:
    IDiskTree

    public class DiskTreeReader
    extends Object
    implements IDiskTree
    Reader for the Sort-Tile-Recursive disk index.
    Author:
    Andrea Antonello (www.hydrologis.com)
    See Also:
    IDiskTree
    • Constructor Detail

      • DiskTreeReader

        public DiskTreeReader​(String path)
        Constructor.
        Parameters:
        path - the path from which to read.
    • Method Detail

      • readIndex

        public org.locationtech.jts.index.strtree.STRtree readIndex()
                                                             throws Exception
        Reads the STRtree object from the file.
        Returns:
        the quadtree, holding envelops and geometry positions in the file.
        Throws:
        Exception
      • pickGeometry

        public org.locationtech.jts.geom.Geometry pickGeometry​(long position,
                                                               long size)
                                                        throws Exception
        Reads a single geomtry, using the info from the quadtree read in readIndex().
        Parameters:
        position - the position of the geom to read.
        size - the size of the geom to read.
        Returns:
        the read geometry.
        Throws:
        Exception