Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.layer.vpf
Class DcwSpatialIndex

    java.lang.Object
      com.bbn.openmap.layer.vpf.DcwSpatialIndex

public class DcwSpatialIndex
extends java.lang.Object

Read a VPF spatial index file. (VPF *.?si files)

Nested Class Summary
`static class` | `DcwSpatialIndex.PrimitiveRecord` A class that wraps an entry in the spatial index.

Constructor Summary
`DcwSpatialIndex(java.lang.String filename, boolean border)` Construct an index for a filename.

Method Summary
`void` | `close()` Closes the files associated with the spatial index
`float` | `getBoundingX1()` Returns the west boundary
`float` | `getBoundingX2()` Returns the east boundary
`float` | `getBoundingY1()` Returns the south boundary
`float` | `getBoundingY2()` Returns the north boundary
`int` | `getNodesInTree()` Returns the number of nodes in the spatial index
`int` | `getNumberOfPrimitives()` Returns the number of primitives included in the spatial index
`int` | `getPrimitiveCount(int node)` Returns the number of primitives listed in the node
`int` | `getPrimitiveOffset(int node)` Returns the relative byte offset of the node primitive list from the header
`DcwSpatialIndex.PrimitiveRecord[]` | `getPrimitiveRecords(int node)` Returns an array of primitive records

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DcwSpatialIndex

    public DcwSpatialIndex(java.lang.String filename,
                           boolean border)
                    throws FormatException

  Construct an index for a filename. Prints a bunch of information about what it read.

Method Detail

### getNumberOfPrimitives

    public int getNumberOfPrimitives()

  Returns the number of primitives included in the spatial index

  Returns:
    the number of primitives included in the spatial index

### getBoundingX1

    public float getBoundingX1()

  Returns the west boundary

  Returns:
    the west boundary

### getBoundingX2

    public float getBoundingX2()

  Returns the east boundary

  Returns:
    the east boundary

### getBoundingY1

    public float getBoundingY1()

  Returns the south boundary

  Returns:
    the south boundary

### getBoundingY2

    public float getBoundingY2()

  Returns the north boundary

  Returns:
    the north boundary

### getNodesInTree

    public int getNodesInTree()

  Returns the number of nodes in the spatial index

  Returns:
    the number of nodes in the spatial index

### getPrimitiveCount

    public int getPrimitiveCount(int node)

  Returns the number of primitives listed in the node

  Parameters:
    `node` - the node index
  Returns:
    the number of primitives listed in the node

### getPrimitiveOffset

    public int getPrimitiveOffset(int node)

  Returns the relative byte offset of the node primitive list from the header

  Parameters:
    `node` - the node index
  Returns:
    the byte offset of the record in the file

### getPrimitiveRecords

    public DcwSpatialIndex.PrimitiveRecord[] getPrimitiveRecords(int node)
                                                          throws FormatException

  Returns an array of primitive records

  Parameters:
    `node` - the node index
  Returns:
    the array of primitive records
  Throws:
    `FormatException` - an error was encountered reading the file

### close

    public void close()

  Closes the files associated with the spatial index

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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