Changeset 8533 in josm for trunk/src/org/openstreetmap/josm/data/projection/Projections.java
- Timestamp:
- 2015-06-25T01:20:24+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/Projections.java
r8451 r8533 7 7 import java.io.InputStreamReader; 8 8 import java.nio.charset.StandardCharsets; 9 import java.util.ArrayList; 9 10 import java.util.Collection; 10 11 import java.util.Collections; 11 12 import java.util.HashMap; 12 13 import java.util.HashSet; 14 import java.util.List; 13 15 import java.util.Locale; 14 16 import java.util.Map; … … 36 38 import org.openstreetmap.josm.io.CachedFile; 37 39 import org.openstreetmap.josm.tools.Pair; 40 import org.openstreetmap.josm.tools.Utils; 38 41 39 42 /** … … 62 65 * should be compatible to PROJ.4 63 66 */ 64 publicstatic final Map<String, ProjFactory> projs = new HashMap<>();65 publicstatic final Map<String, Ellipsoid> ellipsoids = new HashMap<>();66 publicstatic final Map<String, Datum> datums = new HashMap<>();67 publicstatic final Map<String, NTV2GridShiftFileWrapper> nadgrids = new HashMap<>();68 publicstatic final Map<String, Pair<String, String>> inits = new HashMap<>();67 static final Map<String, ProjFactory> projs = new HashMap<>(); 68 static final Map<String, Ellipsoid> ellipsoids = new HashMap<>(); 69 static final Map<String, Datum> datums = new HashMap<>(); 70 static final Map<String, NTV2GridShiftFileWrapper> nadgrids = new HashMap<>(); 71 static final Map<String, Pair<String, String>> inits = new HashMap<>(); 69 72 70 73 static { … … 216 219 return Collections.unmodifiableCollection(allCodes); 217 220 } 221 222 private static String listKeys(Map<String, ?> map) { 223 List<String> keys = new ArrayList<>(map.keySet()); 224 Collections.sort(keys); 225 return Utils.join(", ", keys); 226 } 227 228 /** 229 * Replies the list of projections as string (comma separated). 230 * @return the list of projections as string (comma separated) 231 * @since 8533 232 */ 233 public static String listProjs() { 234 return listKeys(projs); 235 } 236 237 /** 238 * Replies the list of ellipsoids as string (comma separated). 239 * @return the list of ellipsoids as string (comma separated) 240 * @since 8533 241 */ 242 public static String listEllipsoids() { 243 return listKeys(ellipsoids); 244 } 245 246 /** 247 * Replies the list of datums as string (comma separated). 248 * @return the list of datums as string (comma separated) 249 * @since 8533 250 */ 251 public static String listDatums() { 252 return listKeys(datums); 253 } 254 255 /** 256 * Replies the list of nadgrids as string (comma separated). 257 * @return the list of nadgrids as string (comma separated) 258 * @since 8533 259 */ 260 public static String listNadgrids() { 261 return listKeys(nadgrids); 262 } 218 263 }
Note:
See TracChangeset
for help on using the changeset viewer.