lutraconsulting / MDAL

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

Problem opening hydro_as-2d dataset when mesh has gaps in vertex indexing #112

Closed saberraz closed 5 years ago

saberraz commented 5 years ago

Example data sent to @PeterPetrik

PeterPetrik commented 5 years ago

Looks like in the file the number of nodes is 56701, but DEPTH.dat states it stored data for 57719 entries. The dat file is hence inconsistent with the mesh

peter@pp-mb:~/GIS/MDAL/bugs/bug_MDAL_112$ grep -rn E4Q hydro_as-2d.2dm | wc -l
   55639
peter@pp-mb:~/GIS/MDAL/bugs/bug_MDAL_112$ grep -rn ND hydro_as-2d.2dm | wc -l
   56701
peter@pp-mb:~/GIS/MDAL/bugs/bug_MDAL_112$ grep -rn ND DEPTH.dat 
DEPTH.dat:2:ND  57719
PeterPetrik commented 5 years ago

error reporting should be improved by #102

saberraz commented 5 years ago

The same files were opened successfully in QGIS 2.18 using old Crayfish

PeterPetrik commented 5 years ago

The problem was when the 2DM mesh uses gaps in vertex numbering. This is pretty much only used in hydro_as-2d AFAIK.