Conversation
Added a clone stamp tool to the toolbar for raster editing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Radosław and the Lutra Consulting team! First of all, thank you for this amazing and incredibly useful plugin.
The Problem:
When working with high-resolution DSMs (Digital Surface Models), power lines and narrow obstacles are often captured and act as solid walls, which completely ruins viewshed or line-of-sight analyses. While the current "Apply Low-Pass Filter" is great, using it over a power line and its surrounding terrain creates a flat "terrace" (it averages the heights). We needed a way to remove the obstacle while perfectly preserving the natural slope and texture of the surrounding terrain.
The Solution:
I've implemented a true "Clone Stamp" tool (similar to Photoshop's workflow) built natively on top of your
RasterHandler.Key Features:
ServalCloneTool(Custom QgsMapTool): Allows for continuous brush strokes (dragging) rather than just single clicks.canvasMoveEvent. The tool only writes a new block when the mouse moves a certain distance based on the brush size, preventing the QGIS undo stack from flooding during long brush strokes.All changes are integrated smoothly into the existing UI and respect the current plugin architecture. I hope you find this contribution useful for the community! Let me know if you need any adjustments to the code.