Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for handling and displaying raster result layers in tile form, while also cleaning up an outdated style case.
- Removes a deprecated
building + roadstyle branch instyles.py. - Introduces
load_result_tiles, with separate raster and vector tile loading methods. - Extends the
Processingentity model to include an optionalresult_raster_layer.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| mapflow/styles.py | Removed obsolete building+road style fallback. |
| mapflow/functional/layer_utils.py | Added load_result_tiles entry point, with raster/vector methods. |
| mapflow/entity/processing.py | Added result_raster_layer attribute and parsing in Processing. |
Comments suppressed due to low confidence (1)
mapflow/styles.py:46
- Removing this branch means there is no fallback style for features containing both 'building' and 'road'; confirm this change is intended or add a new style mapping if needed.
name = 'building_heights'
| ) | ||
|
|
||
|
|
||
| def load_result_vector_tiles(self, processing): |
There was a problem hiding this comment.
The load_result_vector_tiles method is incomplete—it only references raster layers. You likely need to generate and request extents for the vector tiles (e.g. using generate_vector_layer and request_layer_extent).
There was a problem hiding this comment.
Loading of the vector layer is carried out by callback of request_layer_extent, where it is passed as callback argument. Unfortunately, we did not find better solutions for this in Qt "request-callback/error handler" async approach
We want to allow new API feature - raster tiles streaming.
In case "show as tiles" this will be a new and preferrable type of result preview, to disallow free usage of vector results.
Older processings will have only vector tiles, so we do not remove this possibility, but newer ones will lack vector tiles (after release of thiss feature at frontend)
In case "download as file" nothing will change, but the api will be hidden behind the paywall (later)