Changeset 11854 in josm


Ignore:
Timestamp:
2017-04-08T01:32:47+02:00 (2 years ago)
Author:
Don-vip
Message:

sonar - grvy:org.codenarc.rule.naming.ClassNameSameAsFilenameRule - Class Name Same As Filename

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/SyncEditorLayerIndex.groovy

    r11694 r11854  
    11// License: GPL. For details, see LICENSE file.
    22/**
    3  * Compare and analyse the differences of the editor imagery index and the JOSM imagery list.
     3 * Compare and analyse the differences of the editor layer index and the JOSM imagery list.
    44 * The goal is to keep both lists in sync.
    55 *
    6  * The editor imagery index project (https://github.com/osmlab/editor-imagery-index)
     6 * The editor layer index project (https://github.com/osmlab/editor-layer-index)
    77 * provides also a version in the JOSM format, but the GEOJSON is the original source
    88 * format, so we read that.
     
    1313 * Main JOSM binary needs to be in classpath, e.g.
    1414 *
    15  * $ groovy -cp ../dist/josm-custom.jar SyncEditorImageryIndex.groovy
     15 * $ groovy -cp ../dist/josm-custom.jar SyncEditorLayerIndex.groovy
    1616 *
    1717 * Add option "-h" to show the available command line flags.
     
    2121import javax.json.JsonObject
    2222import javax.json.JsonReader
    23 import javax.json.JsonValue
    2423
    2524import org.openstreetmap.josm.data.imagery.ImageryInfo
     
    2726import org.openstreetmap.josm.io.imagery.ImageryReader
    2827
    29 class SyncEditorImageryIndex {
     28class SyncEditorLayerIndex {
    3029
    3130    List<ImageryInfo> josmEntries;
     
    5049    static main(def args) {
    5150        parse_command_line_arguments(args)
    52         def script = new SyncEditorImageryIndex()
     51        def script = new SyncEditorLayerIndex()
    5352        script.loadSkip()
    5453        script.start()
     
    7271        def cli = new CliBuilder(width: 160)
    7372        cli.o(longOpt:'output', args:1, argName: "output", "Output file, - prints to stdout (default: -)")
    74         cli.e(longOpt:'eli_input', args:1, argName:"eli_input", "Input file for the editor imagery index (geojson). Default is $eliInputFile (current directory).")
     73        cli.e(longOpt:'eli_input', args:1, argName:"eli_input", "Input file for the editor layer index (geojson). Default is $eliInputFile (current directory).")
    7574        cli.j(longOpt:'josm_input', args:1, argName:"josm_input", "Input file for the JOSM imagery list (xml). Default is $josmInputFile (current directory).")
    7675        cli.i(longOpt:'ignore_input', args:1, argName:"ignore_input", "Input file for the ignore list. Default is $ignoreInputFile (current directory).")
     
    7978        cli.x(longOpt:'xhtmlbody', argName:"xhtmlbody", "create XHTML body for display in a web page")
    8079        cli.X(longOpt:'xhtml', argName:"xhtml", "create XHTML for display in a web page")
    81         cli.m(longOpt:'nomissingeli', argName:"nomissingeli", "don't show missing editor imagery index entries")
     80        cli.m(longOpt:'nomissingeli', argName:"nomissingeli", "don't show missing editor layer index entries")
    8281        cli.h(longOpt:'help', "show this help")
    8382        options = cli.parse(args)
     
    498497    static Date verifyDate(String year, String month, String day) {
    499498        def date
    500         if(year == null)
     499        if(year == null) {
    501500            date = "3000-01-01"
    502         else
     501        } else {
    503502            date = year + "-" + (month == null ? "01" : month) + "-" + (day == null ? "01" : day)
     503        }
    504504        def df = new java.text.SimpleDateFormat("yyyy-MM-dd")
    505505        df.setLenient(false)
Note: See TracChangeset for help on using the changeset viewer.