Download the whole planet dataset (~80 Gb)
curl -OL https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf
Using osmium tool filter amenity=toilets
nodes
osmium tags-filter planet-latest.osm.pbf n/amenity=toilets -o toilets.osm
Convert into json
osmium export toilets.osm --output-format=geojson -o toilets.geojson
Counting (~314k)
cat toilets.geojson | wc -l
Hypothetical example
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [98.765432, 12.345678]
},
"properties": {
"amenity": "toilets",
"access": "yes",
"opening_hours": "06:00-23:00",
"fee": "no",
"wheelchair": "limited",
"changing_table": "limited",
"toilets:disposal": "flush",
"toilets:position": "seated;urinal",
"male": "yes",
"female": "yes",
"unisex": "no",
"child": "yes",
"gender_segregated": "yes",
"drinking_water": "yes",
"indoor": "yes",
"name": "Central Park Restrooms",
"operator": "City Council",
"supervised": "no",
"description": "Public restrooms located in Central Park.",
"toilets:paper_supplied": "yes",
"toilets:hands_drying": "electric_hand_dryer",
"toilets:handwashing": "yes",
"handwashing:soap": "yes",
"handwashing:hand_disinfection": "yes",
"hot_water": "yes",
"shower": "no",
"toilets:menstrual_products": "limited"
}
}
Real life example
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
151.2964032,
-33.4344659
]
},
"properties": {
"access": "yes",
"addr:country": "AU",
"addr:housenumber": "6-8",
"addr:state": "NSW",
"addr:street": "Central Coast Highway",
"addr:suburb": "Kariong",
"amenity": "toilets",
"contact:website": "https://www.toiletmap.gov.au/37355",
"fee": "no",
"female": "yes",
"handwashing:soap": "yes",
"lit": "yes",
"male": "yes",
"name": "Public Toilet Shell Coles Express Kariong",
"opening_hours": "24/7",
"operator": "Shell Australia",
"operator:phone": "+61 3 9666 5444",
"operator:type": "private",
"operator:website": "https://www.shell.com",
"toilets:access": "yes",
"toilets:disposal": "flush",
"toilets:hands_drying": "electric_hand_dryer",
"toilets:handwashing": "yes",
"toilets:paper_supplied": "yes",
"toilets:position": "seated",
"toilets:wheelchair": "yes",
"website": "https://www.toiletmap.gov.au/37355",
"wheelchair": "yes"
}
}