Sum of all values along a line

32 Views Asked by At

enter image description here

This picture is a representation of a problem I've been trying to tackle for a while now. Basically, I've got a grid with dimensions Latitude, Longitude, and Altitude. Time is also a dimension, but I'll leave that for a late solution. At each point within that grid there is a Nitrogen Dioxide value that I'm able to pinpoint. My question is mathematically how much Nitrogen Dioxide is between point one and point two.

What is the name for this sort of math problem/concept? Can this community reference me to some example problems that are similar?

1

There are 1 best solutions below

0
On BEST ANSWER

For all the cells except the end ones, you can just compute the length of the segment passing through the cell and multiply by the concentration in the cell. For the end cells you need to figure out the distance from the endpoint to the edge of the cell. If the concentration is in g/m^3 the result will have units g/m^2. It represents the number of grams that would be in a column of area 1 m^2 around your line.

Depending on how the concentration varies, you might be able to average the concentrations in all the cells on the route, then multiply by the total length. That will overstate the contributions of the cells where the line just cuts the corner, but if the concentration varies slowly that will not be too bad.