Bug report #20079
CRS with Scaling in PROJ4 causes Vertex Tool to fail
|Affected QGIS version:||3.2.3||Regression?:||Yes|
|Operating System:||MacOS||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||duplicate|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||27901|
I created a CRS based on a State Plane and added a +k_0 parameter in order to make measured dimensions fit ground references in my images.
After entering the first line segment, I wanted to adjust the endpoints with the Vertex Tool. I could not "grab" by clicking on either the endpoint, nor the line segment.
When I tested by switching the CRS of the layer back to the state plane (the line naturally jumped to a new part of the map), the Vertex Tool was able to select and modify the line endpoints.
It looks like the Vertex Tool is not considering the scaling (+k_0) parameter. I tested with the deprecated +k parameter, and got the same results.
I ran a little experiment to see if it was only the scaling that was missing for the Vertex Tool
Layer 1 is in the scaled CRS
Layer 2 is a copy of that layer, same CRS minus the scaling.
Layer 2, naturally is displaced on the map. If activate Layer 1, and hover the Vertex Tool over where the line shows up in Layer 2, IT HIGHLIGHTS points on the Layer 1 location.
That is to say, the Vertex Tool "finds" the feature according to the non-scaled version of the CRS, but displays the highlights using the scaling.
There is another CRS with scaling bug that occurs when saving a layer, which I will file a separate bug report for.
This is my first bug report, so please let me know if I need to do anything differently. Will be happy to provide more information.
#1 Updated by Keith Johnson over 2 years ago
Well, now I cannot reproduce this bug!
Vertex Tool is now finding features on layers with scaling in the CRS. I cannot figure out what changed.
However, I do know that when I create the layer (saved to =gpkg file), the CRS of the newly created layer DOES NOT include the scaling.
If I change the CRS of the layer to my named custom projection (with the scaling) before adding any features. then the vertex tool behaves normally.
The bug is not with the vertex tool, apparently, but with the CRS scaling info being left out of the saved file. I reported this in another bug report#20080.
I apologize for the errant bug report here.