Opened 13 years ago
Closed 13 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)
Change History (17)
follow-up: 4 comment:1 by , 13 years ago
comment:3 by , 13 years ago
Another page to read:
http://www.osmfoundation.org/wiki/License/Rebuild_Plan
comment:4 by , 13 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/');
)
comment:5 by , 13 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.
by , 13 years ago
Attachment: | redaction.png added |
---|
comment:7 by , 13 years ago
OK, this looks good :) (http://www.openstreetmap.org/browse/node/311786538/history)
by , 13 years ago
Attachment: | redaction_unknown_version.png added |
---|
comment:10 by , 13 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 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)
comment:15 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Should be OK as well. Reopen the ticket if I missed something.
Does JOSM's history dialog work when versions are missing?