Closed Q-Cumber closed 1 year ago
@Q-Cumber
Hi Filip,
Thanks for reporting this issue. Based on the second image, it would appear that the attribute table for your branches dataset is wrong. The 'Classæ field should contain information regarding the original connection 'i.e.' X-X, Y-Y, Y-I etc... while the 'Connection' field is the C-C, C-I or I-I paramater (see example below from the Hartland Fracture dataset.
The reason for this error is unclear. Do you have a dataset that you can perhaps share to replicate the error?
Cheers, Björn
Hello Bjorn, thanks for your reply! This issue seems to be file format related. I have saved the geopackage I used as an esri-shp file now and the first column in the branches dataset produced by the 'nodes and branches' tool is now the same as in your example with the correct information on the original connection. The 'sample area' polygon still a geopackage, so it seems like the 'nodes and branches' tool does not handle the .gpkg line input incorrectly.
Unfortunately git hub does not accept geopackages so I'll send you the files I used via email.
Thanks again, Filip
For documentation here on GitHub I should mention that the issue was related to the Geopackage file requiring its own unique ‘fid’ field on creation. When the branches and nodes tool tries to copy the ‘fid’ field from the original fracture network it created problems.
If you reinstall the plugin from the plugin manager, the issue should now be resolved.
Ill keep this issue open for now in case the problem exists in other scripts as well.
hello bjorn,
I wanted to calculate some topology parameters using QGIS 3. The algorithm finishes without error and the input layers are used were generated with the branches and nodes algorithm, so I think the input layers are legit. But still the output columns for the branch type counts and all parameters based on these end up populated with a 0, although the class column in the branch layer I used as an input is populated with reasonable values:
![grafik](https://user-images.githubusercontent.com/24912645/179074114-ce95363f-6684-49f4-a0d6-d42b92c011c8.png)
I looked at the topology_parameters.py and at first glance it seems to me that the value for these columns is set to 0 for these columns here: (https://github.com/BjornNyberg/NetworkGT/blob/b711fdc4cd1ad6f771638d53477ddf5c022a75e5/QGIS/network_gt/networkgt/topology/Topology_Parameters.py#L189-L191)
Could this be the case, because the Class column is not pulled from the input here... https://github.com/BjornNyberg/NetworkGT/blob/b711fdc4cd1ad6f771638d53477ddf5c022a75e5/QGIS/network_gt/networkgt/topology/Topology_Parameters.py#L178
...unlike you did for the nodes here? https://github.com/BjornNyberg/NetworkGT/blob/b711fdc4cd1ad6f771638d53477ddf5c022a75e5/QGIS/network_gt/networkgt/topology/Topology_Parameters.py#L137
I just looked at the code briefly, so I might have missed something. Thanks for your work! Filip