Hi!

I need to export all roads in the netherlands together with their maxspeed. I exported the osm.pbf file through geofabrik.de and imported this in postgresql with osm2psql. However, this data does not contain the maxspeed attribute, is there a method to extract all roads together with their maxspeed value for a particular country?

Thanks!

asked 26 Nov '20, 13:37

faster043's gravatar image

faster043
212
accept rate: 0%


Your approach is good. You need to modify osm2pgsql's ".style" file to include a maxspeed column (maxspeed is not required for rendering hence is not part of the default schema) or alternatively use the --hstore option on import which will put all tags into a special "tags" column, and then you'll get the data you are looking for.

(If you're modifying the .style file, you can also throw away anything not related to roads - that will speed up your import and waste less space.)

permanent link

answered 26 Nov '20, 14:29

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
75.8k886801171
accept rate: 24%

Thanks! Hstore did it for me

(26 Nov '20, 15:17) faster043
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×56
×43
×33

question asked: 26 Nov '20, 13:37

question was seen: 148 times

last updated: 26 Nov '20, 15:47

powered by OSQA