RSGISLib Test Images Tools
- rsgislib.tools.testimages.create_random_int_img(output_img: str, n_bands: int, x_size: int, y_size: int, out_vals: List[int], gdalformat: str = 'GTIFF', datatype: int = 5, calc_stats: bool = True, tmp_path: str = None, tl_x: float = 427000.0, tl_y: float = 5809000.0, img_res_x: float = 10.0, img_res_y: float = -10.0, epsg_code: int = 32630)
A function which creates an image with pixels values randomly assigned from the list in the out_vals input list.
- Parameters:
output_img – The output image file name and path
n_bands – the number of bands in the output image
x_size – the number of pixels in the X axis
y_size – the number of pixels in the Y axis
out_vals – a list of values to be randomly populated within the output image
gdalformat – the output image file format (Default: KEA)
datatype – the output image data type (Default: rsgislib.TYPE_8UINT)
calc_stats – calculate image statistics and pyramids
tmp_path – Can optionally provide a temporary path where a reference image will be created and then removed.
tl_x – The TL coordinate of the left edge of the output image
tl_y – The TL coordinate of the top edge of the output image
img_res_x – The resolution of the output image in the x axis
img_res_y – The resolution of the output image in the y axis
epsg_code – The EPSG code of the output image