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

Hi,

Please, does the number of nodes for OSM ways always corresponds to the physical distance? I noticed different streets(ways) have varying number of nodes, but what I'm not sure is if this actually consistently relates to distance of the streets. In other words, do streets with lower number of nodes have shorter physical distance than those with much higher number of nodes and vice-versa?

Thanks for the much highly anticipated feedback!

asked 31 Oct '22, 15:47

Segunlakata's gravatar image

Segunlakata
16131316
accept rate: 0%

edited 31 Oct '22, 15:48


No, there is no relationship at all.

Nodes are generally needed where a an object is not a straight line. So a long straight might be drawn with only 2 nodes, while a short curved street might have many nodes to draw the curve. Nodes are also needed to represent intersecting objects, so a street with many junctions will tend to have more than a street with no intersections.

permanent link

answered 31 Oct '22, 17:02

alan_gr's gravatar image

alan_gr
2.6k12245
accept rate: 15%

Thank you @alan_gr. Your feedback has been of tremendous help. Now that it is clear that there is no correlation between the number of nodes under an OSM way and the physical distance of the way, how do I go about about computing the overall path length (distance) of an OSM way in a very accurate manner?.

I also initially planned using the start node (start point) and the end node(end point) of a given way to compute the distance for the way, but I realize it won't give me the level of accuracy I desire (i.e. the computed distance could be less than the actual distance), particularly when the street is not a "perfectly" straight one. Does anyone have an idea please?

(01 Nov '22, 14:05) Segunlakata
1

You have to calculate the distance between any consecutive nodes and then simply add these numbers up. Similar to any other graph.

(01 Nov '22, 15:18) scai ♦

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:

×710
×205
×167
×142
×1

question asked: 31 Oct '22, 15:47

question was seen: 1,140 times

last updated: 01 Nov '22, 15:18

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