You are here

Output coordinates of sample points

Hi all,

I regularly need to calculate distances between pairs of points on scanned maps. I can do this with the measure tool (by measuring distances and the map's scale), but was hoping there might be a simpler method... It would be great if I could just tag all the points somehow, perhaps with the sample point tool, and then have gimp spit out pixel coordinates of all the tagged points (preferably as a csv so that I can then easily go do Pythagoras magic). Photoshop CS3+ (extended) offers this kind of functionality... can anyone think of a way to do something similar with gimp?

Thanks in advance for your time,

Cheers,
John

Forums: 

If you change the Path Tool to "polygonal" mode (in its Options dialog) and hold down the SHIFT key while placing your points then you can later export the path to an SVG file that uses a simple XML-based format from which it should be easy to parse the data points.

The following extract shows how the coordinates of six path points would appear in the exported file -- the "M" indicates a "move to" operation (i.e., no connecting line is drawn) and can be ignored.

        d="M 99.00,106.00M 258.00,112.00M 307.00,290.00M
        66.00,318.00M 504.00,136.00M 576.00,305.00"

A nice method of achieving what I was after, thanks saulgoode.

I just registered to say that you are a life saver.

Subscribe to Comments for "Output coordinates of sample points"