forked from MapComplete/MapComplete
Small (and rough) script to create some very specific changesets
This commit is contained in:
parent
7fd8361eea
commit
d29302ca84
2 changed files with 29 additions and 4 deletions
|
@ -115,6 +115,7 @@ export abstract class OsmObject {
|
|||
const rels = data.elements.map(wayInfo => {
|
||||
const rel = new OsmRelation(wayInfo.id)
|
||||
rel.LoadData(wayInfo)
|
||||
rel.SaveExtraData(wayInfo)
|
||||
return rel
|
||||
})
|
||||
relsSrc.setData(rels)
|
||||
|
@ -496,10 +497,13 @@ export class OsmRelation extends OsmObject {
|
|||
}
|
||||
|
||||
let tags = this.TagsXML();
|
||||
return ' <relation id="' + this.id + '" changeset="' + changesetId + '" ' + this.VersionXML() + '>\n' +
|
||||
members +
|
||||
tags +
|
||||
' </relation>\n';
|
||||
let cs = ""
|
||||
if(changesetId !== undefined){
|
||||
cs = `changeset="${changesetId}"`
|
||||
}
|
||||
return ` <relation id="${this.id}" ${cs} ${this.VersionXML()}>
|
||||
${members}${tags} </relation>
|
||||
`;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue