Hi,

with the license change we introduced the concept of "redacted" objects. Since "redacting" an old version touches that version in the database, initially such redactions made Osmosis issue diffs that contained that old version; we then introduced a quick fix to stop that:

https://github.com/openstreetmap/osmosis/blob/master/apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/impl/EntityDao.java#L450

We're now also using "redaction" to suppress objects where a copyright violation has occurred - but mistakes are possible, so we need to have a way to un-redact things if necessary, i.e. remove the "redaction_id" from a historic version again.

Simply setting the column to NULL will, again, make Osmosis issue a diff that contains the old version; this is unwanted.

How could we proceed?

Ideas:

1. Introduce special value "0" (not NULL) to denote an un-redacted object; leave Osmosis unchanged (so it treats NULL and 0 differently, will only issue .osc for objects with redaction_id=NULL), and modify other API code to treat 0 and NULL the same (so historic versions can be accessed through the API if redaction_id=NULL or 0). Cheap, easy, but a bit ugly.

2. Introduce an additional column "suppress_diff" to nodes/ways/relations tables; on un-redaction, set redaction_id=NULL and suppress_diff=TRUE; modify Osmosis by assing an "and not suppress_diff" to the SQL query. Would increase database size by something like 4 GB for the extra column.

3. Introduce an additional table "un-redacted objects", store object type, version, and id; when an object is un-redacted, add it to that table and clear the object's redaction_id, then modify the Osmosis query to only output objects that are not found in that table. Uses little space but makes diff creation slower.

There might be more...

Bye
Frederik

--
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"

_______________________________________________
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev

Reply via email to