org.geotools.data.shapefile.indexed
Class ShapeFileIndexer

java.lang.Object
  extended byorg.geotools.data.shapefile.indexed.ShapeFileIndexer

public class ShapeFileIndexer
extends java.lang.Object

Utility class for Shapefile spatial indexing

Author:
Tommaso Nolli

Field Summary
static java.lang.String QUADTREE
           
static java.lang.String RTREE
           
 
Constructor Summary
ShapeFileIndexer()
           
 
Method Summary
 int index(boolean verbose, Lock lock)
          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 setIdxType(java.lang.String idxType)
          DOCUMENT ME!
 void setMax(int i)
          DOCUMENT ME!
 void setMin(int i)
          DOCUMENT ME!
 void setShapeFileName(java.lang.String string)
          DOCUMENT ME!
 void setSplit(short s)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RTREE

public static final java.lang.String RTREE
See Also:
Constant Field Values

QUADTREE

public static final java.lang.String QUADTREE
See Also:
Constant Field Values
Constructor Detail

ShapeFileIndexer

public ShapeFileIndexer()
Method Detail

main

public static void main(java.lang.String[] args)

index

public int index(boolean verbose,
                 Lock lock)
          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
lock - 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)
DOCUMENT ME!

Parameters:
i -

setMin

public void setMin(int i)
DOCUMENT ME!

Parameters:
i -

setSplit

public void setSplit(short s)
DOCUMENT ME!

Parameters:
s -

setShapeFileName

public void setShapeFileName(java.lang.String string)
DOCUMENT ME!

Parameters:
string -

setIdxType

public void setIdxType(java.lang.String idxType)
DOCUMENT ME!

Parameters:
idxType - The idxType to set.

setByteOrder

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

Parameters:
byteOrder - The byteOrder to set.


Copyright © GeoTools. All Rights Reserved.