org.free.garminimg
Class TreSubFile
java.lang.Object
org.free.garminimg.ImgSubFile
org.free.garminimg.TreSubFile
public class TreSubFile
- extends ImgSubFile
A sub-file with .tre extension. Contains the information about the sub-divisions
and the boundary of the map.
Constructor Summary |
TreSubFile(java.lang.String filename,
java.lang.String filetype,
int fileSize,
int blocSize,
ImgFileBag fileBag)
|
Method Summary |
int |
convertMapUnits(int level,
int value,
int additionalAccuracy)
|
int |
getEastBoundary()
|
long |
getFullSurface()
|
boolean[] |
getInheriteds()
|
long |
getLevelsLength(ImgSubFile.FileContext context)
|
long |
getLevelsPos(ImgSubFile.FileContext context)
|
int |
getMaxLevel()
|
int |
getMaxPointLevel(int type,
int subType)
|
int |
getMaxPolyLevel(int type,
boolean line)
|
int |
getMinLevel()
|
int |
getNbSubDivisions(int level)
|
int |
getNorthBoundary()
|
int |
getResolution(int level)
|
int |
getSouthBoundary()
|
SubDivision |
getSubDivision(int i)
|
int |
getWestBoundary()
|
int |
guessLowestNbBits()
|
void |
halveResolution(int level)
|
void |
init()
|
boolean |
matchesCoordinate(int longitude,
int latitude)
|
boolean |
matchesCoordinates(int minLong,
int maxLong,
int minLat,
int maxLat)
|
void |
printDebug(java.io.PrintStream out)
|
void |
readMap(int minLong,
int maxLong,
int minLat,
int maxLat,
int resolution,
int objectKindFilter,
java.util.BitSet objectTypeFilter,
org.free.garminimg.RgnSubFile rgn,
org.free.garminimg.LblSubFile lbl,
org.free.garminimg.NetSubFile net,
MapListener listener)
|
void |
registerRegionByIndex(int index,
SubDivision division)
|
Methods inherited from class org.free.garminimg.ImgSubFile |
addBloc, create, debugPrintHex, getAbsolutePosition, getFilename, getFileSize, getFiletype, getHeaderLength, getLocked, getLockedPos, getNextReadPos, readByte, readInt16, readInt24, readString, readUInt16, readUInt24, readUInt32, seek, superInit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreSubFile
public TreSubFile(java.lang.String filename,
java.lang.String filetype,
int fileSize,
int blocSize,
ImgFileBag fileBag)
init
public void init()
throws java.io.IOException
- Specified by:
init
in class ImgSubFile
- Throws:
java.io.IOException
getLevelsPos
public long getLevelsPos(ImgSubFile.FileContext context)
throws java.io.IOException
- Throws:
java.io.IOException
getLevelsLength
public long getLevelsLength(ImgSubFile.FileContext context)
throws java.io.IOException
- Throws:
java.io.IOException
convertMapUnits
public int convertMapUnits(int level,
int value,
int additionalAccuracy)
printDebug
public void printDebug(java.io.PrintStream out)
throws java.io.IOException
- Overrides:
printDebug
in class ImgSubFile
- Throws:
java.io.IOException
getResolution
public int getResolution(int level)
halveResolution
public void halveResolution(int level)
throws java.io.IOException
- Throws:
java.io.IOException
getMaxLevel
public int getMaxLevel()
throws java.io.IOException
- Throws:
java.io.IOException
getMinLevel
public int getMinLevel()
throws java.io.IOException
- Throws:
java.io.IOException
registerRegionByIndex
public void registerRegionByIndex(int index,
SubDivision division)
getSubDivision
public SubDivision getSubDivision(int i)
throws java.io.IOException
- Throws:
java.io.IOException
matchesCoordinates
public boolean matchesCoordinates(int minLong,
int maxLong,
int minLat,
int maxLat)
matchesCoordinate
public boolean matchesCoordinate(int longitude,
int latitude)
readMap
public void readMap(int minLong,
int maxLong,
int minLat,
int maxLat,
int resolution,
int objectKindFilter,
java.util.BitSet objectTypeFilter,
org.free.garminimg.RgnSubFile rgn,
org.free.garminimg.LblSubFile lbl,
org.free.garminimg.NetSubFile net,
MapListener listener)
throws java.io.IOException
- Throws:
java.io.IOException
getMaxPointLevel
public int getMaxPointLevel(int type,
int subType)
getMaxPolyLevel
public int getMaxPolyLevel(int type,
boolean line)
getFullSurface
public long getFullSurface()
getEastBoundary
public int getEastBoundary()
getNorthBoundary
public int getNorthBoundary()
getSouthBoundary
public int getSouthBoundary()
getWestBoundary
public int getWestBoundary()
guessLowestNbBits
public int guessLowestNbBits()
getInheriteds
public boolean[] getInheriteds()
throws java.io.IOException
- Throws:
java.io.IOException
getNbSubDivisions
public int getNbSubDivisions(int level)
- Parameters:
level
-
- Returns:
- The number of sub-divisions for the given level.
Copyright © 2008. All Rights Reserved.