Line algorithim for python and numeric

Theerasak Photha hanumizzle at gmail.com
Fri Oct 13 16:41:47 CEST 2006


On 13 Oct 2006 07:33:17 -0700, bcdonovan at gmail.com <bcdonovan at gmail.com> wrote:
> Hi everyone,
>
>   I'm wondering if anyone knows of a way to extract data from a numeric
> array along a line. I have a gridded dataset which I would like to be
> able to choose two points and extract a 1-d array of the data values
> along the line between the two points. Any ideas?

Are these all 45 degree lines or what?

If not, you'll have to use trigonometry and approximate the closest
matching cell. (Don't worry, Python has maths functions!! :))

-- Theerasak



More information about the Python-list mailing list