|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.imgfmt.app.map.Map
public class Map
Holder for a complete map. A map is made up of several files which include at least the TRE, LBL and RGN files. It is the interface for all information about the whole map, such as the point overviews etc. Subdivision will hold the map elements.
Needless to say, it has nothing to do with java.util.Map and given how it has turned out, with all reading functionality in MapReader it would have been better named MapWriter.
Method Summary | |
---|---|
void |
addCopyright(java.lang.String str)
Add a copyright message to the map. |
void |
addInfo(java.lang.String info)
There is an area after the TRE header and before its data starts that can be used to save any old junk it seems. |
void |
addMapObject(MapObject item)
|
protected void |
addNet()
|
protected void |
addNod()
|
void |
addPointOverview(PointOverview ov)
|
void |
addPolygonOverview(PolygonOverview ov)
|
void |
addPolylineOverview(PolylineOverview ov)
|
void |
close()
Close this map by closing all the constituent files. |
void |
config(EnhancedProperties props)
Used to mark that a reader needs to be configured by command line properties. |
static Map |
createMap(java.lang.String mapname,
java.lang.String outputdir,
FileSystemParam params,
java.lang.String mapnumber)
Create a complete map. |
Subdivision |
createSubdivision(Subdivision parent,
Area area,
Zoom zoom)
Create a subdivision that is beneath the top level. |
Zoom |
createZoom(int level,
int bits)
Create a new zoom level. |
java.lang.String |
getFilename()
|
LBLFile |
getLblFile()
|
NETFile |
getNetFile()
|
NODFile |
getNodFile()
|
RGNFile |
getRgnFile()
|
TREFile |
getTreFile()
|
void |
setBounds(Area area)
Set the area that the map covers. |
void |
setLabelCharset(java.lang.String desc,
boolean forceUpper)
|
void |
setLabelCodePage(int cp)
|
void |
setPoiDisplayFlags(int flags)
Set the point of interest flags. |
Subdivision |
topLevelSubdivision(Area area,
Zoom zoom)
Create the top level division. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Map createMap(java.lang.String mapname, java.lang.String outputdir, FileSystemParam params, java.lang.String mapnumber) throws FileExistsException, FileNotWritableException
mapname
- The name of the map. This is an 8 digit number as a
string.params
- Parameters that describe the file system that the map
will be created in.
FileExistsException
- If the file already exists and we do not
want to overwrite it.
FileNotWritableException
- If the file cannot
be opened for write.public void config(EnhancedProperties props)
Configurable
config
in interface Configurable
props
- The input properties.protected void addNet() throws FileExistsException
FileExistsException
protected void addNod() throws FileExistsException
FileExistsException
public void setBounds(Area area)
area
- The outer bounds of the map.public void addCopyright(java.lang.String str)
str
- the copyright message. The second (last?) one set
gets shown when the device starts (sometimes?).public void addInfo(java.lang.String info)
info
- Any string.public Zoom createZoom(int level, int bits)
level
- The zoom level, and integer between 0 and 15. Its
like a logical zoom level.bits
- The number of bits per coordinate, a measure of
the actual amount of detail that will be in the level. So this
is like a physical zoom level.
public Subdivision topLevelSubdivision(Area area, Zoom zoom)
area
- The whole map area.zoom
- The zoom level that you want the top level to be
at. Its going to be at least level 1.
public Subdivision createSubdivision(Subdivision parent, Area area, Zoom zoom)
Note that you cannot create these all up front. You must create it, fill it will its map elements and then create the next one. You must also start at the top level and work down.
parent
- The parent subdivision.area
- The area of the new child subdiv.zoom
- The zoom level of the child.
public void addPointOverview(PointOverview ov)
public void addPolylineOverview(PolylineOverview ov)
public void addPolygonOverview(PolygonOverview ov)
public void setPoiDisplayFlags(int flags)
flags
- The POI flags.public void addMapObject(MapObject item)
public void setLabelCodePage(int cp)
public void setLabelCharset(java.lang.String desc, boolean forceUpper)
public void close()
public java.lang.String getFilename()
public RGNFile getRgnFile()
getRgnFile
in interface InternalFiles
public LBLFile getLblFile()
getLblFile
in interface InternalFiles
public TREFile getTreFile()
getTreFile
in interface InternalFiles
public NETFile getNetFile()
getNetFile
in interface InternalFiles
public NODFile getNodFile()
getNodFile
in interface InternalFiles
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |