Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14704 closed enhancement (fixed)

Add possibility to export validator warnings and errors

Reported by: Polyglot Owned by: team
Priority: normal Milestone: 17.08
Component: Core validator Version:
Keywords: export json xml osmose Cc: giackserva

Description

It would be nice if it were possible to export validator warnings to a JSON file. I would like to be able to use them on a web site for a specific dataset (In my case all public transport data for Belgium).

Attachments (0)

Change History (19)

comment:1 Changed 3 years ago by Don-vip

Keywords: json export added

comment:3 Changed 3 years ago by Don-vip

Cc: giackserva added
Keywords: xml csv added

See #15182

@giackserva: did you work on the subject, as originally planned on the wiki?

comment:4 Changed 3 years ago by Polyglot

We had quite a few other features Giacomo worked on, that were more directly useful for the mappers.

comment:5 Changed 3 years ago by Don-vip

ok no problem :) that's rather a core feature anyway.

comment:6 Changed 3 years ago by Don-vip

Osmose has already a file format we can reuse/extend. Maybe this could lead to future interoperability :)

comment:7 Changed 3 years ago by Don-vip

Keywords: osmose added

comment:8 Changed 3 years ago by Don-vip

Keywords: csv removed
Summary: Add possibility to export validator warnings and errors as JSONAdd possibility to export validator warnings and errors as JSON/XML

comment:9 Changed 3 years ago by Don-vip

Milestone: 17.08

comment:10 Changed 3 years ago by Don-vip

Summary: Add possibility to export validator warnings and errors as JSON/XMLAdd possibility to export validator warnings and errors

comment:11 Changed 3 years ago by Don-vip

In 12667/josm:

see #14704 - allow to export validator errors ("Save as" in validator layer contextual menu). Same format than Osmose

comment:12 Changed 3 years ago by Don-vip

In 12668/josm:

see #14704 - PMD

comment:13 Changed 3 years ago by Klumbumbus

Produces e.g.

    <error class="2">
      <location lat="50.6996597" lon="12.8487661">
  <node id='3302732733' timestamp='2015-01-21T17:19:44Z' uid='550300' user='Klumbumbus' visible='true' version='1' changeset='28310606' lat='50.6996597' lon='12.8487661'>
    <tag k='addr:city' v='Thalheim/Erzgebirge' />
    <tag k='addr:country' v='DE' />
    <tag k='addr:housenumber' v='1a' />
    <tag k='addr:postcode' v='09380' />
    <tag k='addr:street' v='Friedrichstraße' />
    <tag k='club' v='social' />
    <tag k='name' v='Teelicht' />
    <tag k='social_facility' v='outreach' />
    <tag k='website' v='http://www.teelicht-thalheim.de/' />
  </node>
      <text lang="de" value="Schlüssel "club" nicht in Vorlagen.">
    </error>

It seems the " in the text element produces an invalid xml file. The indentation looks weired too.

comment:14 Changed 3 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 12692/josm:

fix #14704 - properly encode strings

comment:15 Changed 3 years ago by Klumbumbus

one remaining problem :) the text element is not properly closed

    <error class='2'>
      <location lat='50.6996597' lon='12.8487661'>
  <node id='3302732733' timestamp='2015-01-21T17:19:44Z' uid='550300' user='Klumbumbus' visible='true' version='1' changeset='28310606' lat='50.6996597' lon='12.8487661'>
    <tag k='addr:city' v='Thalheim/Erzgebirge' />
    <tag k='addr:country' v='DE' />
    <tag k='addr:housenumber' v='1a' />
    <tag k='addr:postcode' v='09380' />
    <tag k='addr:street' v='Friedrichstraße' />
    <tag k='club' v='social' />
    <tag k='name' v='Teelicht' />
    <tag k='social_facility' v='outreach' />
    <tag k='website' v='http://www.teelicht-thalheim.de/' />
  </node>
      <text lang='de' value='Schlüssel &quot;club&quot; nicht in Vorlagen.'>
    </error>

comment:16 Changed 3 years ago by Don-vip

In 12698/josm:

see #14704 - fix xml tag

comment:17 Changed 3 years ago by Don-vip

thanks!

comment:18 Changed 3 years ago by Klumbumbus

I just noticed, there is the same problem for location too.

comment:19 Changed 3 years ago by Don-vip

In 12699/josm:

see #14704 - fix xml tag

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.