lutraconsulting / MDAL

Mesh Data Abstraction Library
http://www.mdal.xyz/
MIT License
160 stars 50 forks source link

Time dataset for .ply driver #461

Closed jmkerloch closed 1 year ago

jmkerloch commented 1 year ago

I'm looking for a file format to create a file that will be supported by QGIS for mesh display. I need to have a format that support:

I checked the source code of MDAL and I created this table for comparison of MDAL supported drivers:

Driver Description Read mesh Read data Write mesh Write data
XDMF XDMF :red_circle: :green_circle: :red_circle: :red_circle:
XMDF TUFLOW XMDF :red_circle: :green_circle: :red_circle: :red_circle:
ASCII_DAT DAT :red_circle: :green_circle: :red_circle: :green_circle:
BINARY_DAT Binary DAT :red_circle: :green_circle: :red_circle: :green_circle:
3Di 3Di Results :green_circle: :green_circle: :red_circle: :red_circle:
ESRI_TIN Esri TIN :green_circle: :green_circle: :red_circle: :red_circle:
GRIB GDAL Grib :green_circle: :green_circle: :red_circle: :red_circle:
NETCDF GDAL NetCDF :green_circle: :green_circle: :red_circle: :red_circle:
HEC2D HEC-RAS 2D :green_circle: :green_circle: :red_circle: :red_circle:
SWW AnuGA :green_circle: :green_circle: :red_circle: :red_circle:
TUFLOWFV TUFLOW FV :green_circle: :green_circle: :red_circle: :red_circle:
XMS_TIN XMS Tin Mesh File :green_circle: :green_circle: :red_circle: :red_circle:
FLO2D Flo2D :green_circle: :green_circle: :red_circle: :green_circle:
2DM 2DM Mesh File :green_circle: :green_circle: :green_circle: :red_circle:
Ugrid UGRID :green_circle: :green_circle: :green_circle: :green_circle:
PLY Stanford PLY Ascii :green_circle: :green_circle: :green_circle: :green_circle:
SELAFIN Selafin File :green_circle: :green_circle: :green_circle: :green_circle:

I wanted to use driver with write support in MDAL so this limits the usable driver to:

Driver Description Data on vertices Data on faces Data on edges Data on volumes
SELAFIN Selafin File :green_circle: :red_circle: :red_circle: :red_circle:
PLY Stanford PLY Ascii Mesh File :green_circle: :green_circle: :green_circle: :green_circle:
Ugrid UGRID :green_circle: :green_circle: :red_circle: :red_circle:

I'm doing some tests with .ply file but I'm not able to display Time dataset with this driver.

Is it supported by MDAL ?

PeterPetrik commented 1 year ago

@runette is the maintainer of PLY format https://github.com/lutraconsulting/MDAL/blob/master/mdal/frmts/mdal_ply.cpp

vcloarec commented 1 year ago

UGRID should be a good candidate. I don't understand the "Read data" column. You can read data with a lot of the driver in red.

jmkerloch commented 1 year ago

@vcloarec It seems that I have an issue with my github clone. My master branch won't update anymore.

I created this table with an outdated code of MDAL... I will update the issue as soon as possible.

Do you confirm that UGRID support temporal capabilities ?

vcloarec commented 1 year ago

@jmkerloch yes.

jmkerloch commented 1 year ago

@vcloarec I just updated the table but I only changed UGRID, for other drivers I don't understand that they have read support from source code.

For exemple, GDAL related drivers only have Capability::ReadMesh.

https://github.com/lutraconsulting/MDAL/blob/deba23b30491c416fb4536c1d5f459d5a44b9225/mdal/frmts/mdal_gdal.cpp#L526

Is there something that I missed while reading MDAL source code ?

vcloarec commented 1 year ago

ReadData for the capability means the driver can only read datan no mesh frame, that is there no information about the mesh in the file. These files are related to another mesh format. Generally, 2DM format that does not store data.

jmkerloch commented 1 year ago

@vcloarec so If capability is Capability::ReadMesh that means that it can also read data on mesh vertices or faces ?

I didn't get this, but how should I understand the capabilities for SELAFIN Driver:

https://github.com/lutraconsulting/MDAL/blob/deba23b30491c416fb4536c1d5f459d5a44b9225/mdal/frmts/mdal_selafin.cpp#L614

Depending on the file use you don't have information about the mesh in file ?

vcloarec commented 1 year ago

SELAFIN is quite particular... If I remember well, you can read some data for a mesh coming from a file from another file.

runette commented 1 year ago

The PLY format has not concept of time datasets. Each file is one dataset.

On Mon, 29 May 2023, 10:04 Peter Petrik, @.***> wrote:

@runette https://github.com/runette is the maintainer of PLY format https://github.com/lutraconsulting/MDAL/blob/master/mdal/frmts/mdal_ply.cpp

— Reply to this email directly, view it on GitHub https://github.com/lutraconsulting/MDAL/issues/461#issuecomment-1566726438, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARC2M4SOGKFHRPWCARRJ2LXIRKBXANCNFSM6AAAAAAYSODD4U . You are receiving this because you were mentioned.Message ID: @.***>

runette commented 1 year ago

I have always thought that table and the contents are confusing and not necessarily correct.

On Mon, 29 May 2023, 16:23 jmkerloch, @.***> wrote:

@vcloarec https://github.com/vcloarec so If capability is Capability::ReadMesh that means that it can also read data on mesh vertices or faces ?

— Reply to this email directly, view it on GitHub https://github.com/lutraconsulting/MDAL/issues/461#issuecomment-1567206701, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARC2M65WW67UYMPP3KGMILXISWO3ANCNFSM6AAAAAAYSODD4U . You are receiving this because you were mentioned.Message ID: @.***>

jmkerloch commented 1 year ago

@vcloarec @PeterPetrik It seems that only some of the drivers have temporal capabilities because of the format implemented.

Is there any way to define which driver support temporal capabilities ?

jmkerloch commented 1 year ago

I'm closing this issue since it's not related to .ply driver.

I created a new issue #463 about documentation with my understanding of reading capabilities for MDAL.