Changeset 16436 in josm for trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Proj4DirGridShiftFileSource.java
- Timestamp:
- 2020-05-17T12:08:17+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Proj4DirGridShiftFileSource.java
r14624 r16436 43 43 @Override 44 44 public InputStream getNTV2GridShiftFile(String gridFileName) { 45 File grid = null;46 45 // Check is the grid is installed in default PROJ.4 directories 47 for (File dir : Platform.determinePlatform().accept(this)) { 48 File file = new File(dir, gridFileName); 49 if (file.exists() && file.isFile()) { 50 grid = file; 51 break; 52 } 53 } 46 File grid = Platform.determinePlatform().accept(this).stream() 47 .map(dir -> new File(dir, gridFileName)) 48 .filter(file -> file.exists() && file.isFile()) 49 .findFirst().orElse(null); 54 50 // If not, search into PROJ_LIB directory 55 51 if (grid == null) {
Note:
See TracChangeset
for help on using the changeset viewer.