Bug report #21501
Distance matrix does not maintain data type and precision for Input Point Layer in Linear (N*k x 3)
Status: | Open | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Victor Olaya | ||
Category: | Processing/QGIS | ||
Affected QGIS version: | 3.7(master) | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 29318 |
Description
I have noticed that the distance matrix does not maintain precision or data type in InputID field created from the ID of the Input Point Layer to the tool.
This is an issue because it means I cannot join my result to an existing layer. The Target Point layer does not seem to do this.
For example the attached shapefile has an ID column (double, REAL, 20, P=0). When run through the distance matrix it inserts a decimal place. Additionally even if I use an integer ID field the output table will still not join to itself so it must be changing the type somehow to stop it from joining.
I am using QGIS 3.6
History
#1 Updated by Giovanni Manghi over 5 years ago
- Category changed from Unknown to Processing/QGIS
#2 Updated by Victor Olaya over 5 years ago
- Assignee set to Victor Olaya
#3 Updated by Victor Olaya over 5 years ago
- File Clipboard01.png added
I am not able to reproduce it. Loooking at the code, the algorithm copies the input field definition literally, and doenst alter it.
As you can see in the attached screenshot, the fields in the output table have precision 0
#4 Updated by Andy Whyte over 5 years ago
Victor Olaya wrote:
I am not able to reproduce it. Loooking at the code, the algorithm copies the input field definition literally, and doenst alter it.
As you can see in the attached screenshot, the fields in the output table have precision 0
Now try and join your "InputID" field from your distance matrix back to your Point layer "REFKEY" field
#5 Updated by Andy Whyte over 5 years ago
- File Test.PNG added
The input ID is assigned a decimal point - please see PNG image.
#6 Updated by Giovanni Manghi over 5 years ago
- Operating System deleted (
Windows 10) - Priority changed from High to Normal
- Affected QGIS version changed from 3.6.0 to 3.7(master)