Index: applications/editors/josm/plugins/lakewalker/Lakewalker/lakewalker.py
===================================================================
--- applications/editors/josm/plugins/lakewalker/Lakewalker/lakewalker.py	(revision 6788)
+++ applications/editors/josm/plugins/lakewalker/Lakewalker/lakewalker.py	(revision 6789)
@@ -85,5 +85,5 @@
 def download_landsat(c1, c2, width, height, fname):
     layer = "global_mosaic_base"
-    style = "IR1"
+    style = options.wmslayer
 
     (min_lat, min_lon) = c1
@@ -122,5 +122,5 @@
             bottom_left_xy = (int(math.floor(x / options.tilesize)) * options.tilesize, int(math.floor(y / options.tilesize)) * options.tilesize)
             top_right_xy = (bottom_left_xy[0] + options.tilesize, bottom_left_xy[1] + options.tilesize)
-            fname = "landsat_%d_%d_xy_%d_%d.png" % (options.resolution, options.tilesize, bottom_left_xy[0], bottom_left_xy[1])
+            fname = options.wmslayer+"/landsat_%d_%d_xy_%d_%d.png" % (options.resolution, options.tilesize, bottom_left_xy[0], bottom_left_xy[1])
             im = self.images.get(fname, None)
             if im is None:
@@ -446,4 +446,5 @@
     parser.add_option("--bottom", type="float", metavar="LATITUDE", default=-90, help="Bottom (south) latitude for bounding box")
     parser.add_option("--josm", action="store_true", dest="josm_mode", default=False, help="Operate in JOSM plugin mode")
+    parser.add_option("--wms", type="string", dest="wmslayer", default="IR1", help="WMS layer to use")
 
     global options # Ugly, I know...
Index: applications/editors/josm/plugins/lakewalker/build.xml
===================================================================
--- applications/editors/josm/plugins/lakewalker/build.xml	(revision 6788)
+++ applications/editors/josm/plugins/lakewalker/build.xml	(revision 6789)
@@ -64,7 +64,10 @@
     <copy todir="${josm.plugins.dir}/Lakewalker">
       <fileset dir="Lakewalker">
-  	<filename name = "*.py"/>
+  		<filename name = "*.py"/>
       </fileset>
     </copy>
+  	<mkdir dir="${josm.plugins.dir}/Lakewalker/IR1"></mkdir>
+	<mkdir dir="${josm.plugins.dir}/Lakewalker/IR2"></mkdir>
+	<mkdir dir="${josm.plugins.dir}/Lakewalker/IR3"></mkdir>
   </target>
 
Index: applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java
===================================================================
--- applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java	(revision 6788)
+++ applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java	(revision 6789)
@@ -101,4 +101,5 @@
     target += " --tilesize=" + Main.pref.get(LakewalkerPreferences.PREF_LANDSAT_SIZE, "2000");
     target += " --startdir=" + Main.pref.get(LakewalkerPreferences.PREF_START_DIR, "east");
+    target += " --wms=" + Main.pref.get(LakewalkerPreferences.PREF_WMS, "IR1");    
     target += " --josm";
     
Index: applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java
===================================================================
--- applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java	(revision 6788)
+++ applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java	(revision 6789)
@@ -15,4 +15,5 @@
   public static final String[] DIRECTIONS = new String[] {"east", "northeast", "north", "northwest", "west", "southwest", "south", "southeast"};
   public static final String[] WAYTYPES = new String[] {"water", "coastline", "land", "none"};
+  public static final String[] WMSLAYERS = new String[] {"IR1", "IR2", "IR3"};
 
   public static final String PREF_PYTHON = "lakewalker.python";
@@ -27,4 +28,5 @@
   public static final String PREF_START_DIR = "lakewalker.startdir";
   public static final String PREF_WAYTYPE = "lakewalker.waytype";
+  public static final String PREF_WMS = "lakewalker.wms";
     
   protected StringConfigurer pythonConfig = new StringConfigurer();
@@ -50,4 +52,6 @@
   protected StringEnumConfigurer lakeTypeConfig = new StringEnumConfigurer(WAYTYPES);
   protected JLabel lakeTypeLabel = new JLabel(tr("Tag ways as"));
+  protected StringEnumConfigurer wmsConfig = new StringEnumConfigurer(WMSLAYERS);
+  protected JLabel wmsLabel = new JLabel(tr("WMS Layer"));
   
   public void addGui(PreferenceDialog gui) {
@@ -63,4 +67,5 @@
     startDirConfig.setToolTipText(tr("Direction to search for land. Default east."));
     lakeTypeConfig.setToolTipText(tr("Tag ways as water, coastline, land or nothing. Default is water."));
+    wmsConfig.setToolTipText(tr("Which WMS layer to use for tracing against. Default is IR1."));
 
     String description = tr("An interlude to the Lakewalker Python module to trace water bodies on Landsat imagery.<br><br>Version: {0}", LakewalkerPlugin.VERSION);
@@ -79,4 +84,5 @@
     startDirConfig.setValue(Main.pref.get(PREF_START_DIR, "east"));
     lakeTypeConfig.setValue(Main.pref.get(PREF_WAYTYPE, "water"));
+    wmsConfig.setValue(Main.pref.get(PREF_WMS, "IR1"));
   }
   
@@ -107,4 +113,6 @@
     prefPanel.add(lakeTypeLabel, labelConstraints);
     prefPanel.add(lakeTypeConfig.getControls(), dataConstraints);
+    prefPanel.add(wmsLabel, labelConstraints);
+    prefPanel.add(wmsConfig.getControls(), dataConstraints);
   }
 
@@ -124,4 +132,5 @@
     Main.pref.put(PREF_START_DIR, startDirConfig.getValueString());
     Main.pref.put(PREF_WAYTYPE, lakeTypeConfig.getValueString());
+    Main.pref.put(PREF_WMS, wmsConfig.getValueString());
   }
   
