Add metadata in changeset with (binned) distance to changed feature

This commit is contained in:
Pieter Vander Vennet 2021-11-09 01:49:07 +01:00
parent e8ce53d5eb
commit 8e66313ef1
21 changed files with 178 additions and 41 deletions

View file

@ -8,6 +8,18 @@ import {ChangeDescription} from "./ChangeDescription";
export default abstract class OsmChangeAction {
private isUsed = false
public readonly trackStatistics: boolean;
/**
* The ID of the object that is the center of this change.
* Null if the action creates a new object
* Undefined if such an id does not make sense
*/
public readonly mainObjectId: string;
constructor(mainObjectId: string, trackStatistics: boolean = true) {
this.trackStatistics = trackStatistics;
this.mainObjectId = mainObjectId
}
public Perform(changes: Changes) {
if (this.isUsed) {
@ -18,6 +30,4 @@ export default abstract class OsmChangeAction {
}
protected abstract CreateChangeDescriptions(changes: Changes): Promise<ChangeDescription[]>
}