-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Paste Features As -> New Vector Layer creates a vector layer with invalid CRS #60846
Comments
I can't reproduce the issue with my "working" profile with QGIS 3.40.4, but strangely it occurs with a new profile |
@mblesius, thanks for testing! |
Yes, you're right. I've set this option to use the default layer CRS which is EPSG:25832 in my case. I didn't notice the warning message at first. Thus, I confused UTM Zone 33 for Zone 32. |
Same with Layer > Save As... for a layer that has no CRS set. This looks like expected behavior, since the transformation from invalid crs fails, though we probably could communicate this better to the user. |
@uclaros, looking at the code, it seems to me that such case (invalid source layer's CRS) was not taken in consideration, since in such case an invalid Coordinate Transorm is unawares created (while the invalid destination layer's CRS case was considered, and in such case the Coordinate Transorm is not created), so I think such behaviour is not by design. I'll propose a PR to fix it: it is reasonable to me that, in such case, the chosen CRS should be assigned to the new vector layer. |
Both the code and the documentation suggests that this CRS is for reprojection, not assignment. I think it's more appropriate to disable the crs selector and show a tooltip if the source crs is not valid. Let the user fix his layer, then try again.
I'd consider this a bug as users would expect the coords to be reprojected as the algorithm name hints, not just transferred unchanged! |
@uclaros, in the meantime I've found another glitch in the Paste Features As functionality:
|
What is the bug or the crash?
Using the Paste Features As -> New Vector Layer functionality, if the pasted features doesn't have CRS information, then the new vector layer's CRS is unknown / invalid even properly setting the CRS in the dialog window.
Steps to reproduce the issue
Versions
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: