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

Rasterize point functionality #388

Open
mvmaltitz opened this issue Oct 9, 2024 · 4 comments
Open

Rasterize point functionality #388

mvmaltitz opened this issue Oct 9, 2024 · 4 comments
Assignees

Comments

@mvmaltitz
Copy link
Collaborator

mvmaltitz commented Oct 9, 2024

Image

@timlinux
Copy link
Contributor

@ClaraIV could you confirm this behaviour? How would it affect the mockups you shared where indicators each use multiple input files?

@timlinux
Copy link
Contributor

timlinux commented Oct 10, 2024

Detailed workflow description:

A python class that uses the areaiterator to process the areas one by one. If should using QGIS processing algorithms as first preference to carry out steps, otherwise do the analysis from first principles without relying on any external libs that are not already shipped with QGIS.

The algorithm should work as follows:

Input 1: A linear network layer (QgsVectorLayer) such as roads or paths
Input 2: A point layer representing pedestrian crossings (QgsVectorLayer)
Input 3: A polygon layer containing grid cells of a specific dimension e.g. 100m x 100m (QgsVectorLayer)
Input 4: Working directory for intermediate outputs

Algorithm steps:

Step 1: Create and interator over the areas and bboxes (current_area, current_bbox)
Step 2: Select all of the lines that intersect with the current_area and store them in a temporary layer (area_lines).
Step 3: Select all of the points that intersect with the current_area and store them in a temporary layer (area_points). This grid layer should have one attribute 'value'.
Step 4: Select all of the grid cells that intersect either a road or a point from area_lines and area_points and store them in a temporary layer (area_grid)
Step 5: Assignment of values to the grid cells:

Assign a value of 3 to a cell if it only intersects with one feature.
Assign a value of 5 to a cell if it intersects with more than one feature.

Step 6: Rasterize the grid using values of the grid cells for the raster. The raster extents should be exactly the same as the iterator area_grid and its CRS.

Step 7: Convert the resulting raster to byte format with lossless compression to minimise the space it requires, removing the prior float32 product.

Step 8: After completing the iteration combine the resulting byte outputs to a raster VRT stored in the working directory.

timlinux added a commit that referenced this issue Oct 11, 2024
Implementation for #388 point a nd line analysis
@timlinux
Copy link
Contributor

Discussing with @osundwajeff and his experience working on the last geest version, the points get processed for one subfactor and the paths for a second.

@mvmaltitz
Copy link
Collaborator Author

mvmaltitz commented Oct 11, 2024

Below is what the previous plugin looked like for Active Transport. Only the crosswalks (point) are relevant for this ticket:
Image

timlinux added a commit that referenced this issue Oct 11, 2024
Added analysis context menu
In progress alg implementation for point per cell
timlinux added a commit that referenced this issue Oct 11, 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