Modify

Opened 2 years ago

Closed 2 years ago

#7505 closed enhancement (fixed)

OSM API changes caused by license change

Reported by: Don-vip Owned by: team
Priority: major Milestone:
Component: Core Version:
Keywords: api, license, history, changeset Cc:

Description

Frederik has written a wiki page concerning OSM API changes that will occur during license change process:

http://wiki.openstreetmap.org/wiki/Open_Database_License/Changes_in_the_API

These changes will impact JOSM at least in history handling and osmChange parsing.

Attachments (2)

redaction.png (45.8 KB) - added by Don-vip 2 years ago.
redaction_unknown_version.png (14.1 KB) - added by Don-vip 2 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 follow-up: Changed 2 years ago by bastiK

Does JOSM's history dialog work when versions are missing?

comment:2 follow-up: Changed 2 years ago by skyper

What about undelete and reverter plugins ?

comment:4 in reply to: ↑ 1 Changed 2 years ago by bastiK

Replying to bastiK:

Does JOSM's history dialog work when versions are missing?

I've tested this and is seems to work.

(The following node.js script can be used as API dummy. You need a file 'capabilities' and 'hist.osm' in current folder. It serves capabilities for http://127.0.0.1:8125/capabilities and hist.osm for all other requests.

var http = require('http');
var fs = require('fs');

http.createServer(function (request, response) {

    console.log("request:", request.url);

    var file = request.url == '/capabilities' ? './capabilities' : './hist.osm';
    fs.readFile(file, function(error, content) {
        if (error) {
            response.writeHead(500);
            response.end();
        }
        else {
            response.writeHead(200, { 'Content-Type': 'text/html' });
            response.end(content, 'utf-8');
        }
    });

}).listen(8125);

console.log('Server running at http://127.0.0.1:8125/');

)

comment:5 in reply to: ↑ 2 Changed 2 years ago by bastiK

Replying to skyper:

What about undelete and reverter plugins ?

Should work unless your revert involves any hidden versions. In this case it must fail anyway.

comment:6 Changed 2 years ago by Don-vip

In 5332/josm:

see #7505, see #7847 - Handle deleted nodes without coordinates in dataset consistency test due to recent API change

Changed 2 years ago by Don-vip

comment:8 Changed 2 years ago by Don-vip

In 5333/josm:

see #7505, see #7847 - Nodes without coordinates in dataset consistency test: use of isVisible() rather than !isDeleted() to raise the issue if null coordinates are found with a node not yet deleted on server

comment:9 Changed 2 years ago by Don-vip

In 5334/josm:

see #7505, see #7847 - Handle deleted nodes without coordinates in GeoJSON export (fix NPE)

Changed 2 years ago by Don-vip

comment:10 Changed 2 years ago by Don-vip

There's some work to do when working with .osm files containing primitives that have been redacted meanwhile. Taking again the previous node example, I have saved a copy and edited it to obtain a complete fake revision 2.
When loading this revision 2, it goes bad:


The versions are not correctly sorted.

Worst, if we click on this revision in columns A or B, these exceptions happen:

java.lang.IllegalArgumentException: Failed to set reference. Reference version 2 not available in history.
	at org.openstreetmap.josm.gui.history.HistoryBrowserModel.setReferencePointInTime(HistoryBrowserModel.java:305)
	at org.openstreetmap.josm.gui.history.HistoryBrowserModel$VersionTableModel.setReferencePointInTime(HistoryBrowserModel.java:476)
	at org.openstreetmap.josm.gui.history.HistoryBrowserModel$VersionTableModel.setValueAt(HistoryBrowserModel.java:456)
	at javax.swing.JTable.setValueAt(Unknown Source)
	at javax.swing.JTable.editingStopped(Unknown Source)
	at javax.swing.AbstractCellEditor.fireEditingStopped(Unknown Source)
	at org.openstreetmap.josm.gui.history.VersionTable$RadioButtonEditor.itemStateChanged(VersionTable.java:194)
java.lang.IllegalArgumentException: Failed to set current primitive. Current version 2 not available in history.
	at org.openstreetmap.josm.gui.history.HistoryBrowserModel.setCurrentPointInTime(HistoryBrowserModel.java:335)
	at org.openstreetmap.josm.gui.history.HistoryBrowserModel$VersionTableModel.setCurrentPointInTime(HistoryBrowserModel.java:489)
	at org.openstreetmap.josm.gui.history.HistoryBrowserModel$VersionTableModel.setValueAt(HistoryBrowserModel.java:459)
	at javax.swing.JTable.setValueAt(Unknown Source)
	at javax.swing.JTable.editingStopped(Unknown Source)
	at javax.swing.AbstractCellEditor.fireEditingStopped(Unknown Source)
	at org.openstreetmap.josm.gui.history.VersionTable$RadioButtonEditor.itemStateChanged(VersionTable.java:194)
Last edited 2 years ago by Don-vip (previous) (diff)

comment:11 Changed 2 years ago by Don-vip

In 5339/josm:

see #7505 - Add toString() method on History objects to ease debugging

comment:12 Changed 2 years ago by Don-vip

In 5340/josm:

see #7505 - Hide redacted version in history browser when loading an .osm file containg primitives that have been redacted meanwhile

comment:13 Changed 2 years ago by anonymous

Ticket #7867 has been marked as a duplicate of this ticket.

comment:14 Changed 2 years ago by Don-vip

In 5346/josm:

fix #7867, see #7505, see #7847 - Handle deleted nodes without coordinates in history

comment:15 Changed 2 years ago by Don-vip

  • Resolution set to fixed
  • Status changed from new to closed

Should be OK as well. Reopen the ticket if I missed something.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.