use of uk.me.parabola.imgfmt.app.ImgFileReader in project mkgmap by openstreetmap.
the class SrtFileReader method readSrt7.
private void readSrt7() {
ImgFileReader reader = getReader();
reader.position(tableHeader.getPosition() + srt7.getPosition());
int block = 1;
for (int i = 0; i < srt7.getNumItems(); i++) {
int val = reader.getInt();
if (val >= 0)
offsetToBlock.put(val / srt8.getItemSize(), block);
block++;
}
}
use of uk.me.parabola.imgfmt.app.ImgFileReader in project mkgmap by openstreetmap.
the class SrtFileReader method readSrt1.
private void readSrt1() {
ImgFileReader reader = getReader();
reader.position(header.getHeaderLength());
description.readSectionInfo(reader, false);
tableHeader.readSectionInfo(reader, false);
}
use of uk.me.parabola.imgfmt.app.ImgFileReader in project mkgmap by openstreetmap.
the class SrtFileReader method readExpansions.
private void readExpansions() {
ImgFileReader reader = getReader();
int reclen = srt5.getItemSize();
reader.position(tableHeader.getPosition() + srt5.getPosition());
List<CodePosition> expansionList = new ArrayList<>(srt5.getNumItems());
if (countExp != srt5.getNumItems()) {
throw new RuntimeException("unexpected number of expansions " + srt5.getNumItems() + " expected: " + countExp);
}
for (int i = 0; i < srt5.getNumItems(); i++) {
CodePosition cp = readCharPosition(reclen);
expansionList.add(cp);
}
sort.setExpansions(expansionList);
}
Aggregations