Skip to content
Prev 374666 / 398513 Next

How to average values from grid cells with coordinates

Hi lily,
You could also create "blackcells" as a dataframe (which is itself a
type of list). I used a list as I thought it would be a more general
solution if there were different numbers of values for different grid
cells. The use of 1 for the comparison was due to the grid increments
being 1. If you had larger or smaller grid increments, you would use
the grid increment size for the comparison. That guarantees that only
the four nearest "black" cells will be identified as within the "red"
cell.

Jim
On Sat, May 19, 2018 at 4:07 AM, lily li <chocold12 at gmail.com> wrote:
Message-ID: <CA+8X3fVHTi8dsj5oyFy_f66WkX906rZqHbcPT0iKiz651Gk06w@mail.gmail.com>
In-Reply-To: <CAN5afy82p=WDNuMZyFazEgPXBPrByFxsfqiAVOiSen0Nk5KD_A@mail.gmail.com>