• dear friends,

    can we run this osm-command in wordpress and then show the results in

    a. a table and furthermore
    b. a map

    see here the code that retrieves data – POI-data:

    
    [out:csv(::id,::type,::lon, ::lat, "name","addr:postcode","addr:city","addr:street","addr:housenumber","contact:website"," contact:email=*")][timeout:600];
    
    nwr(around:10000,52.519664588, 13.407998368)["amenity"="hospital"];
    out center;
    /* more areas..*/
    nwr(around:10000,52.519664588, 13.407998368)["amenity"="schools"];
    out center;
    nwr(around:10000,52.519664588, 13.407998368)["amenity"="childcare"];
    out center;

    now i want to display this in wordprees – in a table

    
    @id	@type	@lon	@lat	name	addr:postcode	addr:city	addr:street	addr:housenumber	contact:website	 contact:email=*
    775745348	node	13.3640559	52.5037269	Evangelische Elisabeth Klinik	10785	Berlin	Lützowstra?e	24-26		
    1257340412	node	13.3717015	52.4778100	Klinik für Kinder- und Jugendmedizin						
    4610129	way	13.3703633	52.5554121	Jüdisches Krankenhaus Berlin	13347	Berlin	Heinz-Galinski-Stra?e	1		
    4637750	way	13.3752301	52.5573670	DRK Kliniken Berlin | Mitte						
    4750929	way	13.3428630	52.5421508	Charité Campus Virchow Klinikum						
    24054786	way	13.3967186	52.5260055	St. Hedwig-Krankenhaus	10115	Berlin	Gro?e Hamburger Stra?e	5-11	https://www.alexianer-berlin-hedwigkliniken.de/st_hedwig_krankenhaus	
    24931203	way	13.3713474	52.5356575	Bundeswehrkrankenhaus Berlin	10115	Berlin	Scharnhorststra?e	13		
    32424425	way	13.3465511	52.4620791	Auguste-Viktoria-Klinikum	12157	Berlin	Rubensstra?e	125		
    41447057	way	13.4297195	52.5406155	"Vivantes Klinikum im Friedrichshain, Standort Prenzlauer Berg"			Fr?belstra?e	15		
    46839073	way	13.4954295	52.5133024	Sana Klinikum Lichtenberg	10365	Berlin	Fanningerstra?e	32	https://www.sana-kl.de/	
    48992251	way	13.3902674	52.4590154	Vivantes Wenckebach-Klinikum	12099	Berlin	Wenckebachstra?e	23		
    49876720	way	13.5095722	52.5280791	Evangelisches Krankenhaus K?nigin Elisabeth Herzberge	10365	Berlin	Herzbergstra?e	79	https://www.keh-berlin.de/	
    53038853	way	13.2772940	52.5202588	DRK Kliniken Westend	14050	Berlin	Spandauer Damm	130		
    93478285	way	13.2814545	52.4792516	Klinik am Roseneck						
    99146927	way	13.4141205	52.5709842	Maria Heimsuchung Caritas Klinikum Pankow						
    114201147	way	13.2897238	52.5222616	Schlosspark-Klinik	14059	Berlin	Heubnerweg	2	https://www.schlosspark-klinik.de	
    119398219	way	13.3172076	52.4803471	Sankt Gertrauden-Krankenhaus	10713	Berlin	Paretzer Stra?e	12	https://www.sankt-gertrauden.de	
    132056990	way	13.2918016	52.4904830	Martin-Luther-Krankenhaus	14193	Berlin	Caspar-They?-Stra?e	27-31	https://www.pgdiakonie.de/martin-luther-krankenhaus	
    137033906	way	13.3637902	52.5545152	Evangelisches Geriatriezentrum Berlin	13347	Berlin	Reinickendorfer Stra?e	61		
    138144499	way	13.4578379	52.4343190	Ida-Wolff-Krankenhaus	12351	Berlin	Juchaczweg	21		
    138150297	way	13.4589236	52.4372389	Vivantes Klinikum - Neuk?lln	12351	Berlin	Rudower Stra?e	48		
    168967363	way	13.3729563	52.4781040	St. Joseph Krankenhaus	12101	Berlin	Wüsthoffstra?e	15		
    229099728	way	13.3297666	52.4896219	Friedrich von Bodelschwingh-Klinik						
    305989452	way	13.4085942	52.4939881	Vivantes Klinikum am Urban	10967	Berlin	Dieffenbachstra?e	1	https://www.vivantes.de/kau	
    326445437	way	13.3283008	52.5830005	Krankenhaus des Ma?regelvollzugs Berlin (KMV)	13403	Berlin	Olbendorfer Weg	70		
    326448280	way	13.3274384	52.5812119	Vivantes Humboldt-Klinikum - Standort Oranienburger Stra?e	13437	Berlin	Oranienburger Stra?e	285		
    378933899	way	13.4507369	52.5554951	Park Klinik Wei?ensee						
    391245035	way	13.3878055	52.5350773	Lazarus-Kranken- und Diakonissenhaus						
    567540939	way	13.4691308	52.5505504	Alexianer St. Joseph Krankenhaus Berlin-Wei?ensee						
    583306346	way	13.3778632	52.5257624	Charité Universit?tsmedizin Berlin						
    700483283	way	13.4394766	52.5255323	Klinikum im Friedrichshain	10249	Berlin	Landsberger Allee	49	https://www.vivantes.de/fuer-sie-vor-ort/klinikum-im-friedrichshain-landsberger-allee/	
    7715945	relation	13.3452165	52.5060328	Franziskus-Krankenhaus Berlin	10787	Berlin	Budapester Stra?e	15-19	https://www.franziskus-berlin.de	
    268915924	node	13.4471204	52.4737847	EKT - Puck e.V.	12055	Berlin	Zwiest?dter Stra?e	2		
    268915972	node	13.3388371	52.4715779	Kinderladen Trotzk?pfchen	12159	Berlin	Hedwigstra?e	12		
    268916030	node	13.4337990	52.4834020	Kinderladen Yong (EKT)	12043	Berlin	Donaustra?e	114		
    268916196	node	13.4264393	52.5348260	Ev. Kita Winsstra?e	10405	Berlin	Winsstra?e	24		
    268917015	node	13.4491094	52.4751110	Kita B?hmische Stra?e			B?hmische Stra?e	39		
    475325547	node	13.4340584	52.4608843	"Sprache verbindet e. V., Kita Kinderplaneten"	12347	Berlin	Germaniapromenade	8		
    489927889	node	13.3252488	52.5146307	Kita an der Technischen Universit?t Berlin	10587	Berlin	Marchstra?e	8		
    832835232	node	13.3659264	52.5536160	Umpa Lumpa	13347	Berlin	Reinickendorfer Stra?e	63		
    2285961891	node	13.3791987	52.4595639	Kita Tiponi II	12103	Berlin	Friedrich-Franz-Stra?e	39		
    2285962149	node	13.3822392	52.4569827	Kindergarten Krabbelk?fer	12103	Berlin	Burgemeisterstra?e	76		
    2641528075	node	13.4116452	52.5879864	Pankower Nest	13156	Berlin	Beuthstra?e	27 B		
    2821286100	node	13.4476531	52.4379625	Kita Erdm?nnchen I	12359	Berlin	Fritz-Reuter-Allee	173		
    2952352723	node	13.3583103	52.5737444	Kita Luftballon	13407	Berlin	Lindauer Allee	4		
    2952353394	node	13.3569877	52.5680837	Kita Die kleinen Füchse	13407	Berlin	Genfer Stra?e	33		
    3213713658	node	13.4242216	52.5175592	Kinderhaus Berlin-Mitte	10179	Berlin	Neue Blumenstra?e	22		
    3310059976	node	13.5175499	52.5704222	Leos Hütte	13059	Berlin	Grevesmühlener Stra?e	43		
    3602681045	node	13.4801226	52.5058318	Fine Turbine						
    4095932189	node	13.3568407	52.5524769	Kita Plapperfisch	13347	Berlin	Seestra?e	62		
    4139409989	node	13.3779418	52.5575415	Wir werden immer gr??er	13359	Berlin	Koloniestra?e	139		
    4223494992	node	13.4479672	52.5129132	Kita Playground	10243		Gubener Stra?e	51		
    4223507993	node	13.4511780	52.5125605	Kita Junior 1	10245		Grünberger Stra?e	26		
    4251827103	node	13.4627077	52.5179660	Kita Rumpelbande						
    4749562022	node	13.4262291	52.5697721	Kinderladen Sterntaler						
    4920611563	node	13.4967466	52.5089424	Kita Vitale Gro?stadtm?use III	10317	Berlin	Eitelstra?e	85		
    5233009250	node	13.3552120	52.5744560	Kita Kinderinsel Alt-Reinickendorf						
    5239562224	node	13.4615017	52.5187000	Kita Salabanda 24	10247	Berlin	B?nschstra?e	24		
    5407416269	node	13.3719986	52.4857096	Lok18						
    5436064207	node	13.4013844	52.5884009	Kindertagesst?tte Melodiekiste	13156	Berlin	Dietzgenstra?e	79		
    5983770228	node	13.4392656	52.4782552	Mosaikraupen						
    6111118987	node	13.4088191	52.5718191	Kita Pankepiraten	13187	Berlin	Ossietzkystra?e	6-8		
    6115240482	node	13.4137913	52.4888335	Kinder Werk Stadt	10967	Berlin	Fichtestra?e	19A		
    6123191672	node	13.3899883	52.5233753	"Kita an der Humboldt-Universit?t ""Die Lupe"""	10117	Berlin	Ziegelstra?e	5-9		
    6789165007	node	13.3715712	52.4898058	Kita am Gleis	10829	Berlin	Bautzener Stra?e	21		
    7095755744	node	13.4321168	52.5342616	Kita Schnick & Schnack	10407	Berlin	Pasteurstra?e	5		
    7683113440	node	13.4395800	52.4732269	Kita Paradiesv?gel						
    7746191694	node	13.3655333	52.5835082	Pankeb?ren						
    7746191886	node	13.3612696	52.5877593	Wilhelmsruher Kinder						
    7803708935	node	13.4275382	52.4636108							
    7803708937	node	13.4246786	52.4639442							
    29011904	way	13.3353154	52.5155285	Kita an der UdK und TU Berlin	10555	Berlin	Siegmunds Hof	17A		
    280344963	way	13.3360976	52.5254005	Spielplatz Ottopark	10555	Berlin	Alt-Moabit	34	https://moabiter-ratschlag.de/otto-spielplatz/	

    love to hear from you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    in what format is this data received?

    Thread Starter apolloman

    (@apolloman)

    hello dear Steven,

    first of all; many many thanks for the quick reply. Great to hear from you.

    the data is received in CSV – format

    it is runned by a request on https://www.overpass-turbo.eu
    see the demo code:

    
    [out:csv(::id,::type,::lon, ::lat, "name","addr:postcode","addr:city","addr:street","addr:housenumber","contact:website"," contact:email=*")][timeout:600];
    nwr(around:10000,52.519664588, 13.407998368)["amenity"="hospital"];
    out center;
    

    see below how the data looks like;

    
    @id	@type	@lon	@lat	name	addr:postcode	addr:city	addr:street	addr:housenumber	contact:website	 contact:email=*
    775745348	node	13.3640559	52.5037269	Evangelische Elisabeth Klinik	10785	Berlin	Lützowstra?e	24-26		
    1257340412	node	13.3717015	52.4778100	Klinik für Kinder- und Jugendmedizin						
    4610129	way	13.3703633	52.5554121	Jüdisches Krankenhaus Berlin	13347	Berlin	Heinz-Galinski-Stra?e	1		
    4637750	way	13.3752301	52.5573670	DRK Kliniken Berlin | Mitte						
    4750929	way	13.3428630	52.5421508	Charité Campus Virchow Klinikum						
    24054786	way	13.3967186	52.5260055	St. Hedwig-Krankenhaus	10115	Berlin	Gro?e Hamburger Stra?e	5-11	https://www.alexianer-berlin-hedwigkliniken.de/st_hedwig_krankenhaus	
    24931203	way	13.3713474	52.5356575	Bundeswehrkrankenhaus Berlin	10115	Berlin	Scharnhorststra?e	13		
    32424425	way	13.3465511	52.4620791	Auguste-Viktoria-Klinikum	12157	Berlin	Rubensstra?e	125		
    41447057	way	13.4297195	52.5406155	"Vivantes Klinikum im Friedrichshain, Standort Prenzlauer Berg"			Fr?belstra?e	15		
    46839073	way	13.4954295	52.5133024	Sana Klinikum Lichtenberg	10365	Berlin	Fanningerstra?e	32	https://www.sana-kl.de/	
    48992251	way	13.3902674	52.4590154	Vivantes Wenckebach-Klinikum	12099	Berlin	Wenckebachstra?e	23		
    49876720	way	13.5095722	52.5280791	Evangelisches Krankenhaus K?nigin Elisabeth Herzberge	10365	Berlin	Herzbergstra?e	79	https://www.keh-berlin.de/	
    53038853	way	13.2772940	52.5202588	DRK Kliniken Westend	14050	Berlin	Spandauer Damm	130		
    93478285	way	13.2814545	52.4792516	Klinik am Roseneck						
    99146927	way	13.4141205	52.5709842	Maria Heimsuchung Caritas Klinikum Pankow						
    114201147	way	13.2897238	52.5222616	Schlosspark-Klinik	14059	Berlin	Heubnerweg	2	https://www.schlosspark-klinik.de	
    119398219	way	13.3172076	52.4803471	Sankt Gertrauden-Krankenhaus	10713	Berlin	Paretzer Stra?e	12	https://www.sankt-gertrauden.de	
    132056990	way	13.2918016	52.4904830	Martin-Luther-Krankenhaus	14193	Berlin	Caspar-They?-Stra?e	27-31	https://www.pgdiakonie.de/martin-luther-krankenhaus	
    137033906	way	13.3637902	52.5545152	Evangelisches Geriatriezentrum Berlin	13347	Berlin	Reinickendorfer Stra?e	61		
    138144499	way	13.4578379	52.4343190	Ida-Wolff-Krankenhaus	12351	Berlin	Juchaczweg	21		
    138150297	way	13.4589236	52.4372389	Vivantes Klinikum - Neuk?lln	12351	Berlin	Rudower Stra?e	48		
    

    note there are many many cool plugins that support the integration of maps
    – see for a overview here https://www.ads-software.com/plugins/search/MAPS/
    and to integrats maps from the free opensource-project we also can use lots of great projects:

    a. https://www.ads-software.com/plugins/search/openstreetmap/
    b. https://www.ads-software.com/plugins/search/openstreetmap/page/2

    but i manly want to display the data in a table – not (only in a map). It should offer the site visitors a overview on the dataset.

    background: i am currently working on a project where i want to display POI Point of Interests to the visitors. well – it is a solution that could be done with openstreetmap instantly – it is a solution that delivers a distance Matrix to help users find nearby locations on an interactive …in other words: a solution that – discover the nearest entity ::

    so if the site visitors type a term like Munich or london or paris into the serarch-field then the nearby-search should provide
    results.. that are stored in a table.

    – btw: we have got some intersting tables and spreadsheet plugins .. see for example here:

    see a overview: https://de.www.ads-software.com/plugins/tags/spreadsheet/

    tablepress
    https://de.www.ads-software.com/plugins/tablepress/

    Data Tables Generator by Supsystic
    https://de.www.ads-software.com/plugins/data-tables-generator-by-supsystic/

    Inline Google Spreadsheet Viewer
    https://de.www.ads-software.com/plugins/inline-google-spreadsheet-viewer/

    Google Forms
    https://de.www.ads-software.com/plugins/wpgform/

    CSV Importer
    https://de.www.ads-software.com/plugins/csv-importer/

    perhaps one of the above mentioned plugins would fit here…

    So it is like this: I want to obtain the data via openstreetmap and saved it in a table
    – but of course I can also use MySQL or sqlite By the way: this should be used for a web application:

    so: if you have a point – so we take, for example, Berlin’s Aleanderplatz (which is quite very central in Berlin):

    DD COORDINATES; 52.519664588 13.407998368
    DMS COORDINATES; 52 ° 31'10.79 "N 13 ° 24'28.79" E

    the above I could also query data relating to the tables directly via the Overpass API:
    https://wiki.openstreetmap.org/wiki/Overpass_API
    At first I thought to work without the OSM map display and only allow a tabular search. The query via Overpass-Api could be in my opinion yes also set up and implemented directly in the web frontent.

    so – let’s say the tables are as follows:

    dataset_1_ Clinics / hospital (hosp)
    dataset_2_ Backeries

    Dear Steven – what do you suggest – how to do this display the data!?

    look forward to hear from you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘osm-command : showing results in table-view and Map’ is closed to new replies.