2

I was looking for Direction of Travel (DOT) information inside OpenStreetMap shapefiles, but only I've just found "ONEWAY = 1 or 0", but nothing about its direction.

If I work on an OSM editor, I can see its arrows which declare its direction. But as you can see, once downloaded as Shapefile type, there is no DOT information about.

OSM Metadata

  • 2
    1 = oneway in the direction of digitization. -1 = opposite direction. At least that is how it is in the original osm files. The SHP files you have found somewhere else, may have it differently. – Uffe Kousgaard May 30 '14 at 11:38
  • In nearly 3000 elements I did not find any "-1", so I thought that it wasn't implemented. So, thanks @UffeKousgaard for the info, but unfortunately, I think I cannot use this data for my purpose. :( – juasmilla May 30 '14 at 11:43
  • Thanks, I'll have a look in the original OSM and check with the downloaded shapefile data. – juasmilla May 30 '14 at 11:50
  • 1
    Majority has 1 (or yes) in OSM, only a fraction has it in reverse, so your data may either not have any such or the converter from OSM to SHP has swapped direction of some roads, so they are all 0/1. – Uffe Kousgaard May 30 '14 at 11:53
  • 2
    I found from my sample data in .pbf format more than 26000 "oneway=yes" tags and only about 200 "oneway=-1" and 16 cases of "oneway=1". Total number of highways is more than 400000. It can well be that your data are OK and there just do not exist oneways to opposite direction. – user30184 May 30 '14 at 11:58
5

Line data (of any format, be it GIS/CAD/etc.) typically defaults to the 'direction' of the line being based on start point or first coordinate given to end point or last coordinate given. Direction of travel is therefore considered in terms of with or against the direction of the line.

The most common scheme (there can be others) for attributing this in a network environment (ie, a road system with one-way restrictions) is:

  • 0 = travel in both directions
  • 1 = travel only with the line direction
  • -1 = travel only against the line direction

Note that line direction also affects left and right side of the line in a similar manner. Left is always the left side of the line considering the line direction; the same for right side.

Another related concept is To and From. These are often used in field headers (such as a To address range and a From address range).

  • To = with line direction
  • From = against line direction

In order to check a line's direction, you should be able to add some indicators via Symbology in whatever software you're using. It's easier or on by default in some software than others, as you see with the OSM editor. If you indicate your software someone might be able to give specific instructions if needed.

It's also possible as mentioned in comments that some lines may become reversed through geoprocessing operations - splitting a line into segments for instance. If you're just saving or exporting data however, that shouldn't happen (which is not to say it can't).

  • Does anyone know why could you find the Value 1 into the shapefile and the same road the Value -1 into the websitelink? – juasmilla Jun 5 '14 at 15:58
  • @juasmilla What is the source of the shapefile? I note from the documentation that they prefer the 0,1,-1 system. Perhaps if it was entered as yes, that was converted to 1 (and no would be 0) during shapefile creation. As you can see, yes/no doesn't allow for any DoT indication, just whether it is one-way or not - there is no way to distinguish a 1 or -1 from just yes. That street also doesn't make sense as one-way unless it is an entrance/exit only to an undepicted facility. Possibly bad data entry? – Chris W Jun 5 '14 at 18:15
  • The sources from which I've tried are bbbike and Geofabrik, @ChrisW it is something rare this issue. And as you said, it is a bad example, but I had not time this afternoon. I proposed another "Question" related to this issue here in GIS.Stack here is the link – juasmilla Jun 5 '14 at 20:34
2

These two links provide some information on how the way of traffic should be introduced and identified when using OSM. It explains that roads that are single way should mark oneway=1 or oneway=yes and that the way should always be the direction of digitalization. In case this is not possible, oneway=-1 means that the direction is against the direction of the digitalization. So, according to this info:

  • roads marked as oneway always go in in favour of digitalisation (FT) unless otherwise indicated.
  • roads with oneway=no or oneway=' ' are to be taken as both direction.
  • roads with oneway=-1 are oneway, TF (against the digitalization).

Note that this information applies at least for OSM data downloaded from via QGIS as *.osm. When osm data is downloaded as shapefile, the conversion process has been suspected to turn -1 values into 1.

In my opinion, this inconsistency makes me question the overall precision of this data and hence the reliability of a study that uses it as source. I would love to hear your opinions on that and on how to check the precision of data efficiently.

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.