Class DiskTreeReader
- java.lang.Object
-
- org.hortonmachine.gears.io.disktree.DiskTreeReader
-
-
Field Summary
-
Fields inherited from interface org.hortonmachine.gears.io.disktree.IDiskTree
INDEX_ADDRESS_POSITION, INDEX_ADDRESS_SIZE, INDEX_LENGTH_SIZE
-
-
Constructor Summary
Constructors Constructor Description DiskTreeReader(String path)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the filehandle.org.locationtech.jts.geom.GeometrypickGeometry(long position, long size)Reads a single geomtry, using the info from the quadtree read inreadIndex().org.locationtech.jts.index.strtree.STRtreereadIndex()Reads theSTRtreeobject from the file.
-
-
-
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 ExceptionReads theSTRtreeobject 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 ExceptionReads a single geomtry, using the info from the quadtree read inreadIndex().- Parameters:
position- the position of the geom to read.size- the size of the geom to read.- Returns:
- the read geometry.
- Throws:
Exception
-
close
public void close() throws IOExceptionCloses the filehandle.- Throws:
IOException
-
-