Dear readers,
After a long time, I started using osmfilter+osmconvert again. Sadly the filtered planet output is only correct for the first about 6k entries, but behind it contains only wrong (already deleted) entries.
Short: download planet, convert to o5m, filter place=, and check output (.osm or .csv by editor), and see only strange ids after some point.
Hint: if output is CSV, then entries exist with printed tags, but id+lat+lon is printed wrong !
wget https://ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/pbf/planet-241104.osm.pbf
# apt install : osmfilter 1.4.4, osmconvert 0.8.10
# build .c : osmfilter 1.4.6, osmconvert 0.8.11 # only for comparison
osmconvert planet-241104.osm.pbf -o=planet.o5m
ls -lh planet* # pbf = 78GB, o5m = 168 GB
inxi # Ubuntu 24.04, Kernel: 6.8.0-48-generic x86_64
osmfilter planet.o5m --keep="place=state or place=city" --drop-ways --drop-relations -o=state_nd.osm
# same issue without drop ways+rela and -o=file.o5m
osmconvert state_nd.o5m --all-to-nodes --csv="@id @lon @lat place name" --csv-headline -o=eur_place.csv
@id @lat @lon ISO3166-2 place capital population name name:en
313872884 46.9796562 9.1088120 state Glarus # ok
3289105152 0.2991701 212.5869485 city 5 20000 Gampaha Gampaha # wrong, see deleted, https://www.openstreetmap.org/node/3289105152
Any ideas? (ps: Ubuntu is using versions some years behind)
Thanks, Alex