Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to import Osmosis schema into into a PostGIS DB. I followed this article.

I created a DB:

createdb osm_schema

Then I executed the following command:

osmosis --write-pgsql host="localhost" database="osm_schema" pgsimple_schema_0.6.sql 

pgsimple_schema_0.6.sql is the basic schema I found in Osmosis tarball inside Script directory. The command above fails to execute. I got the following error:

Nov 16, 2012 6:51:39 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Osmosis Version 0.40.1 Nov 16, 2012 6:51:41 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Preparing pipeline. Nov 16, 2012 6:51:41 PM org.openstreetmap.osmosis.core.Osmosis main SEVERE: Execution aborted. org.openstreetmap.osmosis.core.OsmosisRuntimeException: No default pipes are available as input for task 1-write-pgsql. at org.openstreetmap.osmosis.core.pipeline.common.PipeTasks.retrieveTask( at org.openstreetmap.osmosis.core.pipeline.common.TaskManager.getInputTask( at org.openstreetmap.osmosis.core.pipeline.v0_6.SinkManager.connect( at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.connectTasks( at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare( at at org.openstreetmap.osmosis.core.Osmosis.main( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard( at org.codehaus.plexus.classworlds.launcher.Launcher.launch( at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode( at org.codehaus.plexus.classworlds.launcher.Launcher.main( at org.codehaus.classworlds.Launcher.main(

What am I doing wrong?

share|improve this question

Use psql to execute SQL scripts that generate schemas.

You don't need osmosis to generate OSM schemas. Osmosis reads and writes from files and databases, but it does not create schamas.

There's a detailed WIKI page on how to create the OSM schema and import OSM data using osmosis.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.