public static void load(String path) {
		
		try {
            		String vertexFilename = "vertex.txt";
            		String edgeFilename   = "edges.txt";
            		String streetFilename = "streets.txt";
            		boolean isDirected = true;
            
			PreProcessingMap preProcessingMap = new PreProcessingMap();
			
			Document doc = preProcessingMap.createXMLDocument(path);
			// read the boundary of this graph
			Boundary boundary = preProcessingMap.readBoundaryFromOSMFile(doc);
			
			// Read the data of OSM nodes
			System.out.println("read OSM nodes...");
			List<OSMNode> osmNodes = preProcessingMap.readNodesFromOSMFile(doc);
			// Create OSM node hashtable
			System.out.println("Create index hashtable for OSM nodes ");
			Map<String, OSMNode> nodesMap = new HashMap<String, OSMNode>();
			preProcessingMap.createNodesHashtable(osmNodes, nodesMap);

			// Read the data of OSM ways
			System.out.println("read ways...");
			List<OSMWay> osmWays = preProcessingMap.readWaysFromOSMFile(doc);
			System.out.println("ways size:" + osmWays.size());
			
			// Create streets, 'true' means to generate a directed graph
			List<Street> streets = preProcessingMap.createStreets(
				nodesMap, osmWays, isDirected);
			
			// Clean those nodes that is not used in this graph and output 
			// them into a file.
			List<OSMNode> requiredNodes = preProcessingMap.selectNodes(streets);
			System.out.println("node size:" + requiredNodes.size());
			preProcessingMap.outputNodes(requiredNodes, vertexFilename);
			
			// Output streets into file
			preProcessingMap.outputStreets(streets, 
				streetFilename);
			preProcessingMap.outputEdges(requiredNodes.size(), streets, 
				edgeFilename);
			System.out.println("streets size:" + streets.size());
			
			int[] indegrees  = new int[requiredNodes.size()];
			int[] outdegrees = new int[requiredNodes.size()];
			
			for (int i = 0; i < requiredNodes.size(); i++) {
				indegrees[i]  = 0;
				outdegrees[i] = 0;
			}
			
			for (int i = 0; i < streets.size(); i++) {
				Street street = streets.get(i);
				OSMNode startnode = street.getStartNode();
				OSMNode endnode   = street.getEndNode();
				
				outdegrees[(int)startnode.getIndex()] += 1;
				indegrees[(int)endnode.getIndex()] += 1;
			}
			
			int count = 0;
			for (int i = 0; i < requiredNodes.size(); i++) {
				if (outdegrees[i] == 1 && indegrees[i] == 1) {
					count += 1;
				}
			}
			
			System.out.println("redundant points:" + count);
			
			System.out.println("Building Graph - Done");
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}