com.bbn.openmap.layer.vpf
Class AreaTable
java.lang.Object
com.bbn.openmap.layer.vpf.DcwRecordFile
com.bbn.openmap.layer.vpf.PrimitiveTable
com.bbn.openmap.layer.vpf.AreaTable
public class AreaTable
- extends PrimitiveTable
Read VPF format edge, face, and ring tables to generate filled polygon
graphics for OpenMap.
Fields inherited from class com.bbn.openmap.layer.vpf.DcwRecordFile |
byteorder, columnInfo, documentationFileName, filename, ID_COLUMN_NAME, inputFile, MSBFirst, recordLength, tableDescription, tablename, vli |
Method Summary |
void |
close()
Close the files associated with this tile. |
int |
computeEdgePoints(java.util.List<java.lang.Object> facevec,
java.util.List<CoordFloatString> allLLPoints)
Computes the full set of points that determine the edge of the area. |
OMGraphic |
drawFeature(VPFFeatureWarehouse warehouse,
double dpplat,
double dpplon,
LatLonPoint ll1,
LatLonPoint ll2,
java.util.List<java.lang.Object> area,
java.lang.String featureType,
int primID)
Use the warehouse to create a graphic from a feature in the AreaTable. |
void |
drawTile(VPFGraphicWarehouse warehouse,
double dpplat,
double dpplon,
LatLonPoint ll1,
LatLonPoint ll2)
Parse the area records for this tile, calling warehouse.createArea once
for each record. |
Methods inherited from class com.bbn.openmap.layer.vpf.DcwRecordFile |
finalize, finishInitialization, getColumnCount, getColumnInfo, getColumnName, getDescription, getDocumentationFilename, getRecordCount, getRecordLength, getRow, getRow, getTableFile, getTableName, getTilingAdapter, getTilingAdapter, getTilingAdapter, lookupSchema, lookupSchema, main, parseAllRowsAndPrintSome, parseRow, parseRow, parseSomeRowsAndPrint, printSchema, reopen, seekToRow, whatColumn |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AreaTable
public AreaTable(CoverageTable cov,
EdgeTable edg,
TileDirectory tile)
throws FormatException
- Construct an AreaTable for a tile.
- Parameters:
cov
- the coverage table that is our "parent"edg
- the edge table for the same tile as us (can be null)tile
- the tile to parse
- Throws:
FormatException
- if something goes wrong reading the area
close
public void close()
- Close the files associated with this tile. If an edgetable was passed to
the constructor, that table is NOT closed. If this instance created its
own edgetable, it IS closed.
- Overrides:
close
in class DcwRecordFile
computeEdgePoints
public int computeEdgePoints(java.util.List<java.lang.Object> facevec,
java.util.List<CoordFloatString> allLLPoints)
throws FormatException
- Computes the full set of points that determine the edge of the area.
- Parameters:
facevec
- a row from the VPF face table for this areaallLLPoints
- a List that gets modified to contain CoordFloatString
objects defining the area. CoordFloatString objects with a
negative element count (e.g. -3) contain the absolute value of the
count (e.g. 3), but must be traversed in reverse order.
- Returns:
- the total number of points that define the polygon
- Throws:
FormatException
- may throw FormatExceptions
drawTile
public void drawTile(VPFGraphicWarehouse warehouse,
double dpplat,
double dpplon,
LatLonPoint ll1,
LatLonPoint ll2)
- Parse the area records for this tile, calling warehouse.createArea once
for each record.
- Specified by:
drawTile
in class PrimitiveTable
- Parameters:
warehouse
- the warehouse used for createArea calls (must not be
null)dpplat
- threshold for latitude thinning (passed to warehouse)dpplon
- threshold for longitude thinngin (passed to warehouse)ll1
- upperleft of selection region (passed to warehouse)ll2
- lowerright of selection region (passed to warehouse)- See Also:
VPFGraphicWarehouse.createArea(com.bbn.openmap.layer.vpf.CoverageTable, com.bbn.openmap.layer.vpf.AreaTable, java.util.List, com.bbn.openmap.proj.coords.LatLonPoint, com.bbn.openmap.proj.coords.LatLonPoint, double, double)
drawFeature
public OMGraphic drawFeature(VPFFeatureWarehouse warehouse,
double dpplat,
double dpplon,
LatLonPoint ll1,
LatLonPoint ll2,
java.util.List<java.lang.Object> area,
java.lang.String featureType,
int primID)
- Use the warehouse to create a graphic from a feature in the AreaTable.
- Specified by:
drawFeature
in class PrimitiveTable
- Parameters:
warehouse
- the warehouse used for createArea calls (must not be
null)dpplat
- threshold for latitude thinning (passed to warehouse)dpplon
- threshold for longitude thinning (passed to warehouse)ll1
- upperleft of selection region (passed to warehouse)ll2
- lowerright of selection region (passed to warehouse)area
- a List containing the AreaTable row contents.featureType
- the string representing the feature type, in case the
warehouse wants to do some intelligent rendering.primID
- the primitive ID of the feature, in order to gather attributes if
necessary.- See Also:
VPFGraphicWarehouse.createEdge(com.bbn.openmap.layer.vpf.CoverageTable, com.bbn.openmap.layer.vpf.EdgeTable, java.util.List, com.bbn.openmap.proj.coords.LatLonPoint, com.bbn.openmap.proj.coords.LatLonPoint, double, double, com.bbn.openmap.layer.vpf.CoordFloatString)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details