I'm new to OpenStreetMap. I want to extract all restaurants from Switzerland with their capacity if available. I am using osmosis. I tried:
osmosis --read-pbf file=switzerland.pbf --tf accept-nodes amenity=restaurant --write-xml output.osm
(I downloaded switzerland.pbf from http://planet.osm.ch/)
And it looks like it works. I would like to extract it not in XML but as a postgresql/PostGIS format. I tried
osmosis --read-pbf file=switzerland.pbf --tf accept-nodes amenity=restaurant --write-pgsql restaurant_osm.psql
But it fails with the following error:
INFO: Pipeline executing, waiting for completion.
Apr 8, 2014 1:06:08 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-pbf failed
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The server requested password-based authentication, but no password was provided.)
I don't really understand this error. How should I do in order to extract sport facilities, leisure facilities, restaurants and shops from Switzerland version of OSM with their capacity if available?