com.bbn.openmap.layer.rpf
Class RpfFileSections

java.lang.Object
  extended by com.bbn.openmap.layer.rpf.RpfFileSections

public class RpfFileSections
extends java.lang.Object

The class to use to get the locations of different sections of the RPF files. This class will find out the section locations, and then let you use it later to get to and read those sections.


Nested Class Summary
static class RpfFileSections.RpfCoverageSection
           
static class RpfFileSections.RpfLocationRecord
           
static class RpfFileSections.RpfLocationSection
           
 
Field Summary
static int COLOR_LOCATION_KEY
           
protected  boolean DEBUG_RPFDETAIL
           
static int FRAME_LOCATION_KEY
           
static int LOC_ATTRIBUTE_SECTION_SUBHEADER
           
static int LOC_ATTRIBUTE_SUBSECTION
           
static int LOC_BOUNDARIES
           
static int LOC_BOUNDARY_RECTANGLE_TABLE
           
static int LOC_BOUNDARY_SECTION_SUBHEADER
           
static int LOC_CLUT
           
static int LOC_COLOR_CONVERTER_SUBSECTION
           
static int LOC_COLOR_TABLE_INDEX_RECORD
           
static int LOC_COLOR_TABLE_SECTION_SUBHEADER
           
static int LOC_COLORGRAY_SECTION_SUBHEADER
           
static int LOC_COLORMAP_SUBSECTION
           
static int LOC_COMPRESSION
           
static int LOC_COMPRESSION_LOOKUP_SUBSECTION
           
static int LOC_COMPRESSION_PARAMETER_SUBSECTION
           
static int LOC_COMPRESSION_SECTION
           
static int LOC_COVERAGE
           
static int LOC_COVERAGE_SECTION
           
static int LOC_EXPLICIT_AREAL_TABLE
           
static int LOC_FRAME_FILE_INDEX_SUBHEADER
           
static int LOC_FRAME_FILE_INDEX_SUBSECTION
           
static int LOC_FRAMES
           
static int LOC_HEADER_SECTION
           
static int LOC_IMAGE
           
static int LOC_IMAGE_DESCR_SUBHEADER
           
static int LOC_IMAGE_DISPLAY_PARAM_SUBHEADER
           
static int LOC_LOCATION_SECTION
           
static int LOC_MASK_SUBSECTION
           
static int LOC_RELATED_IMAGE_SECTION_SUBHEADER
           
static int LOC_RELATED_IMAGE_SUBSECTION
           
static int LOC_REPLACE_UPDATE_SECTION_SUBHEADER
           
static int LOC_REPLACE_UPDATE_TABLE
           
static int LOC_SPATIAL_DATA_SUBSECTION
           
static int TOC_LOCATION_KEY
           
 
Constructor Summary
RpfFileSections()
           
RpfFileSections(BinaryFile binFile)
          Create the file sections object, and then go ahead and parse the file section section of the RPF file.
 
Method Summary
 RpfFileSections.RpfLocationRecord[] getLocations(int key)
           
 RpfFileSections.RpfLocationRecord getRpfLocationRecord(int locationRecordId)
          This function returns the location record, which provides the file location for a particular section.
 void parse(BinaryFile binFile)
           
 RpfAttributes parseAttributes(BinaryFile binFile)
          Read the location and information about the attribute section.
 java.awt.Color[] parseColorSection(BinaryFile binFile, RpfColortable colortable)
          This kicks back an array of OMColors, representing the colortable.
 RpfFileSections.RpfCoverageSection parseCoverageSection(BinaryFile binFile)
          Read the location and information about the coverage section.
protected  boolean parseLocationSection(BinaryFile binFile)
          This function returns the RpfLocationSection for the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOC_BOUNDARIES

public static final int LOC_BOUNDARIES
See Also:
Constant Field Values

LOC_FRAMES

public static final int LOC_FRAMES
See Also:
Constant Field Values

LOC_COVERAGE

public static final int LOC_COVERAGE
See Also:
Constant Field Values

LOC_COMPRESSION

public static final int LOC_COMPRESSION
See Also:
Constant Field Values

LOC_CLUT

public static final int LOC_CLUT
See Also:
Constant Field Values

LOC_IMAGE

public static final int LOC_IMAGE
See Also:
Constant Field Values

LOC_HEADER_SECTION

public static final int LOC_HEADER_SECTION
See Also:
Constant Field Values

LOC_LOCATION_SECTION

public static final int LOC_LOCATION_SECTION
See Also:
Constant Field Values

LOC_COVERAGE_SECTION

public static final int LOC_COVERAGE_SECTION
See Also:
Constant Field Values

LOC_COMPRESSION_SECTION

public static final int LOC_COMPRESSION_SECTION
See Also:
Constant Field Values

LOC_COMPRESSION_LOOKUP_SUBSECTION

public static final int LOC_COMPRESSION_LOOKUP_SUBSECTION
See Also:
Constant Field Values

LOC_COMPRESSION_PARAMETER_SUBSECTION

public static final int LOC_COMPRESSION_PARAMETER_SUBSECTION
See Also:
Constant Field Values

LOC_COLORGRAY_SECTION_SUBHEADER

public static final int LOC_COLORGRAY_SECTION_SUBHEADER
See Also:
Constant Field Values

LOC_COLORMAP_SUBSECTION

public static final int LOC_COLORMAP_SUBSECTION
See Also:
Constant Field Values

LOC_IMAGE_DESCR_SUBHEADER

public static final int LOC_IMAGE_DESCR_SUBHEADER
See Also:
Constant Field Values

LOC_IMAGE_DISPLAY_PARAM_SUBHEADER

public static final int LOC_IMAGE_DISPLAY_PARAM_SUBHEADER
See Also:
Constant Field Values

LOC_MASK_SUBSECTION

public static final int LOC_MASK_SUBSECTION
See Also:
Constant Field Values

LOC_COLOR_CONVERTER_SUBSECTION

public static final int LOC_COLOR_CONVERTER_SUBSECTION
See Also:
Constant Field Values

LOC_SPATIAL_DATA_SUBSECTION

public static final int LOC_SPATIAL_DATA_SUBSECTION
See Also:
Constant Field Values

LOC_ATTRIBUTE_SECTION_SUBHEADER

public static final int LOC_ATTRIBUTE_SECTION_SUBHEADER
See Also:
Constant Field Values

LOC_ATTRIBUTE_SUBSECTION

public static final int LOC_ATTRIBUTE_SUBSECTION
See Also:
Constant Field Values

LOC_EXPLICIT_AREAL_TABLE

public static final int LOC_EXPLICIT_AREAL_TABLE
See Also:
Constant Field Values

LOC_RELATED_IMAGE_SECTION_SUBHEADER

public static final int LOC_RELATED_IMAGE_SECTION_SUBHEADER
See Also:
Constant Field Values

LOC_RELATED_IMAGE_SUBSECTION

public static final int LOC_RELATED_IMAGE_SUBSECTION
See Also:
Constant Field Values

LOC_REPLACE_UPDATE_SECTION_SUBHEADER

public static final int LOC_REPLACE_UPDATE_SECTION_SUBHEADER
See Also:
Constant Field Values

LOC_REPLACE_UPDATE_TABLE

public static final int LOC_REPLACE_UPDATE_TABLE
See Also:
Constant Field Values

LOC_BOUNDARY_SECTION_SUBHEADER

public static final int LOC_BOUNDARY_SECTION_SUBHEADER
See Also:
Constant Field Values

LOC_BOUNDARY_RECTANGLE_TABLE

public static final int LOC_BOUNDARY_RECTANGLE_TABLE
See Also:
Constant Field Values

LOC_FRAME_FILE_INDEX_SUBHEADER

public static final int LOC_FRAME_FILE_INDEX_SUBHEADER
See Also:
Constant Field Values

LOC_FRAME_FILE_INDEX_SUBSECTION

public static final int LOC_FRAME_FILE_INDEX_SUBSECTION
See Also:
Constant Field Values

LOC_COLOR_TABLE_SECTION_SUBHEADER

public static final int LOC_COLOR_TABLE_SECTION_SUBHEADER
See Also:
Constant Field Values

LOC_COLOR_TABLE_INDEX_RECORD

public static final int LOC_COLOR_TABLE_INDEX_RECORD
See Also:
Constant Field Values

TOC_LOCATION_KEY

public static final int TOC_LOCATION_KEY
See Also:
Constant Field Values

FRAME_LOCATION_KEY

public static final int FRAME_LOCATION_KEY
See Also:
Constant Field Values

COLOR_LOCATION_KEY

public static final int COLOR_LOCATION_KEY
See Also:
Constant Field Values

DEBUG_RPFDETAIL

protected boolean DEBUG_RPFDETAIL
Constructor Detail

RpfFileSections

public RpfFileSections()

RpfFileSections

public RpfFileSections(BinaryFile binFile)
Create the file sections object, and then go ahead and parse the file section section of the RPF file. Assumes, the file pointer is in the right place, at the Rpfheader.locationSectionLocation.

Parameters:
binFile - the binaryFile of the RPF frame file.
Method Detail

parse

public void parse(BinaryFile binFile)

getLocations

public RpfFileSections.RpfLocationRecord[] getLocations(int key)

getRpfLocationRecord

public RpfFileSections.RpfLocationRecord getRpfLocationRecord(int locationRecordId)
This function returns the location record, which provides the file location for a particular section. The LOC ids are in this file.


parseLocationSection

protected boolean parseLocationSection(BinaryFile binFile)
This function returns the RpfLocationSection for the file. Since we don't really know the location of the location section yet, we really have to have the file pointer set to the right place. This function should be called right after the RpfHeader has been read.


parseCoverageSection

public RpfFileSections.RpfCoverageSection parseCoverageSection(BinaryFile binFile)
Read the location and information about the coverage section. The method will find out where to start reading from inside the file.


parseAttributes

public RpfAttributes parseAttributes(BinaryFile binFile)
Read the location and information about the attribute section. The method will find out where to start reading from inside the file.


parseColorSection

public java.awt.Color[] parseColorSection(BinaryFile binFile,
                                          RpfColortable colortable)
This kicks back an array of OMColors, representing the colortable. By going through the RpfFileSections function, the file locations for the color sections are taken care of, and the RpfColortable.parseColorLookUpTable function is called correctly.



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