Changeset 9357 in josm for trunk/scripts
- Timestamp:
- 2016-01-09T19:05:20+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/BuildProjectionDefinitions.java
r9231 r9357 2 2 3 3 import java.io.BufferedWriter; 4 import java.io.File; 4 5 import java.io.FileOutputStream; 5 6 import java.io.IOException; … … 48 49 */ 49 50 public static void main(String[] args) throws IOException { 50 buildList(); 51 buildList(args[0]); 51 52 } 52 53 53 static void buildList() throws IOException { 54 List<ProjectionDefinition> pdJosm = Projections.loadProjectionDefinitions(JOSM_EPSG_FILE); 54 static void buildList(String baseDir) throws IOException { 55 List<ProjectionDefinition> pdJosm = Projections.loadProjectionDefinitions(baseDir + File.separator + JOSM_EPSG_FILE); 55 56 for (ProjectionDefinition pd : pdJosm) { 56 57 epsgJosm.put(pd.code, pd); 57 58 } 58 List<ProjectionDefinition> pdProj4 = Projections.loadProjectionDefinitions(PROJ4_EPSG_FILE); 59 List<ProjectionDefinition> pdProj4 = Projections.loadProjectionDefinitions(baseDir + File.separator + PROJ4_EPSG_FILE); 59 60 for (ProjectionDefinition pd : pdProj4) { 60 61 epsgProj4.put(pd.code, pd); … … 62 63 63 64 try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter( 64 new FileOutputStream(OUTPUT_EPSG_FILE), StandardCharsets.UTF_8))) { 65 new FileOutputStream(baseDir + File.separator + OUTPUT_EPSG_FILE), StandardCharsets.UTF_8))) { 65 66 out.write("## This file is autogenerated, do not edit!\n"); 66 67 out.write("## Run ant task \"epsg\" to rebuild.\n");
Note:
See TracChangeset
for help on using the changeset viewer.