ThinkGeo.com    |     Documentation    |     Premium Support

Finding an average line from a set of lines

Given a set of lines on the map, I’m trying to find an “average” of that line. Are there any built-in ThinkGeo tools to help with this? The way I’m currently doing it is getting a bounding box that contains all the lines, and draw ~500 parallel lines through it. Then I get the intersecting point of each parallel line with the lines from the set (could be zero), and average them. I build a new line from this list of average points.

It’s sort of convoluted so if there’s any tools that ThinkGeo has already that would be great.

Hi Dan,

It looks we don’t have a built-in functions just like you mentioned.

You should want to build a function for it.

And I think you can build a function just handle tow lines if you have a algorithm to calculate the “average” line, then loop the lines. It should works better than draw more than 500 auxiliary lines.

Regards,

Ethan