Bug report #21501
Distance matrix does not maintain data type and precision for Input Point Layer in Linear (N*k x 3)
|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|
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
#4 Updated by Andy Whyte 5 months 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