osm2pgrouting(1)

πŸ’– NAME πŸ’–

osm2pgrouting β€” bestie, it's literally the tool that imports OpenStreetMap data straight into a pgRouting database πŸ—ΊοΈβœ¨


🌸 SYNOPSIS 🌸

osm2pgrouting -f file [OPTIONS]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so osm2pgrouting is a command line tool, and its whole thing is making it so easy to pull OpenStreetMap data into a pgRouting database πŸ’…

and the way it does it?? it builds the routing network topology for you, automatically, no manual labor, no tears πŸ˜­πŸ‘‘ and then it creates tables for feature types and road classes. she just handles it. main character energy fr fr.


✨ OPTIONS ✨

πŸŽ€ Help πŸŽ€

  • --help β€” prints the help message for this version, so you know what you're doing 🫢
  • -v, --version β€” prints the version string, iconic little flex πŸ’–

🌈 General 🌈

  • -f file, --file file β€” the name of the OSM file. REQUIRED, bestie, you cannot skip this one 🚨
  • -c file, --conf file β€” the name of the configuration XML file. (default: /usr/share/osm2pgrouting/mapconfig.xml) πŸ“„
  • --schema schema β€” the database schema where the tables go. leave it blank and it defaults to whatever default schema PostgreSQL's search_path is dictating πŸ‘‘
  • --prefix prefix β€” a prefix that gets added at the beginning of the table names ✨
  • --suffix suffix β€” a suffix that gets added at the end of the table names ✨
  • --addnodes β€” imports the osm_nodes table 🫢
  • --clean β€” drops previously created tables. yes she will delete them. dramatic but purposeful πŸ’…

πŸ’œ Database options πŸ’œ

  • -d name, --dbname name β€” the name of your database. REQUIRED 🚨
  • -U name, --username name β€” the name of the user who has write access to the database. (default: postgres) ✍️
  • -h host, --host host β€” the host of your PostgreSQL database. (default: localhost) πŸ–₯️
  • -p port, --port port β€” the port of your database. (default: 5432) πŸ”Œ
  • -W password, --password password β€” the password for database access πŸ€«πŸ”‘

quick vibe check: -f file and -d name are the two Required ones. everything else has a default or is optional. slay accordingly πŸ’–

that's the whole page, bestie, you're officially qualified πŸŽ“πŸ’… this gem was documented on 11 June 2026 β€” go forth and route some roads πŸ›£οΈπŸ‘‘βœ¨

πŸ“¦ where this page comes from