Jump to content

creating tables in php leads to errors in phpmyadmin....


Recommended Posts

hello Jaques1

 

 - just again farom this lovley internet-cafe in southern-spain .,...

 

 

thanks for clearing up.

 

you set my thouthgs straingth - i want to gather data from openstreetmap..

 

Again many many thanks for this great asset of db-knowledge. <

 

 

i think that i can go with the fixed solution - and this will fit all the needs.

 

if there is no result - i.e. no value for a specific tag then there is null in DB..

 

that is no problem for me - so it goes well if i go with the data...

 

 

many greetings

 

guess that the main questions of this thread are answerd

many many tahnks for all the help...!!

 

matz

 

 

 

some addtional notes:

 

some examples.: btw: the key question is, how can we write the request: that takes up the adress-tags correctly: http://wiki.openstreetmap.org/wiki/Key:addr  while trying to gather information about european schools - note i try it with different approaches with the target-goal to gather

name
adress
long
lat
and town, street, housenumber information
and then - if possible website -adress
 and if there are some more tags available then these too.

so - as you Jaques1 mentioned - i go with the fixed db sheme and will catch as much as i can.

in oother words - i will create a table with maxiumum of the tag/value combinations - in order to catch all ....

 

 

spain: 10000 Records

wget http://download.geofabrik.de/europe/spain-latest.osm.pbf
./osmconvert spain-latest.osm.pbf -o=spain.o5m
./osmfilter spain.o5m --keep="amenity=school" -o=spain-schools.o5m
./osmconvert spain-schools.o5m --all-to-nodes -o=spain-schools_nodes.o5m
./osmfilter spain-schools_nodes.o5m --keep="amenity=school" -o=spain-schools-results.o5m
./osmconvert spain-schools-results.o5m --csv="name addr:city website" -o=spain-schools-results.csv

many many greetings for all

 

matzh

Edited by Maze

hello jazzmann hello jaques1 hello all

 

 

many thanks @ jazzmann for the hint - yes youre right - this hint was given by barand

 

he said: Instead of hard-coding the required column names as in

$fields = array('id','lat','lon','name','amenity','operator','vending');

and continued ..... you could use this to pick up any additional columns added to your pois  table

$sql = "SHOW COLUMNS FROM pois";
$fields = array();
$res = $db->query($sql);
while ($row = $res->fetch_row()) {
$fields[] = $row[0];
}

i think that this does the trick..

 

gizmola - gae osome hints and ideas regarding mongodb:

well i do not know mongodb but i guess that barands hints were solving the issues.

 

many many thanks for all your contineued help and your supportive way of inspiring me.

 

this forum is great - and you helped me quite alot!!!

 

greetings

matz

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.