Remove _referencing_ways from cache

This commit is contained in:
Pieter Vander Vennet 2023-02-06 22:23:56 +01:00
parent 1fb5c0f051
commit 70657161dc
2 changed files with 8 additions and 3 deletions

View file

@ -33,6 +33,10 @@ export class SimpleMetaTagger {
docs: {
keys: string[]
doc: string
/**
* Set this flag if the data is volatile or date-based.
* It'll _won't_ be cached in this case
*/
includesDates?: boolean
isLazy?: boolean
cleanupRetagger?: boolean
@ -118,7 +122,7 @@ export default class SimpleMetaTaggers {
/*Note: also called by 'UpdateTagsFromOsmAPI'*/
const tgs = feature.properties
let movedSomething = false;
let movedSomething = false
function move(src: string, target: string) {
if (tgs[src] === undefined) {
@ -492,6 +496,7 @@ export default class SimpleMetaTaggers {
{
keys: ["_referencing_ways"],
isLazy: true,
includesDates: true,
doc: "_referencing_ways contains - for a node - which ways use this this node as point in their geometry. ",
},
(feature, _, __, state) => {

View file

@ -78,13 +78,13 @@ function geoJsonName(targetDir: string, x: number, y: number, z: number): string
return targetDir + "_" + z + "_" + x + "_" + y + ".geojson"
}
/// Downloads the given feature and saves them to disk
/// Downloads the given tilerange from overpass and saves them to disk
async function downloadRaw(
targetdir: string,
r: TileRange,
theme: LayoutConfig,
relationTracker: RelationsTracker
) /* : {failed: number, skipped :number} */ {
): Promise<{ failed: number; skipped: number }> {
let downloaded = 0
let failed = 0
let skipped = 0