com.bbn.openmap.layer.shape
Class ShapeIndex

java.lang.Object
  extended by com.bbn.openmap.dataAccess.shape.ShapeUtils
      extended by com.bbn.openmap.layer.shape.ShapeIndex
All Implemented Interfaces:
ShapeConstants

public class ShapeIndex
extends ShapeUtils

A class representing a shape index file.

Currently this class has limited capabilities. It can dump the index information to stdout. This is useful for verification of a spatial index.

 
 Usage
 
 
 java com.bbn.openmap.shape.ShapeIndex file.shx
 
 
 
Dumps spatial index information, excluding bounding boxes to stdout. Useful for comparing to a shape index.

Version:
$Revision: 1.6 $ $Date: 2005/12/09 21:09:10 $
Author:
Tom Mitchell
See Also:
SpatialIndex

Field Summary
static int SHAPE_INDEX_RECORD_LENGTH
          Size of the shape index record, value is 8 bytes.
protected  java.io.RandomAccessFile shx
          The shape index file.
 
Fields inherited from interface com.bbn.openmap.dataAccess.shape.ShapeConstants
DBF_ATTRIBUTE, DBF_AUTOINCREMENT, DBF_BINARY, DBF_CHARACTER, DBF_DATE, DBF_DOUBLE, DBF_FLOAT, DBF_LOGICAL, DBF_LONG, DBF_MEMO, DBF_NUMERIC, DBF_OLE, DBF_TIMESTAMP, DBF_TYPE_AUTOINCREMENT, DBF_TYPE_BINARY, DBF_TYPE_CHARACTER, DBF_TYPE_DATE, DBF_TYPE_DOUBLE, DBF_TYPE_FLOAT, DBF_TYPE_LOGICAL, DBF_TYPE_LONG, DBF_TYPE_MEMO, DBF_TYPE_NUMERIC, DBF_TYPE_OLE, DBF_TYPE_TIMESTAMP, PARAM_DBF, PARAM_SHP, PARAM_SHX, SHAPE_BOUNDS_ATTRIBUTE, SHAPE_DBF_DASHPATTERN, SHAPE_DBF_DASHPHASE, SHAPE_DBF_DESCRIPTION, SHAPE_DBF_FILLCOLOR, SHAPE_DBF_INFO_ATTRIBUTE, SHAPE_DBF_LINECOLOR, SHAPE_DBF_LINEWIDTH, SHAPE_DBF_SELECTCOLOR, SHAPE_FILE_HEADER_LENGTH, SHAPE_FILE_RECORD_HEADER_LENGTH, SHAPE_INDEX_ATTRIBUTE, SHAPE_MAX_MEASURE_ATTRIBUTE, SHAPE_MAX_Z_ATTRIBUTE, SHAPE_MEASURE_ATTRIBUTE, SHAPE_MIN_MEASURE_ATTRIBUTE, SHAPE_MIN_Z_ATTRIBUTE, SHAPE_TYPE_ARC, SHAPE_TYPE_MULTIPATCH, SHAPE_TYPE_MULTIPOINT, SHAPE_TYPE_MULTIPOINTM, SHAPE_TYPE_MULTIPOINTZ, SHAPE_TYPE_NULL, SHAPE_TYPE_POINT, SHAPE_TYPE_POINTM, SHAPE_TYPE_POINTZ, SHAPE_TYPE_POLYGON, SHAPE_TYPE_POLYGONM, SHAPE_TYPE_POLYGONZ, SHAPE_TYPE_POLYLINE, SHAPE_TYPE_POLYLINEM, SHAPE_TYPE_POLYLINEZ, SHAPE_Z_ATTRIBUTE
 
Constructor Summary
ShapeIndex(java.lang.String shxFilename)
          Opens a shape index file for reading.
 
Method Summary
 void dumpIndex()
          Displays the contents of this index.
static void main(java.lang.String[] args)
          The driver for the command line interface.
 
Methods inherited from class com.bbn.openmap.dataAccess.shape.ShapeUtils
getStringForType, readBEInt, readBox, readLEDouble, readLEInt, readLEInt, readLELong, readPoint, writeBEInt, writeBox, writeLEDouble, writeLEInt, writeLELong, writePoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHAPE_INDEX_RECORD_LENGTH

public static final int SHAPE_INDEX_RECORD_LENGTH
Size of the shape index record, value is 8 bytes.

See Also:
Constant Field Values

shx

protected java.io.RandomAccessFile shx
The shape index file.

Constructor Detail

ShapeIndex

public ShapeIndex(java.lang.String shxFilename)
           throws java.io.IOException
Opens a shape index file for reading.

Parameters:
shxFilename - the name of the spatial index file
Throws:
java.io.IOException - if something goes wrong opening the file
Method Detail

dumpIndex

public void dumpIndex()
               throws java.io.IOException
Displays the contents of this index.

Throws:
java.io.IOException - if something goes wrong reading the file

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
The driver for the command line interface. Reads the command line arguments and executes appropriate calls.

See the file documentation for usage.

Parameters:
args - the command line arguments
Throws:
java.io.IOException - if something goes wrong reading or writing the file


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details