forked from MapComplete/MapComplete
Scripts: add script to fix panoramax-hashes; see #2372
This commit is contained in:
parent
1493c00edf
commit
c4f0e18b9e
3 changed files with 153 additions and 10 deletions
|
|
@ -3,10 +3,10 @@ import { Utils } from "../../Utils"
|
|||
import { ImmutableStore, Store } from "../UIEventSource"
|
||||
import { BBox } from "../BBox"
|
||||
import osmtogeojson from "osmtogeojson"
|
||||
import { FeatureCollection } from "@turf/turf"
|
||||
import { Geometry } from "geojson"
|
||||
import { FeatureCollection, Geometry } from "geojson"
|
||||
import { OsmTags } from "../../Models/OsmFeature"
|
||||
;("use strict")
|
||||
|
||||
("use strict")
|
||||
/**
|
||||
* Interfaces overpass to get all the latest data
|
||||
*/
|
||||
|
|
@ -64,14 +64,14 @@ export class Overpass {
|
|||
elements: []
|
||||
remark
|
||||
osm3s: { timestamp_osm_base: string }
|
||||
}>(this.buildUrl(query))
|
||||
}>(this.buildUrl(query), {})
|
||||
|
||||
if (json.elements.length === 0 && json.remark !== undefined) {
|
||||
console.warn("Timeout or other runtime error while querying overpass", json.remark)
|
||||
throw `Runtime error (timeout or similar)${json.remark}`
|
||||
}
|
||||
if (json.elements.length === 0) {
|
||||
console.warn("No features for", json)
|
||||
console.warn("No features for", this.buildUrl(query))
|
||||
}
|
||||
|
||||
const geojson = <FeatureCollection<Geometry, OsmTags>>osmtogeojson(json)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue