org.geotools.data.shapefile.indexed
Class ShapeFileIndexer

java.lang.Object
  extended by org.geotools.data.shapefile.indexed.ShapeFileIndexer
All Implemented Interfaces:
FileReader, FileWriter

public class ShapeFileIndexer
extends java.lang.Object
implements FileWriter

Utility class for Shapefile spatial indexing

Author:
Tommaso Nolli

Constructor Summary
ShapeFileIndexer()
           
 
Method Summary
 java.lang.String id()
          An id for the writer.
 int index(boolean verbose, org.opengis.util.ProgressListener listener)
          Index the shapefile denoted by setShapeFileName(String fileName) If when a thread starts, another thread is indexing the same file, this thread will wait that the first thread ends indexing; in this case zero is reurned as result of the indexing process.
static void main(java.lang.String[] args)
           
 void setByteOrder(java.lang.String byteOrder)
          DOCUMENT ME!
 void setMax(int i)
          For quad tree this is the max depth.
 void setShapeFileName(ShpFiles shpFiles)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeFileIndexer

public ShapeFileIndexer()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException

index

public int index(boolean verbose,
                 org.opengis.util.ProgressListener listener)
          throws java.net.MalformedURLException,
                 java.io.IOException,
                 TreeException,
                 StoreException,
                 LockTimeoutException
Index the shapefile denoted by setShapeFileName(String fileName) If when a thread starts, another thread is indexing the same file, this thread will wait that the first thread ends indexing; in this case zero is reurned as result of the indexing process.

Parameters:
verbose - enable/disable printing of dots every 500 indexed records
listener - DOCUMENT ME!
Returns:
The number of indexed records (or zero)
Throws:
java.net.MalformedURLException
java.io.IOException
TreeException
StoreException - DOCUMENT ME!
LockTimeoutException

setMax

public void setMax(int i)
For quad tree this is the max depth. I don't know what it is for RTree

Parameters:
i -

setShapeFileName

public void setShapeFileName(ShpFiles shpFiles)
DOCUMENT ME!

Parameters:
shpFiles -

setByteOrder

public void setByteOrder(java.lang.String byteOrder)
DOCUMENT ME!

Parameters:
byteOrder - The byteOrder to set.

id

public java.lang.String id()
Description copied from interface: FileWriter
An id for the writer. This is only used for debugging.

Specified by:
id in interface FileReader
Specified by:
id in interface FileWriter
Returns:
id for the writer.


Copyright © 1996-2010 Geotools. All Rights Reserved.