All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.zuq.osm.parser.model.OSM Maven / Gradle / Ivy

package br.zuq.osm.parser.model;

import java.util.HashSet;
import java.util.Set;

/**
 *
 * @author Willy Tiengo
 */
public class OSM {

    private Set nodes;
    private Set ways;
    private Set relations;

    public OSM() {
        nodes = new HashSet();
        ways = new HashSet();
        relations = new HashSet();
    }

    public OSM(Set nodes, Set ways,
            Set relations) {
        this.nodes = nodes;
        this.ways = ways;
        this.relations = relations;
    }

    public Set getNodes() {
        return nodes;
    }

    public Set getRelations() {
        return relations;
    }

    public Set getWays() {
        return ways;
    }

    public Way getWay(String id) {
        for (Way way : ways) {
            if (way.id.equals(id)) {
                return way;
            }
        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy