|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.free.garminimg.ImgFilesBag
public class ImgFilesBag
The main entry point of the library. Manages the list of .img mapFiles.
Instances of this class are supposed to be fully thread safe.
Constructor Summary | |
---|---|
ImgFilesBag()
|
Method Summary | |
---|---|
void |
addDirectory(java.io.File directory)
Add every .img mapFiles of the given directory. |
void |
addFile(java.io.File file)
Add a single .img file to the repository. |
void |
clear()
Remove every maps. |
org.free.garminimg.ProductFile.MapDesc |
getMapDescription(ImgFileBag imgFileBag)
|
int |
getMaxLatitude()
|
int |
getMaxLongitude()
|
int |
getMinLatitude()
|
int |
getMinLongitude()
|
void |
printDebug(java.io.PrintStream out)
|
void |
readMap(int minLong,
int maxLong,
int minLat,
int maxLat,
int resolution,
int objectKindFilter,
java.util.BitSet objectTypeFilter,
MapListener listener)
Read the map for the given coordinates. |
void |
readMapForDrawing(int minLong,
int maxLong,
int minLat,
int maxLat,
int resolution,
int objectKindFilter,
MapListener listener)
Read the map for the given coordinates. This method will try to have the objects sorted in an order that is suitable for drawing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImgFilesBag()
Method Detail |
---|
public void addFile(java.io.File file) throws java.io.IOException
java.io.IOException
public void addDirectory(java.io.File directory) throws java.io.IOException
java.io.IOException
public void clear() throws java.io.IOException
java.io.IOException
public void readMapForDrawing(int minLong, int maxLong, int minLat, int maxLat, int resolution, int objectKindFilter, MapListener listener) throws java.io.IOException
resolution
- The resolution in "Garmin coordinate" units of the details we want. The smaller, the higher the details will be. If negative gets all the details.listener
- A visitor that will be called for every map objects.objectKindFilter
- Bitset of what kind of object to concider (see ObjectKind for possible values).
java.io.IOException
readMap(int,int,int,int,int,int,BitSet,MapListener)
public void readMap(int minLong, int maxLong, int minLat, int maxLat, int resolution, int objectKindFilter, java.util.BitSet objectTypeFilter, MapListener listener) throws java.io.IOException
resolution
- The resolution in "Garmin coordinate" units of the details we want. The smaller, the higher the details will be. If negative gets all the details.listener
- A visitor that will be called for every map objects.objectKindFilter
- Bitset of what kind of object to concider (see ObjectKind for possible values).objectTypeFilter
- If not null, allows to filter by type. Must be used with a objectKindFilter allowing only one object kind.
java.io.IOException
MapListener
,
ObjectKind
public void printDebug(java.io.PrintStream out) throws java.io.IOException
java.io.IOException
public int getMinLongitude() throws java.io.IOException
java.io.IOException
public int getMaxLongitude() throws java.io.IOException
java.io.IOException
public int getMinLatitude() throws java.io.IOException
java.io.IOException
public int getMaxLatitude() throws java.io.IOException
java.io.IOException
public org.free.garminimg.ProductFile.MapDesc getMapDescription(ImgFileBag imgFileBag)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |