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

I've been measuring trails in town simultaneously with a GPS logger and a distance-measuring wheel. As a result, I know the distances between trail junctions quite accurately. My repeatability seems to be around 1/4 percent. Due to the relatively high curvature of trails (both horizontal and vertical), inferring distance by doing the math on the way points is not as accurate. How do I store my accurate distances?

I see that there is a DISTANCE tag, but according to the documentation only applies to relations. First, you have to actually create a relation to use it, which I don't think is appropriate for many of our trails. Second, it seems to be intended to give the length of a longer route thru a bunch of intersections and possibly as it switches ways in the OSM database.

I was expecting to make individual ways between trail junctions, then use something like the DISTANCE tag to explicitly state how long that way is, regardless of what you might get by adding up the individual line segments that were entered by eyeball-filtering GPS traces.

Added in response to comments

I haven't directly compared my measurements to distances computed from OSM data, but I have seen significant discrepancies between the wheel-measured distances and distances computed from other people's GPS tracks, over 10% in some cases. That may have been because these other GPS tracks were rather sloppy, which is one reason I'm re-doing all the trails in town. It just seems a shame that there isn't a mechanism to save this data in OSM when known, but if that's not done then I will stop looking for it.

Trails are thin, so there is no issue of walking on the other side of a street. The biggest issue that will make the distance experienced by two people different is when they go around a wet area differently.

As for getting out of date when someone else edits the way, I can see the point to that. That is probably the best reason given to not add distances to ways.

I guess the overall answer is

  1. Distances on ways is not how OSM is intended to work.
  2. Even if you did it, it would cause maintenance problems as people edit the ways and then don't update the distances accordingly.
  3. We think that the error isn't that great, and don't care if it is.
If someone wants to write a nice answer stating this and possibly elaborating on it, I'll be happy to upvote and accept it. I'm not going to upvote or accept SK53's answer since it didn't address the question. I asked how to store the more accurate directly-measured distance data instead of requiring it to be calculated, and his answer is basically "It's not needed since it can be calculated".

asked 24 May '15, 21:14

Olin%20Lathrop's gravatar image

Olin Lathrop
16113
accept rate: 0%

edited 25 May '15, 13:41

How does your measurement compare with measurements from OSM's 2D geometry ? And when correcting for relief using DEM data ? Did you consider that the personal decision of walking on this or that side of the road will throw off measurements ? Chances are that distance measured from OSM data + SRTM is just as good as manually-measured distance.

(25 May '15, 11:55) Vincent de P... ♦

Thanks for the additional paragraphs, they seem spot-on.

Distances from GPS traces can have a big error, especially in forest/valley/city, or if making pauses, or if recording at less than 1s frequency. Map data corrected by a human and helped by satellite imagery ought to be much more accurate, on par with a measuring wheel if the path is narrow and relief is accounted for.

(25 May '15, 16:26) Vincent de P... ♦

I suggest you create the route relation corresponding to the trails when applicable, an then look up the trail details on waymarked trails.

(25 May '15, 16:31) Vincent de P... ♦

I see that there is a DISTANCE tag, but according to the documentation only applies to relations. First, you have to actually create a relation to use it, which I don't think is appropriate for many of our trails. [...] I was expecting to make individual ways between trail junctions

Nope. A way in OSM represents a real-world geometry with shared attributes. As soon as the attributes change, you start a new way.

The upshot is that a relation is the correct way to store trail-wide information, since you can't rely on there being just one way for your whole trail.

(It's technically possible to create a way that shares sequences of nodes with other ways; if you were determined to store the information in a way, this would be the way to do it. However, it's strongly discouraged because it's a nightmare to edit and a nightmare to parse.)

FWIW, I generally tend to agree with SK53 that this information can and ought to be automatically computed. If you absolutely need the level of accuracy that an accurate centreline can't provide, then OSM is probably not the right project for your needs.

permanent link

answered 25 May '15, 16:54

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

edited 25 May '15, 16:56

Just dont add distance to ways. It is completely unnecessary, just as adding lat/lon to each node is not needed.

OSM is a geographical database, it can be calculated, just as every router does.

permanent link

answered 24 May '15, 21:36

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

1

But the point is that these calculations will be less accurate than the explicitly measured data I have. When I walk a trail, the GPS point-samples my motion, adds inevitable error to these points, then the result of several GPS tracks are low pass filtered by eye and the point-sampled again to make the OSM ways. Adding up the lengths of this piecewise linear approximation won't be as accurate as measuring the actual trail by running over it with a 19 inch wheel. My question is how to provide this more accurate information for OSM ways. Are you saying there is no mechanism for this and to live with the less accurate summing of line segments?

(24 May '15, 21:43) Olin Lathrop
4

Well feel free to add this using the distance tag.

What happens when someone splits the trail? For instance to mark a change of surface. How do they re-calculate the distance for each segment. Elevation & other aspects will obviously also affect distance. I really see no advantage of storing it in OSM for the sake of an apparent small increase in accuracy.

(25 May '15, 07:52) SK53 ♦
1

The distance tag on relations is mainly (only ?) usefull for QA purposes : if a route's geometry is significantly shorter than its distance tag implies, then the route relation is probably incomplete and should be fixed.

(25 May '15, 11:59) Vincent de P... ♦

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:

×167
×63

question asked: 24 May '15, 21:14

question was seen: 3,380 times

last updated: 25 May '15, 16:56

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