How do you measure distances in OSM?

This occurred to me when trying to measure distances in OSM.

For example, in Google Maps, it’s easy to know the distances between two points. We just right click the map, and then use the “measure distance” tool, and then we can very conveniently draw rulers and measure distances.

Currently, there is no equivalent feature on OSM. One method I can imagine is to copy the coordinates to external online distance calculators, and let them calculate the geographical straight-line distances, but that’s very tedious. Another method is to open iD and draw a featureless line, but that could be an overkill, we may not want to edit right away, we may be measuring just to understand the current situation; or maybe the distance is too long that iD might show too many map items and start lagging.

How do you measure distances in OSM? I am thinking maybe the website should be updated to allow us to measure distances conveniently.

You could use better-osm-org: Better-osm-org: a script that adds useful little things to osm.org - #140 by TrickyFoxy

5 Likes

openstreetmap.org is neither intended as a replacement for google maps or as a mapping website primarily for end users, it is the portal for contributors to the data.

Map sites that are more end user orientated are for example https://osmapp.org or https://cartes.app See List of OSM-based services - OpenStreetMap Wiki for more.

10 Likes

arguably being able to easily measure a distance is at least as useful for contributors as it is for endusers.

6 Likes

map.meurisse.org is a convenient option.

4 Likes

Just to add some context, this certainly wasn’t the first request for this feature, which was, of course, closed by the website’s maintainers.

It’s very easy to use the argument that the OSM site is only for mappers.

That said, in my practice as a mapper, a ruler has come in handy many times. I don’t know about you, but I can’t figure out how many meters are shown on a map.

  1. The screenshot above is an incident from my life when I was on the street and looking at the map, I assumed that the distance between houses was much greater than it was on the map. Using a ruler, I quickly checked this and began to correct the map.

  2. Once I had to process a note that said how many meters downstream a river a bridge was located Note: 4892367 | OpenStreetMap

  3. I once had to argue about access=* on a path near a rail. In Russia, it depends on the distance to the rail.

Not to mention that I use a ruler to count how many kilometers I’ve walked while walking, or in everyday life to find out the distance between cities or the sizes of countries (hello, Mercator)


And by the way, OsmApp doesn’t have a ruler. And in cartes.app, it’s kind of buggy. Sometimes it doesn’t work the first time, sometimes the right-hand side is unclickable and duplicates beyond the screen’s borders.


Not a bad ruler on https://nakarte.me

7 Likes

From the UI standpoint, it could fit neatly in the “Directions” panel, as the fourth mode (along with car, bicycle and walk). Quick mockup:

That’s how it’s done in CoMaps/Organic Maps. Of course, someone would have to implement it…

4 Likes

Dear @woodpeck ,

Thank you for that link, shows the distance in km, which solves one part of the ‘measure’ question;

the other side of the question occurs when one knows that a yet to be mapped feature is n steps > m meters from an already mapped feature: it is just as easy to place the new feature in the almost correct spot;

summing up, a database representation aimed at contributors would need a ‘real time’ measurement tool, one which updates the distance as you move the end of the distance measured, thus includes the option to place a node at a distance from an existing node;

endusers may indeed not need such a tool.

Met als immer vriendelijke groet (Dutch for ‘with, as ever, friendly greeting’),

Dear @SimonPoole ,

Gave this contribution a thumbs down, as especially a contributor needs to be able to place a node at a measured distance from an already mapped node.

Whether end users need to measure on the OSM instance is debateable: when hiking or bicycling find non-contributors do not generally use the OSM instance, preferring Osmand and Routeyou.

Met vriendelijke groet,

iD supports measuring with ctrl-shift-m …

Dear @SimonPoole ,

Thank you for the prompt reply, and indeed iD/Shortcuts - OpenStreetMap Wiki confirms your post;

Unfortunately, in my version of iD, in Edge, this doesn’t work: perhaps I overlooked something?

CTRL+I , in edit mode, toggles the info / measurements box on / off, in the bottom right hand corner, it will show the length of a selected line, or the perimeter and area of an area : that’s useful.

CTRL + SHIFT + M : should “toggle measurement panel”, in Edit mode it doesn’t appear to do anything, same lack of result in Viewing mode

= = =

press and hold all of CTRL + SHIFT + M : behaviour differs depending on mode : Viewing, or Edit:

in either mode: press and hold ctrl, then press and hold shift, then press and hold m;

Viewing mode: see a nice fat + , move the mouse to the other end of what is to be measured: see a rectangle, and once buttons released am zoomed-in to the enclosed area ‘plus a bit’;

Edit mode: can draw a freehand dashed line, which disappears when releasing the buttons;

Looks like my version of iD in Edge works differently from others, clearly hasn’t read and ingested iD/Shortcuts - OpenStreetMap Wiki ?

Met als immer vriendelijke groet,

If the shortcut doesn’t work, you can activate it manually.

1 Like

Dear @ivanbranco ,

Thank you for including the screenshot;

my ‘doesn’t work’ refers to the CTRL+shift+M shortcu; as stated, CTRL+I does work, your mentioning the Measurement and History panel tickboxes will do same w/o memorising key combo.

Met als immer vriendelijke groet,

I believe the suggestion was that you could open the Measurement panel, then use the Line tool to draw a temporary line between the two points you’re interested in. Once you’re done getting the measurement, you can press Esc to avoid adding anything to the map. The panel also includes a live area measurement as you draw a polygon using the Area tool.

Sometimes I need this trick while mapping. For example, in street-level imagery, I see a historical marker that refers to something 500 feet to the west, giving me a hint as I hunt for it in aerial imagery. Or a published source indicates that a farm covers 238 acres. This helps me gut-check how far to extend the named area, doing a sort of process of elimination along various combinations of tree rows and fencelines.

More often, though, a source will tell me that the feature is at a certain milepost, requiring me to scour the road for a different milepost, then calculate the point at a certain distance from it – a centerline distance, not a straight-line distance. The easiest method is to calculate a route on the homepage from the coordinates of the known milepost, dragging the destination along the road until the calculated route’s distance matches the milepost I’m looking for.

Sometimes I’ve got a location expressed in river miles, but OSRM doesn’t support boat routing yet. The alternative is to draw a temporary line in iD, connecting it to the roadway and pressing F continuously to follow the roadway until the Measurement panel shows approximately the right distance.

1 Like