Changeset 10920 in osm for applications/editors/josm/plugins/lakewalker/src/org/openstreetmap
- Timestamp:
- 2008-09-26T12:34:04+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java
r6949 r10920 104 104 * Collect options 105 105 */ 106 final int waylen = Integer.parseInt(Main.pref.get(LakewalkerPreferences.PREF_MAX_SEG,"500"));107 final int maxnode = Integer.parseInt(Main.pref.get(LakewalkerPreferences.PREF_MAX_NODES,"50000"));108 final int threshold = Integer.parseInt(Main.pref.get(LakewalkerPreferences.PREF_THRESHOLD_VALUE,"90"));109 final double epsilon = Double.parseDouble(Main.pref.get(LakewalkerPreferences.PREF_EPSILON,"0.0003"));110 final int resolution = Integer.parseInt(Main.pref.get(LakewalkerPreferences.PREF_LANDSAT_RES,"4000"));111 final int tilesize = Integer.parseInt(Main.pref.get(LakewalkerPreferences.PREF_LANDSAT_SIZE,"2000"));106 final int waylen = Main.pref.getInteger(LakewalkerPreferences.PREF_MAX_SEG, 500); 107 final int maxnode = Main.pref.getInteger(LakewalkerPreferences.PREF_MAX_NODES, 50000); 108 final int threshold = Main.pref.getInteger(LakewalkerPreferences.PREF_THRESHOLD_VALUE, 90); 109 final double epsilon = Main.pref.getDouble(LakewalkerPreferences.PREF_EPSILON, 0.0003); 110 final int resolution = Main.pref.getInteger(LakewalkerPreferences.PREF_LANDSAT_RES, 4000); 111 final int tilesize = Main.pref.getInteger(LakewalkerPreferences.PREF_LANDSAT_SIZE, 2000); 112 112 final String startdir = Main.pref.get(LakewalkerPreferences.PREF_START_DIR, "east"); 113 final String wmslayer = Main.pref.get(LakewalkerPreferences.PREF_WMS, "IR1"); 114 113 final String wmslayer = Main.pref.get(LakewalkerPreferences.PREF_WMS, "IR1"); 114 115 115 try { 116 116 PleaseWaitRunnable lakewalkerTask = new PleaseWaitRunnable(tr("Tracing")){ … … 186 186 Node fn = null; 187 187 188 double eastOffset = 0.0; 189 double northOffset = 0.0; 190 try { 191 eastOffset = Double.parseDouble(Main.pref.get(LakewalkerPreferences.PREF_EAST_OFFSET, "0.0")); 192 northOffset = Double.parseDouble(Main.pref.get(LakewalkerPreferences.PREF_NORTH_OFFSET, "0.0")); 193 } 194 catch (Exception e) { 195 196 } 188 double eastOffset = Main.pref.getDouble(LakewalkerPreferences.PREF_EAST_OFFSET, 0.0); 189 double northOffset = Main.pref.getDouble(LakewalkerPreferences.PREF_NORTH_OFFSET, 0.0); 197 190 char option = ' '; 198 191 … … 217 210 way.nodes.add(n); 218 211 219 if(nodesinway > Integer.parseInt(Main.pref.get(LakewalkerPreferences.PREF_MAX_SEG,"500"))){212 if(nodesinway > Main.pref.getInteger(LakewalkerPreferences.PREF_MAX_SEG, 500)){ 220 213 String waytype = Main.pref.get(LakewalkerPreferences.PREF_WAYTYPE, "water"); 221 214 -
applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java
r6949 r10920 52 52 protected JLabel northOffsetLabel = new JLabel(tr("Shift all traces to north (degrees)")); 53 53 protected StringEnumConfigurer startDirConfig = new StringEnumConfigurer(DIRECTIONS); 54 protected JLabel startDirLabel = new JLabel(tr("Direction to search for land")); 54 protected JLabel startDirLabel = new JLabel(tr("Direction to search for land")); 55 55 protected StringEnumConfigurer lakeTypeConfig = new StringEnumConfigurer(WAYTYPES); 56 56 protected JLabel lakeTypeLabel = new JLabel(tr("Tag ways as")); … … 78 78 79 79 pythonConfig.setValue(Main.pref.get(PREF_PYTHON, "python.exe")); 80 maxSegsConfig.setValue(Main.pref.get(PREF_MAX_SEG, "500"));81 maxNodesConfig.setValue(Main.pref.get(PREF_MAX_NODES, "50000"));82 thresholdConfig.setValue(Main.pref.get(PREF_THRESHOLD, "35"));83 thresholdConfigNew.setValue(Main.pref.get(PREF_THRESHOLD_VALUE, "90"));84 epsilonConfig.setValue(Main.pref.get(PREF_EPSILON, "0.0003"));85 landsatResConfig.setValue(Main.pref.get(PREF_LANDSAT_RES, "4000"));86 landsatSizeConfig.setValue(Main.pref.get(PREF_LANDSAT_SIZE, "2000"));87 eastOffsetConfig.setValue(Main.pref.get(PREF_EAST_OFFSET, "0.0"));88 northOffsetConfig.setValue(Main.pref.get(PREF_NORTH_OFFSET, "0.0"));80 maxSegsConfig.setValue(Main.pref.getInteger(PREF_MAX_SEG, 500)); 81 maxNodesConfig.setValue(Main.pref.getInteger(PREF_MAX_NODES, 50000)); 82 thresholdConfig.setValue(Main.pref.getInteger(PREF_THRESHOLD, 35)); 83 thresholdConfigNew.setValue(Main.pref.getInteger(PREF_THRESHOLD_VALUE, 90)); 84 epsilonConfig.setValue(Main.pref.getDouble(PREF_EPSILON, 0.0003)); 85 landsatResConfig.setValue(Main.pref.getInteger(PREF_LANDSAT_RES, 4000)); 86 landsatSizeConfig.setValue(Main.pref.getInteger(PREF_LANDSAT_SIZE, 2000)); 87 eastOffsetConfig.setValue(Main.pref.getDouble(PREF_EAST_OFFSET, 0.0)); 88 northOffsetConfig.setValue(Main.pref.getDouble(PREF_NORTH_OFFSET, 0.0)); 89 89 startDirConfig.setValue(Main.pref.get(PREF_START_DIR, "east")); 90 90 lakeTypeConfig.setValue(Main.pref.get(PREF_WAYTYPE, "water")); … … 129 129 public void ok() { 130 130 Main.pref.put(PREF_PYTHON, pythonConfig.getValueString()); 131 Main.pref.put(PREF_MAX_SEG, maxSegsConfig.getValueString()); 131 Main.pref.put(PREF_MAX_SEG, maxSegsConfig.getValueString()); 132 132 Main.pref.put(PREF_MAX_NODES, maxNodesConfig.getValueString()); 133 133 Main.pref.put(PREF_THRESHOLD, thresholdConfig.getValueString()); -
applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerReader.java
r6874 r10920 46 46 String line; 47 47 setStatus("Initializing"); 48 double eastOffset = 0.0; 49 double northOffset = 0.0; 50 try { 51 eastOffset = Double.parseDouble(Main.pref.get(LakewalkerPreferences.PREF_EAST_OFFSET, "0.0")); 52 northOffset = Double.parseDouble(Main.pref.get(LakewalkerPreferences.PREF_NORTH_OFFSET, "0.0")); 53 } 54 catch (Exception e) { 55 56 } 48 double eastOffset = Main.pref.getDouble(LakewalkerPreferences.PREF_EAST_OFFSET, 0.0); 49 double northOffset = Main.pref.getDouble(LakewalkerPreferences.PREF_NORTH_OFFSET, 0.0); 57 50 char option = ' '; 58 51
Note:
See TracChangeset
for help on using the changeset viewer.