User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2020-09-22 16:17:32

Lukas Vonwiller
Developer
Registered: 2014-09-04
Posts: 127

QGIS and gdal cannot read xdmf and related data

dear community,
dear developers,

We have the problem that with the new BASEMENT Version 3.0.2 the results (xdmf-output) cannot be loaded into QGIS as a mesh layer:

"could not read mesh dataset."

QGIS Version: LTR 3.10 A Coruna
OS: Ubuntu 18.04

The paths in the xdmf file to the results.h5 and results_aux.h5 is not absolute, e.g. results.h5.
Therefore its not related to the solution proposed in the post Error xdmf.

With the BASEMENT Version 3pre this problem didn't occur.
Is this problem related to the GDAL mesh layer?

Thanks for your input!
best, Lukas

Last edited by Lukas Vonwiller (2020-09-22 16:56:03)

Offline

#2 2020-09-23 10:46:04

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: QGIS and gdal cannot read xdmf and related data

Hey Lukas,

I had a similar issue...check the order of the elements and of the nodes in the 2dm file. If it is not sorted it could lead to problems in reading the mesh file.

However, it should be fixed in the latest basemesh release, but it might be that you generated the mesh weeks ago...

Hope this helps
Matteo

Offline

#3 2020-09-23 15:48:42

Lukas Vonwiller
Developer
Registered: 2014-09-04
Posts: 127

Re: QGIS and gdal cannot read xdmf and related data

Ciao Matteo

Thanks for the hint, but the elements and nodes in the 2dm file are sorted in ascending order.

When using BMv3_BASEplane_results (pre-Version) for results.h5 container (simulation done with Version 3.0.2) the error does not occur. 
But in this case you dont't have the flow velocities...

Best, Lukas

Offline

#4 2020-09-24 16:57:04

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: QGIS and gdal cannot read xdmf and related data

Have you tried to install QGIS 3.14? From this page I downloaded QGIS-OSGeo4W-3.14.1-1 and everything works fine for me.

Give it a try!

Offline

#5 2023-07-21 08:37:22

Lukas Vonwiller
Developer
Registered: 2014-09-04
Posts: 127

Re: QGIS and gdal cannot read xdmf and related data

For the BASEMENT Version 4.0.1 and QGIS 3.28.8 the same error occurs (Could not read mesh dataset).

However with the following hack you can read the data into QGIS.
In the xdmf file replace the first two lines

<?xml version="1.0"?>
<Xdmf Version="3.0">

with the following lines

<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf Version="2.0">

Hope this hack helps for users and for a quick fix in the next release!

cheers

Offline

#6 2023-08-17 10:38:42

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: QGIS and gdal cannot read xdmf and related data

Ciao Lukas!
The change was suggested also in this topic
Take care
Matteo

Offline

Board footer

Powered by FluxBB