OpenStreetMap osmParser Example

Just a simple OpenStreetMap Example for the osmParser Library.

import br.zuq.osm.parser.OSMParser;
import br.zuq.osm.parser.model.OSM;
import br.zuq.osm.parser.model.Way;

public class osmParserTest {

	/**
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		String left = "16.35428";
		String bottom = "48.20161";
		String right = "16.36806";
		String top = "48.20747";
		String url = " http://api.openstreetmap.org/api/0.6/map?bbox=" + left + "," + bottom + "," + right
				+ "," + top;
		System.out.println(url);
		OSM osm = OSMParser.parse(url);
		for (Way way : osm.getWays()) {
			System.out.println(way.getName());
		}

	}

}