- marked as minor
Fine move cross-hair with arrows
In order to accurately positioning the cross-hair for retrieving spectra, fine movement using some combination of key+arrow would be greatly appreciated
Comments (34)
-
reporter -
@jakimowb similar to Andreas suggestion Issue
#179 -
Now that we can define a pixel grid for a MapView, we should have this feature to move single pixel steps (according to the selected pixel grid) in any direction using e.g. CTRL+ArrowKey
-
-
assigned issue to
-
assigned issue to
-
reporter Is this going to be implemented?
-
@Benjamin Jakimow I would love to see that in the upcoming release. Is that an easy one? Shall we give it priority?
-
Well, it’s a bit unclear to me which behaviour should be implemented when e.g. pressing CTRL + LEFT Arrow
1. moving the displayed map extent by 1pixel to the left?
2. moving the crosshair position by 1 pixel to the left (and/without moving the map extent)?
3. simulating a mouse-click onto the pixel left to the last mouse-clicked position? This might trigger activated map tools, e.g. theCursorLocationMapTool
on which the spectral profile source panel is listening to? -
Well, it’s a bit unclear to me which behaviour should be implemented when e.g. pressing CTRL + LEFT Arrow
1. moving the displayed map extent by 1pixel to the left?
2. moving the crosshair position by 1 pixel to the left (and/without moving the map extent)?
3. simulating a mouse-click onto the pixel left to the last mouse-clicked position? This might trigger activated map tools, e.g. theCursorLocationMapTool
on which the spectral profile source panel is listening to?- map extent is not altered
- yes, crosshair is moved by one pixel
- yes, simulate a left-mouse-click
-
addresses
#259Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 617f9e64ee62>>
-
addresses
#259Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 8de7d1c9a0e1>>
-
addresses
#259Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 84cb32c6de47>>
-
addresses
#259Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 14c4de3d2244>>
-
- changed status to resolved
resolves
#259mapcanvas-crosshair can be moved by: <Arrow> -> standard QGIS behaviour, moves map canvas by 1/4 of extent width/height CTRL + <Arrow> : simulates left-mouse button click event -> moves crosshair CTRL + SHIFT + <Arrow> : simulated left-mouse button click + release event -> moves crosshair and sends location request (e.g. to sample SpectralProfiles)
Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 567c46e4bafb>>
-
Nice!
-
@Benjamin Jakimow the cross hair is moving, but the left-mouse-click is not triggered and the profile plot is not updated.
-
Oh wait, I missed some commits.
-
No, isn’t working as expected.
-
- changed status to open
-
Also, I would prefere to not center the cross-hair over the target pixel:
When starting here:
The cross-hair should go here:
And not here:
-
The subpixel location should be moved exactly by the pixel size.
-
- changed version to 3.9
-
Oh, I just saw that I have to press CTRL + SHIFT + <Arrow> to have the Profile updated.
Why not just always simulate the click?
-
@Andreas Rabe
as written in the commit message:<Arrow key> → QGIS Standard behaviour
CTRL + <Arrow key> → move croshsair
CTRL + SHIFT + <Arrow> → move crosshair & collect position information (e.g. a profile)so you can leave-out pixels you are not interested in but still navigate by keyboard
-
@Andreas Rabe please create a new ticket for the subpixel location issue. probably it’s related to the CRS transformation between layer and map canvas grid. However, so far I miss a clear description how to replicate what you showed in the screenshots
-
Can we use CTRL + <Arrow> to move crosshair & collect position information?
And CTRL + SHIFT + <Arrow> for just moving.
I think most of the time you want to have the profile updated and pressing 3 keys is more complicated than pressing two keys
-
I think it’s more convenient that additional actions require additional or other keys, not less.
Probably it’s also more common to navigate between pixel positions of interest, e.g. single trees or distinct roof pixels. In that case positions between two pixels-of-interest should not be written into the spectral library.
-
Alrighty then, keep it as is.
-
There are two way of adding spectral profiles into a spectral library widget:
- provisional, which will replace provisional profiles (highlighted in green) added in the step before
- permanently, in which case profiles are colorized as specified in the profile visualization settingsMaybe it’s better to separate the collection of spectral profiles into:
1. CTRL + <Arrow>: goto next pixel and add provisional profile. this might be the default and also update other widgets related to a changed cursor location (like the cursor location panel)
2. CTRL + <Arrow> + SHIFT: as (1) but add profiles permanent
(so far this is implemented now)
3. <another none-reserved key combination>, e.g. CTRL + A to add provisional profiles permanently.
In this case it is the question this should affect the spectral library widget (SLW) with
a) widget focus only
b) all opened SLW which show provisional profiles
c) only those SLWs, which got delivered a set of provisional profiles during the last mouse / arrow key clickThis way you can “browse and investigate” pixel positions (1.), without saving them permanently, and “save” profiles (3.) of interest if they are appropriate to your needs.
-
CTRL + <Arrow>: goto next pixel and add provisional profile. this might be the default and also update other widgets related to a changed cursor location (like the cursor location panel)
Yes!
And, I would not implement all the other things you mentioned.
Ctrl + <Arrow> is equal to clicking on the neighbouring pixel. I would keep it that simple.
Let’s make the final decision together with Sebastian and Fabian. I place a Trello card!
-
Issue
#179was marked as a duplicate of this issue. -
addresses
#259if mapcanvas is in focus, pressing Key S will save current profiles permanentlySigned-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 6b1287773be2>>
-
Just tested it and does exactly what I wanted.
Shall we close or do you want to have/discuss the functionality 2, 3a/b/c from above?
-
- changed status to resolved
-
reporter A bit lost with the discussion, but using Ctrl + <Arrow> and Ctrl + <Arrow> then S works very well. Love this functionality.
Using 3.9.20210926T092955.develop
- Log in to comment