use of uk.me.parabola.imgfmt.app.trergn.Zoom in project mkgmap by openstreetmap.
the class OverviewBuilder method readLines.
/**
* Read the lines from the .img file and add them to the overview map.
* We read from the least detailed level (apart from the empty one).
*
* @param mapReader Map reader on the detailed .img file.
*/
private void readLines(MapReader mapReader) {
Zoom[] levels = mapReader.getLevels();
for (int l = 1; l < levels.length; l++) {
int min = levels[l].getLevel();
int res = levels[l].getResolution();
List<Polyline> lineList = mapReader.linesForLevel(min);
// System.out.println(lineList.size() + " lines in lowest resolution " + levels[1].getResolution());
for (Polyline line : lineList) {
if (log.isDebugEnabled())
log.debug("got line", line);
MapLine ml = new MapLine();
List<Coord> points = line.getPoints();
if (log.isDebugEnabled())
log.debug("line point list", points);
if (points.size() < 2)
continue;
ml.setType(line.getType());
if (line.getLabel() != null)
ml.setName(line.getLabel().getText());
ml.setMaxResolution(res);
ml.setMinResolution(res);
ml.setPoints(points);
overviewSource.addLine(ml);
}
}
}
Aggregations