-
Notifications
You must be signed in to change notification settings - Fork 1
/
4_process-3d_vegetation.js
executable file
·63 lines (55 loc) · 1.11 KB
/
4_process-3d_vegetation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env node
'use strict'
const { processAlkis } = require('../lib/geohelper.js');
let getType = initLookup();
processAlkis({
slug: 'vegetationsflaeche',
ruleTypes: 'wald'.split(','),
cbFeature: feature => {
let type = getType.get(feature.properties.klasse);
if (type === undefined) throw Error(`Klasse "${feature.properties.klasse}" unbekannt`);
return type;
}
})
function initLookup() {
let lookup = new Map();
[
'Baumbestand, Laub- und Nadelholz',
'Baumbestand, Laubholz',
'Baumbestand, Nadelholz',
'Baumschule',
'Bewuchs, Gehölz',
'Eis, Firn',
'Fels',
'Gartenland',
'Gebüsch',
'Gehölz',
'Geröll',
'Gras',
'Grünland',
'Hecke',
'Heide',
'Hopfen',
'Landwirtschaft',
'Laub- und Nadelholz',
'Laubbaum',
'Laubholz',
'Moor',
'Nadelholz',
'Obstplantage',
'Röhricht, Schilf',
'Sand',
'Schneise',
'Steine, Schotter',
'Streuobst',
'Streuobstacker',
'Streuobstwiese',
'Sumpf',
'Vegetationslose Fläche',
'Vegetationsmerkmal',
'Wald',
'Weingarten',
].forEach(label => lookup.set(label, false))
lookup.set('Wald', 'wald');
return lookup
}