private void writeStormPath(OutputStream out, LinkedList centers,
			String stormName, boolean showHurricanePathAsTrack)
		throws IOException
	{
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
		SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
		String shortName = makeShortName(stormName);
		if(showHurricanePathAsTrack){
			out.write("<trk>\n".getBytes());
			out.write(("\t<name>" + stormName + "</name>\n").getBytes());
			out.write("<trkseg>\n".getBytes());
		}
		else{
			out.write("<rte>\n".getBytes());
			out.write(("\t<name>" + stormName + "</name>\n").getBytes());
		}
		Iterator iter = centers.iterator();
		int count = 1;
		while(iter.hasNext()){
			HurricaneCenter center = (HurricaneCenter)iter.next();
			String countString = "0000" + count;
			countString = countString.substring(countString.length() - 3);
			if(showHurricanePathAsTrack)
				out.write("\t<trkpt".getBytes());
			else
				out.write("\t<rtept".getBytes());
			out.write((" lat=\"" + center.getLatitude() + "\" lon=\""
					+ center.getLongitude() + "\">\n").getBytes());
			out.write(("\t\t<name>" + shortName + countString + "</name>\n").getBytes());
			out.write(("\t\t<time>" + dateFormat.format(center.getDate())
					+ "T" + timeFormat.format(center.getDate()) + "Z" + "</time>\n").getBytes());
			if(showHurricanePathAsTrack)
				out.write("\t</trkpt>\n".getBytes());
			else
				out.write("\t</rtept>\n".getBytes());
			
			++count;
		}
		if(showHurricanePathAsTrack){
			out.write("</trkseg>\n".getBytes());
			out.write("</trk>\n".getBytes());
		}
		else
			out.write("</rte>\n".getBytes());
	}