17 lines
571 B
JavaScript
17 lines
571 B
JavaScript
const fs = require('fs');
|
|
|
|
async function listNutzart() {
|
|
const data = JSON.parse(fs.readFileSync('Geodaten/project.json', 'utf8'));
|
|
const nutzarten = new Set();
|
|
if (data.usage && data.usage.features) {
|
|
data.usage.features.forEach(f => {
|
|
const type = f.properties.nutzart || f.properties.NUTZART || '';
|
|
if (type) nutzarten.add(type);
|
|
});
|
|
}
|
|
console.log("Unique Nutzarten in project.json:");
|
|
Array.from(nutzarten).sort().forEach(t => console.log("- " + t));
|
|
}
|
|
|
|
listNutzart().catch(err => console.error(err));
|