Changeset 32049 in osm for applications/editors/josm/plugins/proj4j/src/org
- Timestamp:
- 2016-02-03T23:26:51+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/Registry.java
r29325 r32049 105 105 } 106 106 107 private Map<String, Class> projRegistry; 108 109 private void register( String name, Class cls, String description ) { 107 private Map<String, Class<?>> projRegistry; 108 109 private void register( String name, Class<?> cls, String description ) { 110 110 projRegistry.put( name, cls ); 111 111 } … … 114 114 // if ( projRegistry == null ) 115 115 // initialize(); 116 Class cls = (Class)projRegistry.get( name ); 116 Class<?> cls = (Class<?>)projRegistry.get( name ); 117 117 if ( cls != null ) { 118 118 try { … … 136 136 if (projRegistry != null) 137 137 return; 138 projRegistry = new HashMap(); 138 projRegistry = new HashMap<>(); 139 139 register( "aea", AlbersProjection.class, "Albers Equal Area" ); 140 140 register( "aeqd", EquidistantAzimuthalProjection.class, "Azimuthal Equidistant" ); -
applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/datum/GeocentricConverter.java
r28495 r32049 140 140 double SPHI; /* sin of searched geodetic latitude */ 141 141 double SDPHI; /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */ 142 boolean At_Pole; /* indicates location is in polar region */ 142 //boolean At_Pole; /* indicates location is in polar region */ 143 143 int iter; /* # of continous iteration, max. 30 is always enough (s.a.) */ 144 144 … … 150 150 double Height; 151 151 152 At_Pole = false; 152 //At_Pole = false; 153 153 P = Math.sqrt(X*X+Y*Y); 154 154 RR = Math.sqrt(X*X+Y*Y+Z*Z); … … 158 158 159 159 /* special case, if P=0. (X=0., Y=0.) */ 160 At_Pole = true; 160 //At_Pole = true; 161 161 Longitude = 0.0; 162 162 -
applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/io/CSVRecordParser.java
r26409 r32049 58 58 { 59 59 loc = 0; 60 List vals = new ArrayList(); 60 List<String> vals = new ArrayList<>(); 61 61 int lineLen = record.length(); 62 62 while (loc < lineLen) { -
applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/io/MetaCRSTestCase.java
r26409 r32049 9 9 private static final CoordinateTransformFactory ctFactory = new CoordinateTransformFactory(); 10 10 11 private boolean verbose = true;12 13 11 String testName; 14 12 String testMethod; -
applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/io/MetaCRSTestFileReader.java
r30737 r32049 34 34 throws IOException 35 35 { 36 LineNumberReader lineReader = new LineNumberReader(new FileReader(file)); 37 List<MetaCRSTestCase> tests = null; 38 try { 39 tests = parseFile(lineReader); 36 try (LineNumberReader lineReader = new LineNumberReader(new FileReader(file))) { 37 return parseFile(lineReader); 40 38 } 41 finally {42 lineReader.close();43 }44 return tests;45 39 } 46 40 -
applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/io/Proj4FileReader.java
r27902 r32049 28 28 throw new IllegalStateException("Unable to access CRS file: " + filename); 29 29 } 30 BufferedReader reader = new BufferedReader( 31 new InputStreamReader(inStr) ); 32 String[] args; 33 try { 34 args = readFile(reader, name); 30 try (BufferedReader reader = new BufferedReader(new InputStreamReader(inStr))) { 31 return readFile(reader, name); 35 32 } 36 finally {37 if (reader != null)38 reader.close();39 }40 return args;41 33 } 42 34 … … 76 68 throw new IOException( t.lineno()+": '>' expected" ); 77 69 t.nextToken(); 78 List v = new ArrayList(); 70 List<String> v = new ArrayList<>(); 79 71 80 72 while ( t.ttype != '<' ) { … … 116 108 } 117 109 118 private static void addParam(List v, String key, String value) 110 private static void addParam(List<String> v, String key, String value) 119 111 { 120 112 String plusKey = key; -
applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/parser/DatumParameters.java
r27902 r32049 23 23 private final static double RA4 = .04722222222222222222; /* 17/360 */ 24 24 private final static double RA6 = .02215608465608465608; /* 67/3024 */ 25 private final static double RV4 = .06944444444444444444; /* 5/72 */ 26 private final static double RV6 = .04243827160493827160; /* 55/1296 */ 25 //private final static double RV4 = .06944444444444444444; /* 5/72 */ 26 //private final static double RV6 = .04243827160493827160; /* 55/1296 */ 27 27 28 28 private Datum datum = null; -
applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/parser/Proj4Keyword.java
r30737 r32049 54 54 private static Set<String> supportedParams = null; 55 55 56 public static synchronized Set supportedParameters() 56 public static synchronized Set<String> supportedParameters() 57 57 { 58 58 if (supportedParams == null) { … … 110 110 } 111 111 112 public static void checkUnsupported(Collection params) 112 public static void checkUnsupported(Collection<?> params) 113 113 { 114 114 for (Object s : params) { -
applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/parser/Proj4Parser.java
r30737 r32049 27 27 return null; 28 28 29 Map params = createParameterMap(args); 29 Map<String, String> params = createParameterMap(args); 30 30 Proj4Keyword.checkUnsupported(params.keySet()); 31 31 DatumParameters datumParam = new DatumParameters(); … … 45 45 * initialized from a PROJ.4 argument list. 46 46 */ 47 private Projection parseProjection( Map params, Ellipsoid ellipsoid ) { 47 private Projection parseProjection( Map<String, String> params, Ellipsoid ellipsoid ) { 48 48 Projection projection = null; 49 49 … … 136 136 } 137 137 138 private void parseDatum(Map params, DatumParameters datumParam) 138 private void parseDatum(Map<String, String> params, DatumParameters datumParam) 139 139 { 140 140 String towgs84 = (String) params.get(Proj4Keyword.towgs84); … … 193 193 } 194 194 195 private void parseEllipsoid(Map params, DatumParameters datumParam) 195 private void parseEllipsoid(Map<String, String> params, DatumParameters datumParam) 196 196 { 197 197 double b = 0; … … 280 280 * @param datumParam 281 281 */ 282 private void parseEllipsoidModifiers(Map params, DatumParameters datumParam) 282 private void parseEllipsoidModifiers(Map<String, String> params, DatumParameters datumParam) 283 283 { 284 284 /** … … 292 292 } 293 293 294 private Map createParameterMap(String[] args) { 295 Map params = new HashMap(); 294 private Map<String, String> createParameterMap(String[] args) { 295 Map<String, String> params = new HashMap<>(); 296 296 for (int i = 0; i < args.length; i++) { 297 297 String arg = args[i];
Note:
See TracChangeset
for help on using the changeset viewer.