Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Polygon per Cell functionality #217

Open
Tracked by #29 ...
mvmaltitz opened this issue Sep 10, 2024 · 0 comments
Open
Tracked by #29 ...

Implement Polygon per Cell functionality #217

mvmaltitz opened this issue Sep 10, 2024 · 0 comments
Assignees

Comments

@mvmaltitz
Copy link
Collaborator

mvmaltitz commented Sep 10, 2024

We need a function and unit test that counts the polygons in a grid cell and assigns a value from 0 to 5.

Signature:

raster_from_score(bbox, country_boundary, cellsize, output_path, crs, input_polygons)

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
input_polygons - input polygons vector layer

Outputs:

a QgsRasterLayer
The analysis will generate a new raster layer in the input CRS and dimensions of the input bbox and cell size. The non land pixels will be assigned nodata. Land pixels will be assigned the value of the index_value.

Testing:

Prepare a small sample dataset for the boundary and verify that the checksum of the generated raster matches.

@mvmaltitz mvmaltitz added this to the UI/UX Overhaul milestone Sep 10, 2024
@mvmaltitz mvmaltitz added the bug Something isn't working label Sep 12, 2024
@mvmaltitz mvmaltitz added Remove and removed bug Something isn't working labels Sep 14, 2024
@mvmaltitz mvmaltitz mentioned this issue Sep 16, 2024
2 tasks
@mvmaltitz mvmaltitz removed the Remove label Sep 16, 2024
@mvmaltitz mvmaltitz removed this from the UI/UX Overhaul milestone Sep 16, 2024
@mvmaltitz mvmaltitz changed the title Re Zone Raster Locations: Output Layer (raster) Implement Polygon to Pixel functionality Sep 16, 2024
@mvmaltitz mvmaltitz reopened this Sep 16, 2024
@mvmaltitz mvmaltitz mentioned this issue Sep 16, 2024
41 tasks
@mvmaltitz mvmaltitz changed the title Implement Polygon to Pixel functionality Implement Polygon per Cell functionality Sep 16, 2024
@mvmaltitz mvmaltitz added this to the Code Improvements milestone Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants