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

@ -166,7 +166,11 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher {
private readonly _radius: number
private readonly _panoramax: Panoramax
name: string = "panoramax"
public static readonly apiUrls: ReadonlyArray<string> = ["https://panoramax.openstreetmap.fr", "https://api.panoramax.xyz", "https://panoramax.mapcomplete.org"]
public static readonly apiUrls: ReadonlyArray<string> = [
"https://panoramax.openstreetmap.fr",
"https://api.panoramax.xyz",
"https://panoramax.mapcomplete.org",
]
constructor(url?: string, radius: number = 100) {
this._radius = radius
@ -286,7 +290,7 @@ class MapillaryFetcher implements ImageFetcher {
mapillary: img.id,
},
details: {
isSpherical: this._panoramas === "only"
isSpherical: this._panoramas === "only",
},
})
}
@ -298,10 +302,12 @@ type P4CService = (typeof P4CImageFetcher.services)[number]
export class CombinedFetcher {
private readonly sources: ReadonlyArray<CachedFetcher>
public static apiUrls = [...P4CImageFetcher.apiUrls,
Imgur.apiUrl, ...Imgur.supportingUrls,
public static apiUrls = [
...P4CImageFetcher.apiUrls,
Imgur.apiUrl,
...Imgur.supportingUrls,
...MapillaryFetcher.apiUrls,
...ImagesFromPanoramaxFetcher.apiUrls
...ImagesFromPanoramaxFetcher.apiUrls,
]
constructor(radius: number, maxage: Date, indexedFeatures: IndexedFeatureSource) {
@ -313,14 +319,15 @@ export class CombinedFetcher {
new MapillaryFetcher({
max_images: 25,
start_captured_at: maxage,
panoramas: "only"
panoramas: "only",
}),
new MapillaryFetcher({
max_images: 25,
start_captured_at: maxage,
panoramas: "no"
}), new P4CImageFetcher("mapillary"),
new P4CImageFetcher("wikicommons")
panoramas: "no",
}),
new P4CImageFetcher("mapillary"),
new P4CImageFetcher("wikicommons"),
].map((f) => new CachedFetcher(f))
}