Changeset 2491 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-11-21T15:48:35+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/projection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/ProjectionSubPrefs.java
r2272 r2491 37 37 /** 38 38 * Will be called if the preference dialog is dismissed. 39 * argument may be null to reset everything 39 40 */ 40 41 public void setPreferences(Collection<String> args); -
trunk/src/org/openstreetmap/josm/data/projection/UTM.java
r2272 r2491 26 26 public class UTM implements Projection, ProjectionSubPrefs { 27 27 28 private int zone = 33; 28 public static final int DEFAULT_ZONE = 30; 29 private int zone = DEFAULT_ZONE; 29 30 30 31 final private double UTMScaleFactor = 0.9996; … … 410 411 public void setPreferences(Collection<String> args) 411 412 { 412 /* TODO: parse args instead of fixed value */ 413 zone = 33; 413 zone = DEFAULT_ZONE; 414 try { 415 for(String s : args) 416 { 417 zone = Integer.parseInt(s); 418 if(zone <= 0 || zone > 60) 419 zone = DEFAULT_ZONE; 420 break; 421 } 422 } catch(NumberFormatException e) {} 414 423 } 415 424 416 425 public Collection<String> getPreferencesFromCode(String code) 417 426 { 418 /* TODO: implement */ 427 if(code.startsWith("EPSG:3258")) 428 { 429 try { 430 String zonestring = code.substring(9); 431 int zoneval = Integer.parseInt(zonestring); 432 if(zoneval > 0 && zone <= 60) 433 { 434 return Collections.singleton(zonestring); 435 } 436 } catch(NumberFormatException e) {} 437 } 419 438 return null; 420 439 }
Note:
See TracChangeset
for help on using the changeset viewer.