Changeset 10769 in josm for trunk/scripts


Ignore:
Timestamp:
2016-08-08T13:19:07+02:00 (8 years ago)
Author:
Don-vip
Message:

fix Taginfo errors reported by Jochen Topf on @josm-dev

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/TagInfoExtract.groovy

    r9953 r10769  
    270270                            key: item.key,
    271271                            value: value,
    272                             object_types: preset.types.collect {it == TaggingPresetType.CLOSEDWAY ? "area" : it.toString().toLowerCase()},
    273272                    ]
     273                    def otypes = preset.types.collect {
     274                        it == TaggingPresetType.CLOSEDWAY ? "area" :
     275                            (it == TaggingPresetType.MULTIPOLYGON ? "relation" : it.toString().toLowerCase(Locale.ENGLISH))
     276                    }
     277                    if (!otypes.isEmpty()) tag += [object_types: otypes]
    274278                    if (addImages && preset.iconName) tag += [icon_url: find_image_url(preset.iconName)]
    275279                    tags += tag
     
    353357                contact_email: "josm-dev@openstreetmap.org",
    354358        ]
    355         json data_format: 1, data_updated: new Date().format("yyyyMMdd'T'hhmmssZ"), project: project, tags: tags
     359        json data_format: 1, data_updated: new Date().format("yyyyMMdd'T'hhmmss'Z'", TimeZone.getTimeZone('UTC')), project: project, tags: tags
    356360
    357361        if (output_file != null) {
Note: See TracChangeset for help on using the changeset viewer.