I am looking for a solution to a problem I have, unfortunately searching the internet provided no answer. I have an array of data (20 x 100 points) with rectangular pixels, pixels in the x-direction have of size of 2 m and pixels in y-direction are 10 m. The total area of my array is 200 m x 200 m and the axes range from -100m to +100 m.
I want to reshape/reproject this data to a regular sized grid of (101 x 101 points) where the size of a pixel in x and y direction is 1 m. Points within the new array should be filled with the corresponding value of the old array
I have added a small piece of code to serve as an example below.
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0,100,1)
arr = np.tile(x, (20,1))
x_size = 2
y_size = 10
plt.imshow(arr, aspect = 'auto', extent = [-100,100,-100, 100])