How can I export or query all hospitals from Open Street Map?
I'd like to extract all the hospital locations in the from Open Street Map as a reference for my little geocoding project. I know how to get all the OSM data for a small area with the QGIS plugin but not sure how to query a larger area eg for the whole planet-file?
Some ideas:
The read-only Overpass API. I don't know that it'll work for the whole planet-file in one pass, but maybe if we extend the time out enough? For a smaller area and with the benefit of a (minimal) UI, we can access Overpass via the XAPI Query Builder. There, we can put amenity=hospital in the tag search, select our area, and go.
Geofabrik downloads, filtered with Osmosis, as described in How to extract partial data for large regions? on the OpenStreetMap Help.
What about using healthsites.io: regarding healthsites this is the most important link: https://healthsites.io/api/docs can i use healthsites.io for my project!?
I want to maintain the dataset in a PostgreSQL db.
update: btw: when trying to get the data from overpass-turbo i get somewhat full set of POI data
[out:csv(::id,::type,"name","addr:postcode","addr:city","addr:street","addr:housenumber","website"," contact:email=*")][timeout:600];
area["ISO3166-1"="AT"]->.a;
( node(area.a)[amenity=hospital];
way(area.a)[amenity=hospital];
rel(area.a)[amenity=hospital];);
out;
see the results:
@id @type name addr:postcode addr:city addr:street addr:housenumber website contact:email=*
2656877 relation Unfallkrankenhaus Lorenz Böhler 1200 Wien Donaueschingenstraße 13 https://www.auva.at/ukhboehler/
2685003 relation Landeskrankenhaus Hörgas-Enzenbach http://www.lkh-hoergas.at
2685004 relation Landeskrankenhaus Judenburg-Knittelfeld http://www.lkh-judenburg.at
2685005 relation Landeskrankenhaus Hochsteiermark http://www.lkh-hochsteiermark.at
2685006 relation Landeskrankenhaus Mürzzuschlag-Mariazell http://www.lkh-muerzzuschlag.at
2685007 relation Landeskrankenhaus Rottenmann-Bad Aussee http://www.lkh-rottenmann.at
2755244 relation Landesklinikum Scheibbs 3270 Scheibbs Feldgasse 26
2764083 relation Allgemeines Krankenhaus Wien 1090 Wien Währinger Gürtel 18-20 https://www.akhwien.at
2882269 relation Unfallkrankenhaus Salzburg http://www.ukh-salzburg.at
3333391 relation Krankenhaus St. Josef 5280 Braunau am Inn Ringstraße 60 https://www.khbr.at/
4460484 relation Landeskrankenhaus Graz II http://www.lkh-graz-sw.at
6704364 relation Landesklinikum Neunkirchen Peischingerstraße 19 https://www.neunkirchen.lknoe.at/
9522773 relation Krankenhaus der Barmherzigen Brüder 7000 Eisenstadt Esterhazystraße 26
11077211 relation "Landeskrankenhaus Murtal, Standort Stolzalpe Haus 1" 8852 Stolzalpe Stolzalpe 38 https://www.lkh-murtal.at/
or to take a second example:
30850910 way Hôpital Nord Guillaume et René Laennec 44093 Nantes Cedex 1 Bd professeur Jacques-Monod - Saint-Herblain https://www.chu-nantes.fr/
30979413 way Hôpital Albert Chenevier 94010 Créteil rue de Mesly 40 http://chu-mondor.aphp.fr/hopital-albert-chenevier1/
31150222 way Centre de Psychiatrie Les Tournesols
31150223 way Clinique du Saint-Coeur http://www.saint-coeur.groupe-elsan.com/
31252310 way Hôpital Avicenne http://chu93.aphp.fr/hopital-avicenne-bobigny/
32229408 way Centre hospitalier du Rouvray 76300 Sotteville-lès-Rouen Rue Paul Éluard 4 www.ch-lerouvray.fr
32354044 way Centre hospitalier intercommunal Fréjus Saint-Raphaël https://www.chi-fsr.fr/
32388820 way Clinique des Cèdres https://clinique-cedres.capio.fr/
32471086 way Hôpital Saint-Jacques
32522247 way Centre hospitalier de Dieppe 76200 Dieppe Avenue Pasteur http://www.ch-dieppe.fr
32617022 way Hôpital Désandrouins 55100 Verdun Avenue d'Étain
32679701 way Hôpital Belle-Isle https://www.hpmetz.fr/fr/etablissement/hopital-belle-isle
32851894 way Clinique d'Occitanie 31600 Muret Avenue Bernard IV 20 http://www.clinique-occitanie.com/
32940084 way Centre hospitalier de Longjumeau http://www.gh-nord-essonne.fr/accueil.aspx
33061296 way Clinique de l'Yvette
33533346 way Hôpital privé de l'Est Lyonnais https://hpel.fr/
33624453 way Clinique de l'Union https://clinique-union-toulouse.ramsaygds.fr/
33639902 way Hôpital du Hasenrain
33826818 way Hôpital du Croisic
33889337 way Centre Hospitalier Guy Thomas http://ch-riom.fr/
33916780 way Hôpital Émile Muller
34426829 way Centre hospitalier de Pau https://www.ch-pau.fr/
34428388 way Clinique Princess http://www.clinique-princess.com/
34428389 way Centre Hospitalier Spécialisé des Pyrénées
34478129 way Pôle Santé République http://www.psr.groupe-elsan.com/
34571025 way Centre hospitalier d'Albi http://www.ch-albi.fr/
34965024 way Hôpital de la Conception http://fr.ap-hm.fr/nos-hopitaux/hopital-de-la-conception
35049042 way Hôpital Simone Veil https://www.hopital-simoneveil.fr/
35051383 way Centre hospitalier intercommunal André Grégoire http://www.chi-andre-gregoire.fr/
35539378 way Hôpital Jean Verdier http://chu93.aphp.fr/hopital-jean-verdier-bondy/
36787144 way Centre hospitalier de Die http://www.ch-die.fr/
36894682 way Hopital Beaujon 92110 Clichy Boulevard du Général Leclerc 100 http://hupnvs.aphp.fr/beaujon/
36962284 way Centre Hospitalier de Pfastatt
37097582 way Centre hospitalier Comminges Pyrénées http://www.ch-saintgaudens.fr/chcp17/index.php/fr/
37099012 way Hôpital d'Instruction des Armées Bégin
37108859 way Centre hospitalier Comminges Pyrénées 31800 Saint-Gaudens Boulevard d'Encore 21
37135205 way Centre hospitalier de Pontarlier http://pontarlier-hopital.chi-hautecomte.fr/
37216610 way Centre hospitalier http://www.ch-chateauroux.fr/
37678740 way Clinique du Château http://www.clinique-garches.com/
37836452 way Centre de Gérontologie et d'Accueil Spécialisé Philippe Dugué http://www.hgchevreuse.fr/
38072526 way Hôpital Bichat-Claude Bernard http://hupnvs.aphp.fr/
38076764 way Clinique du Château de Florans
38237520 way Centre Hospitalier Intercommunal des Alpes du Sud http://www.chicas-gap.fr
38237900 way Centre psychothérapique Camille Claudel
38480566 way Centre hospitalier de Béziers Rue Valentin Haüy 2 http://www.ch-beziers.fr
38496996 way Centre hospitalier intercommunal de Cornouaille 29000 Quimper Avenue Yves Thépot 14 https://www.ch-cornouaille.fr/
38496997 way Polyclinique Quimper-Sud Quimper Rue Gustave Flaubert http://quimper-sud.clinique-quimper.fr/fr
38568780 way Centre Cardiologique d'Évecquemont
38701149 way Centre Hospitalier de Chauny
38867555 way Centre hospitalier Eure-Seine 27200 Vernon Rue du Docteur Burnet 5 http://www.chi-eureseine.fr
38918952 way Centre hospitalier de Hyères Boulevard du Maréchal Juin 579 http://www.ch-hyeres.fr
39215839 way Centre hospitalier de Saint-Affrique http://ch-saintaffrique.fr/
39255826 way Hôpital de Prades
39489000 way Clinique de Girardin
39536410 way Centre hospitalier intercommunal de Poissy http://www.chi-poissy-st-germain.fr/fr/Page-d-accueil-167.html
39947896 way Clinique Saint-Louis
40199116 way Clinique Notre-Dame
40282457 way Hôpital Delafontaine http://www.ch-stdenis.fr
40283884 way Centre hospitalier Jacques Lacarin 03200 Vichy Boulevard Denière 1 http://www.ch-vichy.fr/
40358353 way Clinique Sainte-Marguerite
40467444 way Clinique Villa Magali
40503994 way Clinique Générale http://www.clinique-generale.net/fr/documents/p_accueil.html
40593554 way Clinique Sainte-Marie https://chpsaintemarie.fr/le-chp/pole-sante-osny/
40610772 way Hôpital du Porzou http://www.ch-cornouaille.fr/ch-quimper-concarneau/infos-pratiques/plan-dacces/concarneau-site-du-porzou
40667164 way Hôpital Civil 67091 Strasbourg Place de l'Hôpital 1 http://www.chru-strasbourg.fr/index.php
40686020 way Centre de Soins et d'Accompagnement et de Prévention en Addictologie
if you look here - this is much much more incomplete
https://healthsites.io/map#!/locality/node/4777740642
no complete adress - no website etc. etx.
conclusio: should i stick to a request with overpass-turbo.eu - is this more appropiate?!