Changeset 18801 in josm for trunk/scripts
- Timestamp:
- 2023-08-09T15:30:01+02:00 (18 months ago)
- Location:
- trunk/scripts
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/BuildProjectionDefinitions.java
r16344 r18801 93 93 if (list.isEmpty()) 94 94 throw new AssertionError("EPSG file seems corrupted"); 95 Pattern badDmsPattern = Pattern.compile("(\\d+(?:\\.\\d+)?d\\d+(?:\\.\\d+)?')( N|S|E|W)");95 Pattern badDmsPattern = Pattern.compile("(\\d+(?:\\.\\d+)?d\\d+(?:\\.\\d+)?')([NSEW])"); 96 96 for (ProjectionDefinition pd : list) { 97 97 // DMS notation without second causes problems with cs2cs, add 0" … … 145 145 146 146 if (printStats) { 147 System.out.print ln(String.format("loaded %d entries from %s", epsgJosm.size(), JOSM_EPSG_FILE));148 System.out.print ln(String.format("loaded %d entries from %s", epsgProj4.size(), PROJ4_EPSG_FILE));149 System.out.print ln(String.format("loaded %d entries from %s", esriProj4.size(), PROJ4_ESRI_FILE));147 System.out.printf("loaded %d entries from %s%n", epsgJosm.size(), JOSM_EPSG_FILE); 148 System.out.printf("loaded %d entries from %s%n", epsgProj4.size(), PROJ4_EPSG_FILE); 149 System.out.printf("loaded %d entries from %s%n", esriProj4.size(), PROJ4_ESRI_FILE); 150 150 System.out.println(); 151 151 System.out.println("some entries from proj.4 have not been included:"); 152 System.out.print ln(String.format(" * already in the maintained JOSM list: %d entries", noInJosm));152 System.out.printf(" * already in the maintained JOSM list: %d entries%n", noInJosm); 153 153 if (noInProj4 > 0) { 154 System.out.print ln(String.format(" * ESRI already in the standard EPSG list: %d entries", noInProj4));155 } 156 System.out.print ln(String.format(" * deprecated: %d entries", noDeprecated));157 System.out.print ln(String.format(" * using +proj=geocent, which is 3D (X,Y,Z) and not useful in JOSM: %d entries", noGeocent));154 System.out.printf(" * ESRI already in the standard EPSG list: %d entries%n", noInProj4); 155 } 156 System.out.printf(" * deprecated: %d entries%n", noDeprecated); 157 System.out.printf(" * using +proj=geocent, which is 3D (X,Y,Z) and not useful in JOSM: %d entries%n", noGeocent); 158 158 if (noEllipsoid > 0) { 159 System.out.print ln(String.format(" * unsupported ellipsoids: %d entries", noEllipsoid));159 System.out.printf(" * unsupported ellipsoids: %d entries%n", noEllipsoid); 160 160 System.out.println(" in particular: " + ellipsoidMap); 161 161 } 162 162 if (noBaseProjection > 0) { 163 System.out.print ln(String.format(" * unsupported base projection: %d entries", noBaseProjection));163 System.out.printf(" * unsupported base projection: %d entries%n", noBaseProjection); 164 164 System.out.println(" in particular: " + baseProjectionMap); 165 165 } 166 166 if (noDatumgrid > 0) { 167 System.out.print ln(String.format(" * requires data file for vertical datum conversion: %d entries", noDatumgrid));167 System.out.printf(" * requires data file for vertical datum conversion: %d entries%n", noDatumgrid); 168 168 System.out.println(" in particular: " + datumgridMap); 169 169 } 170 170 if (noNadgrid > 0) { 171 System.out.print ln(String.format(" * requires data file for datum conversion: %d entries", noNadgrid));171 System.out.printf(" * requires data file for datum conversion: %d entries%n", noNadgrid); 172 172 System.out.println(" in particular: " + nadgridMap); 173 173 } 174 174 if (noOmercNoBounds > 0) { 175 System.out.print ln(String.format(176 " * projection is Oblique Mercator (requires bounds), but no bounds specified: %d entries", noOmercNoBounds ));175 System.out.printf( 176 " * projection is Oblique Mercator (requires bounds), but no bounds specified: %d entries%n", noOmercNoBounds); 177 177 } 178 178 if (noEquatorStereo > 0) { 179 System.out.print ln(String.format(" * projection is Equatorial Stereographic (see #15970): %d entries", noEquatorStereo));179 System.out.printf(" * projection is Equatorial Stereographic (see #15970): %d entries%n", noEquatorStereo); 180 180 } 181 181 System.out.println(); 182 System.out.print ln(String.format("written %d entries from %s", noJosm, JOSM_EPSG_FILE));183 System.out.print ln(String.format("written %d entries from %s", noProj4, PROJ4_EPSG_FILE));184 System.out.print ln(String.format("written %d entries from %s", noEsri, PROJ4_ESRI_FILE));182 System.out.printf("written %d entries from %s%n", noJosm, JOSM_EPSG_FILE); 183 System.out.printf("written %d entries from %s%n", noProj4, PROJ4_EPSG_FILE); 184 System.out.printf("written %d entries from %s%n", noEsri, PROJ4_ESRI_FILE); 185 185 } 186 186 } -
trunk/scripts/SyncEditorLayerIndex.java
r18723 r18801 70 70 * Compare and analyse the differences of the editor layer index and the JOSM imagery list. 71 71 * The goal is to keep both lists in sync. 72 * 73 * The editor layer index project (https://github.com/osmlab/editor-layer-index) 74 * provides also a version in the JOSM format, but the GEOJSON is the original source 75 * format, so we read that. 76 * 77 * How to run: 78 * ----------- 79 * 80 * Main JOSM binary needs to be in classpath, e.g. 81 * 82 * $ java -cp ../dist/josm-custom.jar SyncEditorLayerIndex 83 * 84 * Add option "-h" to show the available command line flags. 72 * <p> 73 * The <a href="https://github.com/osmlab/editor-layer-index">editor layer index</a> project 74 * provides also a version in the JOSM format, but the GEOJSON is the original source format, so we read that. 75 * <p> 76 * For running, the main JOSM binary needs to be in classpath, e.g. 77 * <p> 78 * {@code $ java -cp ../dist/josm-custom.jar SyncEditorLayerIndex} 79 * <p> 80 * Add option {@code -h} to show the available command line flags. 85 81 */ 86 82 @SuppressWarnings("unchecked") … … 294 290 void myprintln(String s) { 295 291 String color; 292 final String escaped = s.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">"); 296 293 if ((color = isSkipString(s)) != null) { 297 294 skip.remove(s); 298 295 if (optionXhtmlBody || optionXhtml) { 299 296 s = "<pre style=\"margin:3px;color:"+color+"\">" 300 + s.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">")+"</pre>";297 + escaped +"</pre>"; 301 298 } 302 299 if (!optionNoSkip) { … … 310 307 (s.startsWith("!") ? "orange" : 311 308 (s.startsWith("~") ? "red" : "brown")))); 312 s = "<pre style=\"margin:3px;color:"+color+"\">"+ s.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">")+"</pre>";309 s = "<pre style=\"margin:3px;color:"+color+"\">"+ escaped +"</pre>"; 313 310 } 314 311 if ((s.startsWith("+ ") || s.startsWith("+++ ELI") || s.startsWith("#")) && optionNoEli) { -
trunk/scripts/TagInfoExtract.java
r18760 r18801 90 90 * Run from the base directory of a JOSM checkout: 91 91 * <p> 92 * <pre> 92 93 * java -cp dist/josm-custom.jar TagInfoExtract --type mappaint 93 94 * java -cp dist/josm-custom.jar TagInfoExtract --type presets 94 95 * java -cp dist/josm-custom.jar TagInfoExtract --type external_presets 96 * </pre> 95 97 */ 96 98 public class TagInfoExtract { … … 245 247 .build()); 246 248 if (options.outputFile == null) { 247 System.out.println(writer .toString());249 System.out.println(writer); 248 250 } 249 251 } -
trunk/scripts/TaggingPresetSchemeWikiGenerator.java
r16644 r18801 23 23 24 24 /** 25 * This script generates the wiki content for https://josm.openstreetmap.de/wiki/TaggingPresets#Attributes 25 * This script generates the wiki content for <a href="https://josm.openstreetmap.de/wiki/TaggingPresets#Attributes"> 26 * TaggingPresets#Attributes</a> 26 27 */ 27 28 public final class TaggingPresetSchemeWikiGenerator {
Note:
See TracChangeset
for help on using the changeset viewer.