1

I was just going through the following tutorial HERE.

I have extracted all the files succesfully using the below commands:

cd ~/Desktop/pgrouting-workshop/
tar -xvzf data.tar.

But when i run the following command:

osm2pgrouting -file "data/sampledata.osm" \
                          -conf "/usr/share/osm2pgrouting/mapconfig.xml" \
                          -dbname pgrouting-workshop \
                          -user user \
  -host localhost \
                          -clean

I get an error as follows:

unknown parameter:  -conf

What am i doing wrong ??

1 Answer 1

2

Are you using the master or develop branch of osm2pgrouting, I notice the help is a little different between the two.

I'm using the develop branch and it has these instructions:

-c [ --conf ] arg (=/usr/share/osm2pgrouting/mapconfig.xml)

Full instructions:

Allowed options:

Help:
  --help                Produce help message for this version.

General:
  -f [ --file ] arg                     Name of your osm file (Required).
  -c [ --conf ] arg (=/usr/share/osm2pgrouting/mapconfig.xml)
                                        Name of your configuration xml file.
  --prefix arg (=planet_)               Prefix added at the beginning of table 
                                        names.
  --suffix arg                          Suffix added at the end of table names.
  -s [ --skipnodes ] arg (=1)           When ture: dont import the node table.
  --clean arg (=0)                      When true: Drop previously created 
                                        tables.

Database options:
  -d [ --dbname ] arg            Name of your database (Required).
  -u [ --user ] arg (=mapas)     Name of the user, which have write access to 
                                 the database.
  -h [ --host ] arg (=localhost) Host of your postgresql database.
  -p [ --db_port ] arg (=5432)   db_port of your database.
  --passwd arg                   Password for database access.

So you would need to do this:

-c "path/here"

or what I do

--conf="path/here"

1
  • Confirmed with pgRouting folks -- the tutorials is based on osm2pgrouting older version, but looks like you are using the newer version. So follow the new instructions.
    – Regina Obe
    Commented Sep 7, 2015 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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