Search in sources :

Example 11 with Relation

use of uk.me.parabola.mkgmap.reader.osm.Relation in project mkgmap by openstreetmap.

the class BoundaryElementSaver method convert.

public void convert(OsmConverter converter) {
    nodeMap = null;
    converter.setBoundingBox(getBoundingBox());
    ArrayList<Relation> relations = new ArrayList<>(relationMap.values());
    relationMap = null;
    for (int i = 0; i < relations.size(); i++) {
        converter.convertRelation(relations.get(i));
        relations.set(i, null);
    }
    relations = null;
    for (Way w : wayMap.values()) {
        if (isBoundary(w)) {
            converter.convertWay(w);
        }
    }
    wayMap = null;
    converter.end();
}
Also used : Relation(uk.me.parabola.mkgmap.reader.osm.Relation) ArrayList(java.util.ArrayList) Way(uk.me.parabola.mkgmap.reader.osm.Way)

Aggregations

Relation (uk.me.parabola.mkgmap.reader.osm.Relation)11 Element (uk.me.parabola.mkgmap.reader.osm.Element)7 Action (uk.me.parabola.mkgmap.osmstyle.actions.Action)5 GeneralRelation (uk.me.parabola.mkgmap.reader.osm.GeneralRelation)5 Way (uk.me.parabola.mkgmap.reader.osm.Way)5 Test (org.junit.Test)3 Coord (uk.me.parabola.imgfmt.app.Coord)3 Rule (uk.me.parabola.mkgmap.reader.osm.Rule)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 IdentityHashMap (java.util.IdentityHashMap)2 Map (java.util.Map)2 Node (uk.me.parabola.mkgmap.reader.osm.Node)2 RestrictionRelation (uk.me.parabola.mkgmap.reader.osm.RestrictionRelation)2 Area (java.awt.geom.Area)1 LinkedHashMap (java.util.LinkedHashMap)1 List (java.util.List)1 Entry (java.util.Map.Entry)1 CoordNode (uk.me.parabola.imgfmt.app.CoordNode)1 MapElement (uk.me.parabola.mkgmap.general.MapElement)1