Changeset 9357 in josm
- Timestamp:
- 2016-01-09T19:05:20+01:00 (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/build.xml
r9330 r9357 648 648 <target name="epsg-compile" depends="compile"> 649 649 <mkdir dir="build2"/> 650 <javac sourcepath="" srcdir="scripts" 650 <javac sourcepath="" srcdir="scripts" failonerror="true" 651 651 destdir="build2" target="1.7" source="1.7" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8" classpath="build"> 652 652 </javac> … … 655 655 <target name="epsg" depends="epsg-compile"> 656 656 <touch file="${epsg.output}"/> 657 <java classname="BuildProjectionDefinitions"> 657 <java classname="BuildProjectionDefinitions" failonerror="true"> 658 658 <classpath> 659 659 <pathelement path="."/> … … 661 661 <pathelement path="build2"/> 662 662 </classpath> 663 <arg value="${basedir}"/> 663 664 </java> 664 665 </target> -
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.