NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'll first start by saying that I'm new to the GIS world. I apologize if this has been posted before but I tried searching a lot and couldn't find the answer. Maybe I'm searching the wrong terms.

I am playing around with visualizing some traffic information. I've been using GEOFABRIK to download large data sets for OSM (which I believe is the suggested way of doing it). So I'll download an entire state in the US (like Michigan) in the .osm.pbf format. Next, I use a standard osm2pgsql command to import all the data into a postgres gis db.

osm2pgsql --create --latlong --slim --drop  -U myusername -d gis wisconsin-latest.osm.pbf

All this seems to go fine. Imports run well. I am now trying to run some select statements to check on the data that has been loaded. It seems to me that many of the smaller side streets are missing from this data but are present in the OSM main site. For example, the way/road with Way: Ontario Road (21447015) (http://www.openstreetmap.org/way/21447015)

But a query of:

select * from planet_osm_roads where osm_id=21447015;

results in 0 rows.

I feel like I'm just missing something. Does anyone have any guidance? I seem to be missing a lot of these side roads (which seem to exist on the OSM site). Thanks in advance!

asked 29 Mar '16, 15:33

sbryfcz's gravatar image

sbryfcz
56558
accept rate: 0%

edited 29 Mar '16, 15:42

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866


The "roads" table is a misnomer and should really be called "stuff we likely draw on lower zoom levels". https://github.com/openstreetmap/osm2pgsql/blob/master/tagtransform.cpp#L38-L54 determines what gets stored in the roads table - residential roads aren't! You will find them in planet_osm_line. (The roads table is a subset of the line table.)

permanent link

answered 29 Mar '16, 15:44

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

1

Thanks a ton. Changed that 1 table name and everything worked perfect.

(31 Mar '16, 22:45) sbryfcz

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:

×196
×88
×40

question asked: 29 Mar '16, 15:33

question was seen: 3,859 times

last updated: 31 Mar '16, 22:45

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum