org.geotools.data.shape
Class ShapeFileIndexer

java.lang.Object
  extended byorg.geotools.data.shape.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)
          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)
           
 void setIdxType(java.lang.String idxType)
           
 void setMax(int i)
           
 void setMin(int i)
           
 void setShapeFileName(java.lang.String string)
           
 void setSplit(short s)
           
 
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)
          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
Returns:
The number of indexed records (or zero)
Throws:
java.net.MalformedURLException
java.io.IOException
TreeException
LockTimeoutException
StoreException

setMax

public void setMax(int i)
Parameters:
i -

setMin

public void setMin(int i)
Parameters:
i -

setSplit

public void setSplit(short s)
Parameters:
s -

setShapeFileName

public void setShapeFileName(java.lang.String string)
Parameters:
string -

setIdxType

public void setIdxType(java.lang.String idxType)
Parameters:
idxType - The idxType to set.

setByteOrder

public void setByteOrder(java.lang.String byteOrder)
Parameters:
byteOrder - The byteOrder to set.


Copyright © GeoTools. All Rights Reserved.