forked from MapComplete/MapComplete
Bug fixes with preprocessing; add streetwidth map
This commit is contained in:
parent
c5b9e66bd2
commit
636bad97b3
15 changed files with 13279 additions and 41 deletions
|
@ -25,6 +25,10 @@ export class Regex extends TagsFilter {
|
|||
}
|
||||
|
||||
matches(tags: { k: string; v: string }[]): boolean {
|
||||
if(!(tags instanceof Array)){
|
||||
throw "You used 'matches' on something that is not a list. Did you mean to use 'matchesProperties'?"
|
||||
}
|
||||
|
||||
for (const tag of tags) {
|
||||
if (tag.k === this._k) {
|
||||
if (tag.v === "") {
|
||||
|
@ -201,6 +205,28 @@ export class And extends TagsFilter {
|
|||
}
|
||||
}
|
||||
|
||||
export class Not extends TagsFilter{
|
||||
private not: TagsFilter;
|
||||
|
||||
constructor(not: TagsFilter) {
|
||||
super();
|
||||
this.not = not;
|
||||
}
|
||||
|
||||
asOverpass(): string[] {
|
||||
throw "Not supported yet"
|
||||
}
|
||||
|
||||
matches(tags: { k: string; v: string }[]): boolean {
|
||||
return !this.not.matches(tags);
|
||||
}
|
||||
|
||||
substituteValues(tags: any): TagsFilter {
|
||||
return new Not(this.not.substituteValues(tags));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export class TagUtils {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue