chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2025-04-15 18:18:44 +02:00
parent 79b6927b56
commit 42ded4c1b1
328 changed files with 4062 additions and 1284 deletions

View file

@ -15,50 +15,34 @@ import { writeFileSync } from "fs"
import { Feature } from "geojson"
class RepairPanoramax extends Script {
private static readonly europe: Feature = {
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
private static readonly europe: Feature = {
type: "Feature",
properties: {},
geometry: {
coordinates: [
[
[
-20.091159690050006,
25.773375277790038
],
[
46.12276429398841,
25.773375277790038
],
[
46.12276429398841,
65.41389761819318
],
[
-20.091159690050006,
65.41389761819318
],
[
-20.091159690050006,
25.773375277790038
]
]
[-20.091159690050006, 25.773375277790038],
[46.12276429398841, 25.773375277790038],
[46.12276429398841, 65.41389761819318],
[-20.091159690050006, 65.41389761819318],
[-20.091159690050006, 25.773375277790038],
],
],
"type": "Polygon"
}
type: "Polygon",
},
}
constructor() {
super("See https://source.mapcomplete.org/MapComplete/MapComplete/issues/2372\n" +
"We accidentally added the full image URL instead of the hash due to a bug. This scripts rewrites all")
super(
"See https://source.mapcomplete.org/MapComplete/MapComplete/issues/2372\n" +
"We accidentally added the full image URL instead of the hash due to a bug. This scripts rewrites all"
)
}
async main(args: string[]): Promise<void> {
const keys = ["panoramax", ...Utils.TimesT(10, i => "panoramax:" + i)]
const keys = ["panoramax", ...Utils.TimesT(10, (i) => "panoramax:" + i)]
const overpass = new Overpass(
new Or(
keys.map(k => new RegexTag(k, /^https:\/\/panoramax.mapcomplete.org\/.*/))
),
new Or(keys.map((k) => new RegexTag(k, /^https:\/\/panoramax.mapcomplete.org\/.*/))),
[],
Constants.defaultOverpassUrls[0],
new ImmutableStore(500)
@ -99,7 +83,7 @@ class RepairPanoramax extends Script {
f.properties,
{
theme: "fix",
changeType: "fix"
changeType: "fix",
}
)
allChanges.push(change)