I already asked this here but I doubt I’ll get any response soon:
I converted the morocco-latest
PBF file from GeoFabrik to o5m using osmconvert. Then I ran the following two commands:
osmfilter --keep="boundary=administrative and admin_level=4" -o="AdminLevel4.osm" ..\morocco-latest.o5m
osmfilter --keep-ways="boundary=administrative and admin_level=4" -o="AdminLevel4Ways.osm" ..\morocco-latest.o5m
Surprisingly, AdminLevel4Ways.osm
is a lot larger than AdminLevel4.osm
. AdminLevel4Ways.osm
is 3.8G while AdminLevel4.osm
is 20.2M.
I was under the impression that all keep-ways
would do is to filter out only the ways which have tags of boundary=administrative
and admin_level=4
, and leave out the relations which would result in a smaller file.
Am I doing something wrong here? Is my understanding of how osmfilter does the filtering flawed? Is this a known bug?