Results 1 to 10 of 17

Thread: How can I measure travel distance on electronic maps?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default

    Quote Originally Posted by CyrusStonecypher View Post
    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, tutorial here) 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>

  2. #2
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Default

    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.

  3. #3

    Default

    Quote Originally Posted by RobA View Post
    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, tutorial here) 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.

    Quote Originally Posted by Redrobes View Post
    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?
    Last edited by CyrusStonecypher; 02-12-2010 at 01:42 PM.

  4. #4
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Default

    Quote Originally Posted by CyrusStonecypher View Post
    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •