Search in sources :

Example 1 with LBLFileReader

use of uk.me.parabola.imgfmt.app.lbl.LBLFileReader in project mkgmap by openstreetmap.

the class StructureTest method init.

/**
 * Read in the file and open all the sections, leave references to them
 * in fields so that the other tests can check things.
 */
@BeforeClass
public static void init() throws FileNotFoundException {
    TestUtils.deleteOutputFiles();
    Main.mainNoSystemExit(Args.TEST_STYLE_ARG, Args.TEST_RESOURCE_OSM + "uk-test-1.osm.gz");
    fs = ImgFS.openFs(Args.DEF_MAP_FILENAME);
    ImgChannel tre = fs.open(Args.DEF_MAP_ID + ".TRE", "r");
    treFile = new TREFileReader(tre);
    ImgChannel lbl = fs.open(Args.DEF_MAP_ID + ".LBL", "r");
    lblFile = new LBLFileReader(lbl);
    ImgChannel rgn = fs.open(Args.DEF_MAP_ID + ".RGN", "r");
    rgnFile = new RGNFileReader(rgn);
}
Also used : ImgChannel(uk.me.parabola.imgfmt.fs.ImgChannel) TREFileReader(uk.me.parabola.imgfmt.app.trergn.TREFileReader) RGNFileReader(uk.me.parabola.imgfmt.app.trergn.RGNFileReader) LBLFileReader(uk.me.parabola.imgfmt.app.lbl.LBLFileReader) BeforeClass(org.junit.BeforeClass)

Example 2 with LBLFileReader

use of uk.me.parabola.imgfmt.app.lbl.LBLFileReader in project mkgmap by openstreetmap.

the class FileInfo method lblInfo.

private static void lblInfo(ImgChannel chan, FileInfo info) {
    try (LBLFileReader lblFile = new LBLFileReader(chan)) {
        info.setCodePage(lblFile.getCodePage());
        info.setSortOrderId(lblFile.getSortOrderId());
    }
}
Also used : LBLFileReader(uk.me.parabola.imgfmt.app.lbl.LBLFileReader)

Aggregations

LBLFileReader (uk.me.parabola.imgfmt.app.lbl.LBLFileReader)2 BeforeClass (org.junit.BeforeClass)1 RGNFileReader (uk.me.parabola.imgfmt.app.trergn.RGNFileReader)1 TREFileReader (uk.me.parabola.imgfmt.app.trergn.TREFileReader)1 ImgChannel (uk.me.parabola.imgfmt.fs.ImgChannel)1