I have imported a compressed osm file ".pbf" in a PostGIS database with osm2pgsql using the following command:

osm2pgsql -c -d osm_france -U postgres -H localhost -S default.style -C 10000 france-latest.osm.pbf

Everything was fine, except that I can not find the "maxspeed" information in any of the tables "planet_osm_roads" and "planet_osm_line." Does the PBF file contain this information? If it contains it, how can I extract it?


The default.style file https://github.com/openstreetmap/osm2pgsql/blob/master/default.style does not pick maxspeed into its own column. Edit default.style or use the --hstore option for writing all the tags into hstore.

  • 1
    I added this to the default.style "node,way maxspeed text linear" And it work fine, thanks a lot
    – Adam Adam
    Feb 18 '15 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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