---
name: "osm2pgrouting"
section: "1"
platform: "linux"
package: "osm2pgrouting"
version: "2.3.8-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/osm2pgrouting"
---

# osm2pgrouting(1)

import OpenStreetMap data into a pgRouting database

## NAME

osm2pgrouting - import OpenStreetMap data into a pgRouting database

## SYNOPSIS

FC**osm2pgrouting**F\[0\]  FC**-f**F\[0\] *file* \[*OPTIONS*\]

## DESCRIPTION

**osm2pgrouting** is a command line tool that makes it easy to import OpenStreetMap data into a pgRouting database. It builds the routing network topology automatically and creates tables for feature types and road classes.

## OPTIONS

Help:

- FC**--help**F\[0\]

  Produce help message for this version

- FC**-v**F\[0\], FC**--version**F\[0\]

  Print version string

General:

- FC**-f**F\[0\] *file*, FC**--file**F\[0\] *file*

  Name of the OSM file (Required).

- FC**-c**F\[0\] *file*, FC**--conf**F\[0\] *file*

  Name of the configuration XML file. (default: /usr/share/osm2pgrouting/mapconfig.xml)

- FC**--schema**F\[0\] *schema*

  Database schema to put tables. blank: defaults to default schema dictated by PostgreSQL search\_path.

- FC**--prefix**F\[0\] *prefix*

  Prefix added at the beginning of the table names.

- FC**--suffix**F\[0\] *suffix*

  Suffix added at the end of the table names.

- FC**--addnodes**F\[0\]

  Import the osm\_nodes table.

- FC**--clean**F\[0\]

  Drop previously created tables.

Database options:

- FC**-d**F\[0\] *name*, FC**--dbname**F\[0\] *name*

  Name of your database (Required).

- FC**-U**F\[0\] *name*, FC**--username**F\[0\] *name*

  Name of the user, which have write access to the database. (default: postgres)

- FC**-h**F\[0\] *host*, FC**--host**F\[0\] *host*

  Host of your PostgreSQL database. (default: localhost)

- FC**-p**F\[0\] *port*, FC**--port**F\[0\] *port*

  Port of your database. (default: 5432)

- FC**-W**F\[0\] *password*, FC**--password**F\[0\] *password*

  Password for database access.
