Changeset 19097 in josm for trunk/scripts
- Timestamp:
- 2024-06-07T13:51:44+02:00 (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/BuildProjectionDefinitions.java
r18801 r19097 14 14 import java.util.Map; 15 15 import java.util.TreeMap; 16 import java.util.logging.Logger; 16 17 import java.util.regex.Matcher; 17 18 import java.util.regex.Pattern; … … 85 86 } 86 87 88 static boolean touchCustomEpsg(String baseDir) throws IOException { 89 final Path path = Paths.get(baseDir).resolve(OUTPUT_EPSG_FILE); 90 if (!Files.exists(path)) { 91 Files.createDirectories(path.getParent()); 92 Files.createFile(path); 93 Logger.getLogger(BuildProjectionDefinitions.class.getCanonicalName()) 94 .info("Could not generate custom-epsg; an empty custom-epsg file was not available on the classpath. " + 95 "This should now be fixed, please rerun the command."); 96 return true; 97 } 98 return false; 99 } 100 87 101 static void initMap(String baseDir, String file, Map<String, ProjectionDefinition> map) throws IOException { 88 102 final Path path = Paths.get(baseDir).resolve(PROJ_DIR).resolve(file); … … 107 121 108 122 static void buildList(String baseDir) throws IOException { 123 if (touchCustomEpsg(baseDir)) { 124 return; 125 } 109 126 initMap(baseDir, JOSM_EPSG_FILE, epsgJosm); 110 127 initMap(baseDir, PROJ4_EPSG_FILE, epsgProj4); … … 243 260 "EPSG:103474", // lcc/GRS80 - NAD_1983_CORS96_StatePlane_Nebraska_FIPS_2600 [NAD 1983 (CORS96) SPCS Nebraska] 244 261 "EPSG:103475" // lcc/GRS80 - NAD_1983_CORS96_StatePlane_Nebraska_FIPS_2600_Ft_US [NAD 1983 (CORS96) SPCS Nebraska (US Feet)] 245 262 ).contains(pd.code)) { 246 263 result = false; 247 264 }
Note:
See TracChangeset
for help on using the changeset viewer.