Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
the db or the excel-sheet has got the following categories -....
"tags": {
"addr:city": "Madrid",
"addr:housename": "Centro de Salud Cceres",
"addr:housenumber": "4",
"addrostcode": "28045",
"addr:street": "Calle de Cceres",
"amenity": "hospital",
"name": "Centro de Salud Cceres"
Quote:
{
"version": 0.6,
"generator": "Overpass API",
"osm3s": {
"timestamp_osm_base": "2015-09-12T18:28:02Z",
"timestamp_areas_base": "2015-09-11T13:16:03Z",
"copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
},
"elements": [
first of all - many many thanks for the quick answer.
i know php.... but i am no expert here... - unfortunatley...
I tried to extract some data from an .Osm File. -.-you can run a demo-command here at overpass turbo i want to store the data in a database - (or at least in an excel-file)
So I have - within an amount of xml-data - something like this:
So, the question is this: how can store all those values I tried to make some kind of foreach without sucess. And definitely I don't know why is suposse we have one Iteration that get all the values and why is not possible to store together.
Well i heard about that we can use SimpleXMLElement::xpath here to get all the values
and the corresponding values. For example :
question: how to use SimpleXMLElement::xpath here?
btw - you can run a demo-command here at overpass turbo
Code:
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“hospital in rome”
*/
[out:json][timeout:25];
// fetch area “” to search in
{{geocodeArea:rome}}->.searchArea;
// gather results
(
// query part for:rome “hospital”
node["amenity"="hospital"](area.searchArea);
way["amenity"="hospital"](area.searchArea);
relation["amenity"="hospital"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
then you get lots of results....
question: how to store those results in either excel or mysql?
hello dear Rinndalir
first of all - many many thanks for the quick answer.
i know php.... but i am no expert here... - unfortunatley...
I tried to extract some data from an .Osm File. -.-you can run a demo-command here at overpass turbo i want to store the data in a database - (or at least in an excel-file)
So I have - within an amount of xml-data - something like this:
then you get lots of results....question: how to store those results in either excel or mysql?
Since you've been working with PHP, MySQL,and XML data for OVER A YEAR NOW, and have been given much advice, whats the issue? Also, you've said previously that you "do lots of work with PHP" (post #3 here) http://www.linuxquestions.org/questi...db-4175506044/
You STILL DO NOT show any effort of your own...where is the code that YOU wrote???? You were pointed to the (very clear) documentation over a year ago....did you read it? What have you tried???
Read the "Question Guidelines" link in my posting signature. You appear to be wanting someone to give you a handout and fix your problem for you, rather than showing any effort of your own towards solving it. After a years worth of effort, and ample documentation available to you, why have you made no progress?
first of all - many many thanks for the quick answer.
i know php.... but i am no expert here... - unfortunatley...
First thing you need to understand and always live close to is this:
"Programmer traits:
Laziness
Hubris
Impatience"
In your case at least laziness may have kicked in, this is a good sign. Impatience may not have or you would have scoured the openstreetmap site looking for an excel export feature (a.k.a as CSV, hint-hint). Hubris is more advanced and so won't hold that against you at this point in time.
So it seems that, yes, there is an CSV export feature. Let us know if it works. Or if hubris kicks in just say heck with it and don't reply.
I am with the above posts. Some nearly 200 posts on LQ and you still do not seem to know how to ask a question properly OR show any sign that you are attempting to solve the problem yourself.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.