forked from MapComplete/MapComplete
Velopark: some improvements to the scripts
This commit is contained in:
parent
996a08e8d8
commit
48b35f5616
4 changed files with 104 additions and 53 deletions
|
@ -316,14 +316,16 @@ export default class LinkedDataLoader {
|
|||
input: Record<string, Set<string>>
|
||||
): Record<string, string[]> {
|
||||
const output: Record<string, string[]> = {}
|
||||
console.log("Input for patchVelopark:", input)
|
||||
for (const k in input) {
|
||||
output[k] = Array.from(input[k])
|
||||
}
|
||||
|
||||
if (output["type"][0] === "https://data.velopark.be/openvelopark/terms#BicycleLocker") {
|
||||
if (output["type"]?.[0] === "https://data.velopark.be/openvelopark/terms#BicycleLocker") {
|
||||
output["bicycle_parking"] = ["lockers"]
|
||||
}
|
||||
if(output["type"] === undefined){
|
||||
console.error("No type given for", output)
|
||||
}
|
||||
delete output["type"]
|
||||
|
||||
function on(key: string, applyF: (s: string) => string) {
|
||||
|
@ -506,7 +508,6 @@ export default class LinkedDataLoader {
|
|||
" ?parking a <http://schema.mobivoc.org/BicycleParkingStation>",
|
||||
"?parking " + property + " " + (variable ?? "")
|
||||
)
|
||||
console.log("Fetching a velopark property gave", property, results)
|
||||
return results
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue