Modify

Opened 12 years ago

Closed 12 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 12 years ago.
redaction_unknown_version.png (14.1 KB ) - added by Don-vip 12 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 by bastiK, 12 years ago

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

comment:2 by skyper, 12 years ago

What about undelete and reverter plugins ?

in reply to:  1 comment:4 by bastiK, 12 years ago

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/');

)

in reply to:  2 comment:5 by bastiK, 12 years ago

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 by Don-vip, 12 years ago

In 5332/josm:

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

by Don-vip, 12 years ago

Attachment: redaction.png added

comment:8 by Don-vip, 12 years ago

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 by Don-vip, 12 years ago

In 5334/josm:

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

by Don-vip, 12 years ago

comment:10 by Don-vip, 12 years ago

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 two different copies of it (one for revision 1, and another one for a complete fake revision 2.
When loading this revsion 2, it goes bad:


The versions are not correctly sorted.

Worst, if we click on this revision in column A, this exception happens:

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)
Version 1, edited 12 years ago by Don-vip (previous) (next) (diff)

comment:11 by Don-vip, 12 years ago

In 5339/josm:

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

comment:12 by Don-vip, 12 years ago

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 by anonymous, 12 years ago

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

comment:14 by Don-vip, 12 years ago

In 5346/josm:

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

comment:15 by Don-vip, 12 years ago

Resolution: fixed
Status: newclosed

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

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.