[Maps-l] running tools on cassini / db / old-name

Peter Körner osm-lists at mazdermind.de
Fri Aug 14 08:06:11 UTC 2009


Hi

the outdated database makes the toolserver less useful to any tool out 
there (becouse it can't reflect changes easily). Do you have any plan 
when the main-db server could be up & running?

I think I can wait until it's done (and i know it's done when it's done 
:), but on the other hand i see the toolserver & it's ressources in 
place and i got a bunch of ideas to use it, but this will not be 
possible with an not updated db..

I wrote my scripts in php and it's accessing the database via the pg_* 
functions. This "import from postgis" is only run once to fetch the list 
of all countries. This list is then written so a mysql-db on sql, from 
where the scripts pull their information. The hourly update-process 
checks the nodes in the mysql-db against the api (as this is atm the 
only way to get up2date information).

I'm authenticating against the local postgresql-db with user gis and an 
empty password, the name of the db is gis. This information can be read 
from /sql/mapnik-stylesheets/osm-like/osm-de.xml by any toolserver-user, 
so i hope i'm not disclosing a secret..

You can get the source of my scripts here: 
http://cassini.toolserver.org/~mazder/multilingual-country-list/source.tar.bz2

As already pointed out, the httpd on cassini is looking for 
/home/*/osm_public_html.

I'll see if I can write this down into a usage-guide at the end of this 
weekend.

Peter

Tim Alder schrieb:
> Hello,
> the outdating is not so the problem for me because I only want to make 
> my first steps in postgres on this way (I hope I find time).
> For regular updating we should wait for our db-server.
> 
> But it would be nice if you can tell me how you contact the database, in 
> which language your scripts are and where they are.
> So why doesn't http://cassini.toolserver.org/~kolossos/osm work (PHP) if 
> it's fine on http://toolserver.org/~kolossos/osm ?
> 
> Greetings Kolossos
>  
> 
> 
> Peter Körner schrieb:
>> Tim Alder schrieb:
>>   
>>> Nice to see the tool of Peter Körner.
>>> So it seems possible to run scripts on cassini and connect to the 
>>> database (postgres or mysql?).
>>> Could somebody please document who it works.
>>> My trys to start my php-scripts from cassini and to start psql were 
>>> without success.
>>>
>>> I also want to develop a little text based tool that gives back all 
>>> street names in alphabetic order which are in a bbox or (more difficult) 
>>> in a way/relation.
>>> Such a street list is part of each paper city map and the streetnames 
>>> could be linked to things like Query-to-map.
>>>
>>> ----
>>>
>>> Whats the schedule for our database-server? The last date for start that 
>>> I know is beginning of august.
>>>
>>> ----
>>>
>>> A question to Avar: Would it be possible for you to rendering easily 
>>> also the name-variations?
>>> http://wiki.openstreetmap.org/wiki/Key:name#Key%20Variations
>>>
>>> We had a talk in Dresden that the "old-name"-tag would be interesting, 
>>> especcially in germany with its changefull in history. 
>>> But to push this feature a map with it would be nice.
>>>
>>> Greetings Kolossos
>>>     
>> It is possible to connect to the local postgres-db, although it is very 
>> outdated (it's from 2009-07-15) and not updated at the moment. It is 
>> also possible to connect to the sql-servers.
>>
>> Tools may be written in php, perl or python, although i can't guarantee 
>> that everything will work in every language right now, but i don't see 
>> any problems that can't be resolve by a ticket in jira.
>>
>> I think i could write a beginners-guide on how to use cassini (I'd 
>> propose https://wiki.toolserver.org/view/Cassini/Usage_notes) but at the 
>> moment it's not too useful as the main database is not updated.
>>
>> I worked around this by once doing an import of all country-nodes from 
>> the (outdated) postgresql-database into my mysql-db and have them 
>> checked regularly against the api. This works for countries (no support 
>> for new nodes, only ~230 nodes to fetch) but if you'd like to do 
>> something similar on a city-level, this wouldn't work anymore.
>>
>> So what is needed to get the database updated? I don't think we'll need 
>> a root-user to do this, just someone with write-perms on /sql and maybe 
>> a file under /etc/cron.d/. I never set up a postgres-db with 
>> hourly/minutely diff-support but I think I could give it a try, if this 
>> would be ok. On the other hand, if someone already has experience whith 
>> such a setup, he's welcome to do this.
>>
>> Any suggestions?
>> Peter
>>
>> _______________________________________________
>> Maps-l mailing list
>> Maps-l at lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/maps-l
>>   
> 
> 
> _______________________________________________
> Maps-l mailing list
> Maps-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/maps-l




More information about the Maps-l mailing list