lutraconsulting / qgis-crayfish-plugin

Plotting and manipulating mesh data in QGIS.
http://www.lutraconsulting.co.uk/products/crayfish/
Other
62 stars 24 forks source link

FID of exported mesh faces/vertices #373

Closed kastepha closed 3 years ago

kastepha commented 5 years ago

When exporting mesh faces and vertices using Crayfish 3.1.0 in QGIS 3.6.0, the fid attribute of the generated vector layer does not correspond to element and node IDs of the mesh data source (2dm-file). Would it be possible to use the IDs of the data source for the fid attribute? This would be very helpful in order to identify certain nodes and /or elements within the 2D domain.

kastepha commented 3 years ago

Any updates on this issue? In QGIS version 3.16 the fid attribute of the generated vector layer still does not correspond to element and node IDs of the mesh data source (2dm-file). For the users it would be important to be able to identify elements and nodes by their IDs that are used during the simulation

PeterPetrik commented 3 years ago

is it just shifted always by -1 or is the shift by some (random) number?

PeterPetrik commented 3 years ago

problem for 2dm is that it can support gaps in the indexing (https://github.com/lutraconsulting/MDAL/blob/421111bbb073a0372f1d4dafd40fc4f45ba409db/mdal/frmts/mdal_2dm.cpp#L37) so to be able to show original ID , we would need to create additional datasets on vertices/face with one timestep and data will be the index of the vertex/face (similar to what you have as bed-elevation for z-value). Would this solution suit you?

PeterPetrik commented 3 years ago

will be handled in MDAL https://github.com/lutraconsulting/MDAL/issues/325