<p>Technically, this is a mathematical modelling problem. You just happen to be using earth science data - satellite LIDAR readings.</p>

<p>Ore reserve geologists constantly deal with this, but in three dimensions when they are required to create a block models of a geological deposit from drill hole data.</p>

<p>Scientific fields that use 2D data would include: forestry, meteorology and ground contamination studies looking into pollution effects of smelters.</p>

<p>Methods you need to consider are <a href="https://gisgeography.com/inverse-distance-weighting-idw-interpolation/" rel="nofollow noreferrer">Inverse Distance Weighting</a> and possibly <a href="https://en.wikipedia.org/wiki/Variogram" rel="nofollow noreferrer">variography</a> and <a href="https://desktop.arcgis.com/en/arcmap/10.3/tools/3d-analyst-toolbox/how-kriging-works.htm" rel="nofollow noreferrer">kriging</a>. Variography and kriging are elements of <a href="https://pro.arcgis.com/en/pro-app/help/analysis/geostatistical-analyst/what-is-geostatistics-.htm" rel="nofollow noreferrer">geostatistics</a>, also known as the <a href="https://en.wikipedia.org/wiki/Regionalized_variable_theory" rel="nofollow noreferrer">Theory of Regionalized Variables</a>.</p>

<p>With inverse distance weighting, the distance variable is usually raised to a power n, i.e. <span class="math-container">${1/d^n}$</span>. Choosing the appropriate value of <span class="math-container">$n$</span> is the tricky part. When geologists used inverse distance weighting, prior to primary using geostatistics, typically the value of <span class="math-container">$n$</span> used was 2, but values between 1 and 3 have been used for different deposits.</p>

<p>Given that you are using two dimension data, you may need to use <a href="https://en.wikipedia.org/wiki/Geographic_information_system" rel="nofollow noreferrer">GIS</a> software or other modelling software that offers grid interpolation methods, such as I have mentioned to achieve what you want.</p>

CC BY-SA 4.0
2019-07-25T15:02:10.717Z
2019-07-25T15:02:10.717Z
Fred
<p>I have a list of single point values that I want to insert into a grid.</p>

<p>point_values = [1, 4, 5, ...]</p>

<p>point_lats = [-12.101, -12.1023, -12.1031, ...]</p>

<p>point_lons = [155.511, 155.520, 155.533, ...]</p>

<p>the grid latitudes and longitudes are currently in 2d arrays of 2030 x 1350</p>

<p>latitudes = array of shape 2030 x 1350 of latitudes</p>

<p>longitudes = array of shape 2030 x 1350 of longitudes</p>

<p>how could I insert the points into the 2D grid if a point falls within the grid boundaries?</p>

CC BY-SA 4.0
2019-07-25T11:11:26.180Z
This looks more like a programming question (belonging on [SO]) but is currently very unclear. What do these arrays represent? What grid boundaries are you talking about?
Jan Doggen
CC BY-SA 4.0
2019-07-25T13:18:58.863Z
this is to match up satellite observations from a lidar (calipso) to MODIS data. i would think this is earth science considering i'm doing it to observe earth processes.
Alyson Douglas
CC BY-SA 4.0
2019-07-26T00:50:17.990Z
Although this question is about remote sensing, you likely will get helpful answers from Geographic Information Systems stack exchange.
haresfur
<satellites><python><modis>
Insert points into a 2d grid
Alyson Douglas
# Insert points into a 2d grid

(Asked by: username_0 on 2019-07-25)

I have a list of single point values that I want to insert into a grid.

point\_values = [1, 4, 5, ...]

point\_lats = [-12.101, -12.1023, -12.1031, ...]

point\_lons = [155.511, 155.520, 155.533, ...]

the grid latitudes and longitudes are currently in 2d arrays of 2030 x 1350

latitudes = array of shape 2030 x 1350 of latitudes

longitudes = array of shape 2030 x 1350 of longitudes

how could I insert the points into the 2D grid if a point falls within the grid boundaries?

**Tags:** satellites, python, modis

> **Comments:**
> **username_1**: This looks more like a programming question (belonging on [SO]) but is currently very unclear. What do these arrays represent? What grid boundaries are you talking about?  
> **username_0**: this is to match up satellite observations from a lidar (calipso) to MODIS data. i would think this is earth science considering i'm doing it to observe earth processes.  
> **username_2**: Although this question is about remote sensing, you likely will get helpful answers from Geographic Information Systems stack exchange.  

---

## 1 answers

### Answer by username_3 on 2019-07-25. Score: 1 | Accepted answer

Technically, this is a mathematical modelling problem. You just happen to be using earth science data - satellite LIDAR readings.

Ore reserve geologists constantly deal with this, but in three dimensions when they are required to create a block models of a geological deposit from drill hole data.

Scientific fields that use 2D data would include: forestry, meteorology and ground contamination studies looking into pollution effects of smelters.

Methods you need to consider are [Inverse Distance Weighting](https://gisgeography.com/inverse-distance-weighting-idw-interpolation/) and possibly [variography](https://en.wikipedia.org/wiki/Variogram) and [kriging](https://desktop.arcgis.com/en/arcmap/10.3/tools/3d-analyst-toolbox/how-kriging-works.htm). Variography and kriging are elements of [geostatistics](https://pro.arcgis.com/en/pro-app/help/analysis/geostatistical-analyst/what-is-geostatistics-.htm), also known as the [Theory of Regionalized Variables](https://en.wikipedia.org/wiki/Regionalized_variable_theory).

With inverse distance weighting, the distance variable is usually raised to a power n, i.e. ${1/d^n}$. Choosing the appropriate value of $n$ is the tricky part. When geologists used inverse distance weighting, prior to primary using geostatistics, typically the value of $n$ used was 2, but values between 1 and 3 have been used for different deposits.

Given that you are using two dimension data, you may need to use [GIS](https://en.wikipedia.org/wiki/Geographic_information_system) software or other modelling software that offers grid interpolation methods, such as I have mentioned to achieve what you want.


---

