🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Free tool to measure distance/path length in image?

Started by
4 comments, last by suliman 4 years, 3 months ago

Hi!

Just looking for a free tool to measure distance of a multi-point line that i draw on top of an image i have (such as when measure distance in google maps along a road by clicking along it).

I've googled alot but dont find anything :( Paint.net can show the distance of a line but its only a single line, I want to put down many points so the “Line” can follow turns, along a road etc.

Any idea? Thanks!

Advertisement

I haven't used it in a while, but Sketchup has such functionality. Might be a bit overkill though, you could probably just whip it up in C# or Javascript.

I dont wanna code it myself, i just think it should be possible to do in an existing program no? Seems pretty basic.

@suliman seems like a rare feature, you can find something similar in Inkscape in Extensions > Visualize Path > Measure Path, but the Python script for it (/share/extensions/measure.py) has some syntax error and it needs the lxml package installed for it to work…

It would be faster to code something like that in Python's IDLE, you just need the sequence of points, then it's literally:

# With ‘data’ being a list of 2-tuples as the X,Y of each point. Like this:
# data = [(1.0, 0.0), (3.0, 5.0), (7.0, 11.0)]
totalLength = sum((((data[n+1][0] - data[n][0])**2 + (data[n+1][1] - data[n][1])**2) ** 0.5 for n in range(len(data)-1)), 0.0)

Hmm i just got several pictures of maps and need to find the distance in them, is there no tool for this?

I dont have the points no, i just want to draw a multi-line and see the length of it.

If you work with actual maps it's not a rare thing to need at all ?

This topic is closed to new replies.

Advertisement