Open timlinux opened 2 months ago
Currently used. Should be adopted across the board for all rasterize settings.
@timlinux This function has only one buffer distance. It will be used under FCV, WAS and any other function that will just a single buffer distance.
I think the output should be a vector layer as there might be further calculations needed depending on the use case.
We need a function that generates a single from a point at different increment buffer distances.
Signature:
Grid(bbox, country_boundary, cellsize, output_path, crs,buffer_distance, input_point_layer)
Inputs:
bbox - the grid aligned bounding box for the analysis area. e.g. if the grid size is 100m the length and width will be exactly divisible by 100m country_boundary - a QgsVectorLayer of type polygon or multipart polygon. Areas outside of this boundary will be assigned nodata. output_path - the place in the filesystem where the dataset should be written. ⚠️ If it already exists it will be overwritten without confirmation. crs - typically a UTM zone for the analysis area. Should be m based. cellsize - based on the analysis environment, typically 100m buffer_distance - This will determine the buffer distance. Default value 100 input_point_layer - the input point layer will be the centre points of the buffer
Outputs:
a QgsRasterLayer The analysis will generate a new raster layer in the input CRS and dimensions of the input bbox and cell size. It will be assigned a value between 0 and 5. All values outside of the country_boundary will be assigned as no data values.
Testing:
Prepare a small sample dataset for the boundary and verify that the buffer generates correctly