uk.me.parabola.imgfmt.app.lbl
Class LBLFileReader
java.lang.Object
uk.me.parabola.imgfmt.app.ImgFile
uk.me.parabola.imgfmt.app.lbl.LBLFileReader
- All Implemented Interfaces:
- java.io.Closeable
public class LBLFileReader
- extends ImgFile
The file that holds all the labels for the map.
There are also a number of sections that hold country,
region, city, etc. records.
The main focus of mkgmap is creating files, there are plenty of applications
that read and display the data, reading is implemented only to the
extent required to support creating the various auxiliary files etc.
- Author:
- Steve Ratcliffe
Methods inherited from class uk.me.parabola.imgfmt.app.ImgFile |
close, getHeader, getReader, getSize, getWriter, isWritable, position, position, setHeader, setReader, setWriter, sync |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LBLFileReader
public LBLFileReader(ImgChannel chan)
fetchLabel
public Label fetchLabel(int offset)
- Get a label by its offset in the label area.
- Parameters:
offset
- The offset in the label section. The offset 0 always
is an empty string.
- Returns:
- The label including its text.
getCities
public java.util.List<City> getCities()
- Get a list of cites. This is not cached here.
- Returns:
- A list of City objects.
getCountries
public java.util.List<Country> getCountries()
getRegions
public java.util.List<Region> getRegions()
fetchPoi
public POIRecord fetchPoi(int offset)
- Return POI information.
- Parameters:
offset
- The offset of the poi information in the header.
- Returns:
- Returns a poi record at the given offset. Returns null if
there isn't one at that offset (probably a bug if that does happen though...).