public void createMap() throws Exception {
		File osmarenderedFile = invokeOsmarenderXsltProc();

		Map map = new Map();
		map.load("file:" + osmarenderedFile.getAbsolutePath());
		osmarenderedFile.delete();

		NodeList pointNodes = map
				.getNodes("//svg:g[@id='map']/svg:circle[@osm:id=../svg:text/@osm:id]");
		System.out.println("nodes: "+pointNodes.getLength());
		for (int eIter = 0; eIter < pointNodes.getLength(); eIter++) {
			SVGOMCircleElement graphic = (SVGOMCircleElement) pointNodes
					.item(eIter);
			map.addPointObject(graphic);
		}

		NodeList areaNodes = map
				.getNodes("//svg:g[@id='map']/svg:path[@osm:id=../svg:text/@osm:id]");
		for (int eIter = 0; eIter < areaNodes.getLength(); eIter++) {
			SVGOMPathElement graphic = null;
			graphic = (SVGOMPathElement) areaNodes.item(eIter);
			map.addAreaObject(graphic);
		}

		NodeList lineNodes = map
				.getNodes("//svg:g[@id='map']/svg:text[contains(@class, 'highway-track-caption') or contains(@class, 'highway-name') or contains(@class, 'highway-ref')]");
		for (int eIter = 0; eIter < lineNodes.getLength(); eIter++) {
			SVGOMTextElement graphic = (SVGOMTextElement) lineNodes.item(eIter);
			map.addLineObject(graphic);
		}

		// Mutate any number of times
		Date start = new Date();
		double bestTotalOverlap = Double.MAX_VALUE;
		long timeOfLastImprovementOrDiscard = System.currentTimeMillis();
		while (true) {
			map.mutate();
			long runtime = new Date().getTime() - start.getTime();
			double totalOverlap = map.getTotalOverlaps();
			if (totalOverlap < bestTotalOverlap) {
				bestTotalOverlap = totalOverlap;
				timeOfLastImprovementOrDiscard = System
						.currentTimeMillis();
			}
			// Abort optimization if no problems persist or after 20 minutes
			if (totalOverlap == 0 || runtime > 20 * 60000) {
				System.out.println("Finished after " + (runtime / 60)
						+ "s");
				System.out.println("Worked on "
						+ (pointNodes.getLength()
								+ lineNodes.getLength() + areaNodes
								.getLength()) + " features.");
				break;
			}
			// If no improvement was made for 1 second, remove a map feature to simplify the problem 
			if (System.currentTimeMillis()
					- timeOfLastImprovementOrDiscard > 1000) {
				// Kick out a feature label if too much overlaps persist after some
				// mutations
				map.discard(1);
				timeOfLastImprovementOrDiscard = System
						.currentTimeMillis();
			}
		}

		map.fixObjects();
		map.save(mapData.getAbsolutePath() + "-processed.svg");
	}