PDA

View Full Version : How can I measure travel distance on electronic maps?



CyrusStonecypher
02-10-2010, 02:58 PM
(My apologies if this isn't in quite the right place. I"m new to Cartographer's Guild.)

I have a scanned image (.pdf) of a commercially published fantasy map which shows the better part of a continent. I would like to measure travel distances between points on the map. Straight lines are easy, but roads and rivers aren't straight.

I can't find a way to measure non-straight lines in Photo Shop CS3. (Doesn't mean it can't be done just means that I can't figure out how. :?)

I found a plug-in for GIMP that "measures active path" but the download is in Python. I went so far as to install Python and use a utility to turn the .py into an .exe, but no dice. GIMP does not like it.

I've become so obsessed with finding a solution that I've considered using GIS software and creating a false data set for the map. (This should be a clue as to my current mental state.)

I hope that my mind is merely clouded by my obsessive state and a simple solution exists. Please, please help!

Coyotemax
02-10-2010, 04:13 PM
I've just started looking but so far I've found the following standalone application:
http://www.exefind.com/universal-desktop-ruler-P17811.html

and the following, which involved Illustrator:
"However, if it is absolutely critical that you have the complete length dimension of a curved path... export the path to Illustrator and use it's Measuring Tool (it measures the curves correctly)."

RobA
02-10-2010, 04:17 PM
I found a plug-in for GIMP that "measures active path" but the download is in Python. I went so far as to install Python and use a utility to turn the .py into an .exe, but no dice. GIMP does not like it.
You need to have gimp with python installed to run a python plugin.

It is trivial to do in scheme, however, I can write up a real quick Path Length script if you want for Gimp, that does not need the python install. (Can't help with PS, sorry).

-Rob A>

Ascension
02-10-2010, 04:21 PM
Well, I would say that all you can do is take a best guess approach because not only are there turns and curves to navigate but there are also hills and valleys to navigate so getting a totally accurate number is just about impossible. So the way that I do a best guesstimate is to take a 100-pixel brush tip and set the spacing to 100% Then just draw a line following the path and count how many dots are there and multiple that by 100. You could use say a 10-pixel tip or whatever is needed.

Carnifex
02-10-2010, 06:22 PM
What if you write numbers along a path in photoshop - separating them with tabulators?

CyrusStonecypher
02-11-2010, 07:16 AM
You need to have gimp with python installed to run a python plugin.

It is trivial to do in scheme, however, I can write up a real quick Path Length script if you want for Gimp, that does not need the python install. (Can't help with PS, sorry).

-Rob A>

Are you saying that Gimp needs to have some sort of python plug-in or just that Python must be installed on my system?

A Path Length script for GIMP would be awesome! (I'm not partial to PS, I just gave it a try because it's there. :))


I've just started looking but so far I've found the following standalone application:
http://www.exefind.com/universal-desktop-ruler-P17811.html

and the following, which involved Illustrator:
"However, if it is absolutely critical that you have the complete length dimension of a curved path... export the path to Illustrator and use it's Measuring Tool (it measures the curves correctly)."

I took a look at the Universal ruler. It's a little clumsy, but it is functional. The scale must be reconfigured if the map zoom changes. Thanks for finding it.

I don't have Illustrator. :( Thanks for the info though.


Well, I would say that all you can do is take a best guess approach because not only are there turns and curves to navigate but there are also hills and valleys to navigate so getting a totally accurate number is just about impossible. So the way that I do a best guesstimate is to take a 100-pixel brush tip and set the spacing to 100% Then just draw a line following the path and count how many dots are there and multiple that by 100. You could use say a 10-pixel tip or whatever is needed.

That's not a bad idea!


What if you write numbers along a path in photoshop - separating them with tabulators?

I . . . umm . . what? LOL. My Photoshop skills are minimal and I'm a cartographic newb. :?

Carnifex
02-11-2010, 10:18 AM
I . . . umm . . what? LOL. My Photoshop skills are minimal and I'm a cartographic newb. :?

Can you make a path in Photoshop? Select the Pen tool. Click where you want the path to begin and then click where you want it to end.

Next select the Type tool and click in the beginning of the path. Now you can write on the path. Wite a number (probably "0") and then press the tab key once. Write another number (probably "1"). Continue until you're satisfied. The numbers should now be evenly distributed along the path.

With the Pen tool you can add more anchor points on the path.

Then use the Direct selection tool to select and move those new anchor points.

RobA
02-11-2010, 01:41 PM
Are you saying that Gimp needs to have some sort of python plug-in or just that Python must be installed on my system?

A Path Length script for GIMP would be awesome! (I'm not partial to PS, I just gave it a try because it's there. :))


You need python installed, and gimp installed with python support to use python plugins. It isn't simple in windows, but I can point you in the right direction if desired.

regarding a script, Fencepost has a path animation script suite (scripts here (http://fence-post.deviantart.com/art/Animated-Path-Stroking-Script-152654834), tutorial here (http://www.gimptalk.com/tutorial/simple-animated-shapes-using-animated-path-st-46909-1.html)) that includes a "Path Details" function (right click on a path and select Path Details that will give you the length in pixels, the number of points and the closed status.

-Rob A>

Redrobes
02-11-2010, 01:55 PM
We talked before about measuring the amount of area within a map and we came up with a cool method which was really fast. I think the same can be applied to a length of path too.

If you create a new layer on top of the map and then draw with a known pixel width brush like 10 or 20 pixels wide in connecting solid lines - i.e. not dots - in black. Then once done you take the map layer and fill it solid white so that you have just a black and white image. No greyscale - contrast enhance 100% if you have to.

Now the nice feature PSP and Gimp has and I am sure PS has is this histogram window where if you hover your mouse in the histogram then it tells you how much as a percentage of the screen is white or black. So take number, multiply by image width x image height and that gives number of line pixels in image. Then divide by the 10 or 20 for the line width and that gives line length in pixels. Multiply by pixels per m scale and thats real length on map.

Rob did you ever Gimp up that area script ? If you did then its just area / 10 or 20 depending on the line width.

waldronate
02-11-2010, 04:13 PM
I vaguely recall that ProFantasy's Fractal Terrains Pro has a path measurement feature. The big problem there, of course, was getting the map aligned in the right projection and place on the globe in the first place.

CyrusStonecypher
02-12-2010, 11:55 AM
You need python installed, and gimp installed with python support to use python plugins. It isn't simple in windows, but I can point you in the right direction if desired.

regarding a script, Fencepost has a path animation script suite (scripts here (http://fence-post.deviantart.com/art/Animated-Path-Stroking-Script-152654834), tutorial here (http://www.gimptalk.com/tutorial/simple-animated-shapes-using-animated-path-st-46909-1.html)) that includes a "Path Details" function (right click on a path and select Path Details that will give you the length in pixels, the number of points and the closed status.

-Rob A>

I took another look at Gimp's Python requirements and found that I was missing the pyGtk. Even with that corrected (Python-fu now shows up in the filters list) the first "measure active path" .py I downloaded didn't work. I moved on to the script you suggested and it does work. I have to determine the scale of distance units per pixel and perform some calculations, but it's still better than guessing. :)


We talked before about measuring the amount of area within a map and we came up with a cool method which was really fast . . . . Multiply by pixels per m scale and thats real length on map.
This works too. I used a 1 pixel wide brush and then I just took the number of black pixels and multiplied by pixels per mile (we still love our imperial units here in the U.S.).

Is there any need to use a brush wider than 1 pixel when determining length?

Redrobes
02-12-2010, 04:27 PM
Is there any need to use a brush wider than 1 pixel when determining length?Not really if PS counts the pixels up. Mine showed a percentage black or white. By using thicker brush it was more accurate cos mine was something like 0.7% or something. With a 10pix wide brush it went to 6.7%. Also if you get the odd crooked bit of line then it matters 1/10th as much. If you cross over lines then you would have to compensate a bit tho cos you have missed one crossing points worth.

Also if you use a square brush instead of a round one then it will naturally compensate for travelling at 45 degrees where your covering 1.4 x as much distance per pixel as going horz or vert because the square brush stretched out at 45 deg is wider than a round one.

Greason Wolfe
02-19-2010, 09:13 AM
I vaguely recall that ProFantasy's Fractal Terrains Pro has a path measurement feature. The big problem there, of course, was getting the map aligned in the right projection and place on the globe in the first place.

Hrm. I thought that was a straight line measurement (the little Ruler icon). Unless, of course, there is another update that I've missed.

GW

VincentAlliath
02-20-2010, 10:05 PM
Can you make a path in Photoshop? Select the Pen tool. Click where you want the path to begin and then click where you want it to end.

Next select the Type tool and click in the beginning of the path. Now you can write on the path. Wite a number (probably "0") and then press the tab key once. Write another number (probably "1"). Continue until you're satisfied. The numbers should now be evenly distributed along the path.

With the Pen tool you can add more anchor points on the path.

Then use the Direct selection tool to select and move those new anchor points.

Wouldn't that just place each number one tab's length away from the previous number's end, and not from the centre of the previous number? That is to say that once you start getting into double digits especially, it'll offset it quite badly.


I know that you can overlay an image onto google earth, and you can use that to measure distances. It's rendered entirely useless if your map is not of an entire world, of course. If you've got a world map, however, it should work fine. If you know Earth's dimensions and you know your own world's dimensions, it's a simple ratio change. You could even place the continent map onto Google Earth and find somewhere that is supposed to be roughly the same size as this place (unless you don't know. In which case, I'm sorry I'm being useless here. :s).

Carnifex
02-22-2010, 06:11 AM
Wouldn't that just place each number one tab's length away from the previous number's end, and not from the centre of the previous number? That is to say that once you start getting into double digits especially, it'll offset it quite badly.


No, the tab's length are from the START of one set of numbers to the the START of the next set of mumbers. Just like a regular tab works in MS Word etc.

waldronate
02-22-2010, 10:42 AM
Hrm. I thought that was a straight line measurement (the little Ruler icon). Unless, of course, there is another update that I've missed.GW

To quote from the status bar message for FT's ruler tool: "Left click to start measurement, Shift+Click to add segment, Click again for distance readout". For spherical worlds it's great-circle distance; for planar worlds it's planar distance. The path consists of as many little segments as you'd like to click while holding down the Shift key and they are all summed at the end.

Greason Wolfe
02-22-2010, 02:07 PM
To quote from the status bar message for FT's ruler tool: "Left click to start measurement, Shift+Click to add segment, Click again for distance readout". For spherical worlds it's great-circle distance; for planar worlds it's planar distance. The path consists of as many little segments as you'd like to click while holding down the Shift key and they are all summed at the end.

See, that's what I get for paying attention. Bwahahahaha!

GW