Hi, Steve
I have a shapefile with multiple points and a tiff image with 10 bands, I wanted to extract the pixel values from each point for training and testing using Pyspatialml, but i am getting an error, AxisError: axis 1 is out of bounds for array of dimension 0.
img_fp = r'.........\file.tif'
stack = Raster(img_fp)
shapefile = r'.........\file.shp'
training_py = geopandas.read_file(shapefile)
df_polygons = stack.extract_vector(response=training_py, columns='waterClass',return_array=True)
x_text= np.array(df_polygons[0])
y_text= np.array(df_polygons[1])
Hi, Steve I have a shapefile with multiple points and a tiff image with 10 bands, I wanted to extract the pixel values from each point for training and testing using Pyspatialml, but i am getting an error, AxisError: axis 1 is out of bounds for array of dimension 0. img_fp = r'.........\file.tif' stack = Raster(img_fp) shapefile = r'.........\file.shp' training_py = geopandas.read_file(shapefile) df_polygons = stack.extract_vector(response=training_py, columns='waterClass',return_array=True) x_text= np.array(df_polygons[0]) y_text= np.array(df_polygons[1])
Can you offer some suggestion. Thank you!