Changeset 4869 in josm for trunk/src/org/openstreetmap/josm/data/projection/GaussKrueger.java
- Timestamp:
- 2012-01-24T21:52:43+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/GaussKrueger.java
r4304 r4869 22 22 public class GaussKrueger extends AbstractProjection implements ProjectionSubPrefs { 23 23 24 public static int DEFAULT_ZONE = 2;24 public static final int DEFAULT_ZONE = 2; 25 25 private int zone; 26 27 private static Bounds[] bounds = { 26 27 private static Bounds[] bounds = { 28 28 new Bounds(new LatLon(-5, 3.5), new LatLon(85, 8.5)), 29 29 new Bounds(new LatLon(-5, 6.5), new LatLon(85, 11.5)), … … 33 33 34 34 private static NTV2GridShiftFile BETA2007 = null; 35 35 36 36 private static String[] zones = { "2", "3", "4", "5" }; 37 37 … … 45 45 String gridFileName = "BETA2007.gsb"; 46 46 InputStream is = Main.class.getResourceAsStream("/data/"+gridFileName); 47 if (is == null) {47 if (is == null) 48 48 throw new RuntimeException(tr("Error: failed to open input stream for resource ''/data/{0}''.", gridFileName)); 49 }50 49 BETA2007 = new NTV2GridShiftFile(); 51 50 BETA2007.loadGridShiftFile(is, false); … … 70 69 } 71 70 72 @Override 71 @Override 73 72 public String toString() { 74 73 return tr("Gau\u00DF-Kr\u00FCger"); 75 74 } 76 75 77 76 @Override 78 77 public Integer getEpsgCode() { … … 89 88 return bounds[zone-2]; 90 89 } 91 90 92 91 @Override 93 92 public void setupPreferencePanel(JPanel p, ActionListener listener) { … … 106 105 } 107 106 } 108 107 109 108 @Override 110 109 public Collection<String> getPreferences(JPanel p) { … … 115 114 return Collections.singleton(Integer.toString(zone+2)); 116 115 } 117 116 118 117 @Override 119 118 public void setPreferences(Collection<String> args) { … … 133 132 updateParameters(zone); 134 133 } 135 134 136 135 @Override 137 136 public String[] allCodes() { … … 154 153 return null; 155 154 } 156 155 157 156 }
Note:
See TracChangeset
for help on using the changeset viewer.