landkreise

This commit is contained in:
2019-01-22 16:26:14 +01:00
parent 78c58330c7
commit 87d6e0960f
13 changed files with 1216633 additions and 2 deletions

24
additional/remove-l5.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
jq -c 'def walk(f):
. as $in
| if type == "object" then
reduce keys[] as $key
( {}; . + { ($key): ($in[$key] | walk(f)) } ) | f
elif type == "array" then map( walk(f) ) | f
else f
end;
def mapper(f):
if type == "array" then map(f)
elif type == "object" then
. as $in
| reduce keys[] as $key
({};
[$in[$key] | f ] as $value
| if $value | length == 0 then .
else . + {($key): $value[0]} end)
else .
end;
walk( mapper(select((type == "object" and .properties.admin_level == "5") | not)) )' < Germany_AL4-AL6.GeoJson > G4+6.geojson