[Qgis-user] mdal / mesh simple formats

Peter Petrik peter.petrik at lutraconsulting.co.uk
Mon Aug 29 22:51:42 PDT 2022


Hi Matt,

all files in the MDAL/tests/data are supported and should be working. There
could be few possibilities why it does not work: 1) your QGIS does not have
that particular MDAL driver compiled 2) you are not opening the file as
mesh layer but as raster/vector layer
MDAL has a small command line utility that can be used to test if your file
works without QGIS (you may need to compile it though)

Kind Regards,
Peter Petrík
CPO of Mergin Maps
LI <https://www.linkedin.com/in/peter-petrik/>, Mergin Maps
<https://www.merginmaps.com>





On Mon, Aug 29, 2022 at 2:01 PM Matt Boyd <mattslists at gmail.com> wrote:

> Thanks Peter,
> my data already looks very similar to the xdmf sample, my plan was to
> just replicate this format or something not very different.
>
> github .... lutraconsulting...   MDAL\tests\data\xdmf\simple
>
> However, I can't get QGIS to load simpleXFMD.xmf or simpleXFMD.h5. The
> xmf isn't recognised and the h5 just comes in as a single line of
> squares.
> I was hoping this format was supported as they are in the MDAL repo.
> Are the xmf/h5 supported or are they in there as an example of what is
> converted to the supported 2dm format?
>
> Thanks again, any light you could shed would be appreciated.
>
> Matt
>
>
>
> On Mon, Aug 29, 2022 at 9:01 PM Peter Petrik
> <peter.petrik at lutraconsulting.co.uk> wrote:
> >
> > Hi Matt,
> >
> > MDAL basically supports a bunch of data formats that are mostly defined
> by the suppliers of the results. It comes with the fileformat (e.g. ASCII
> or netCDF, ...) + data spec (which arrays are defined/expected with which
> properties). So either you need to replicate one of the supported formats or
> > alternatively we can write a data reader for your format in MDAL.
> >
> > Kind Regards,
> > Peter Petrík
> > CPO of Mergin Maps
> > LI, Mergin Maps
> >
> >
> >
> >
> >
> > On Sat, Aug 27, 2022 at 3:02 AM Matt Boyd via Qgis-user <
> qgis-user at lists.osgeo.org> wrote:
> >>
> >> Thanks Richard,
> >> that looks interesting. I can now get regular grid / square mesh to
> >> display correctly but I'm working with tri-mesh and anything I try to
> >> load using that ends up like this..Just a line of squares.
> >> There's something obvious I'm missing in the format here.
> >>
> >> On Fri, Aug 26, 2022 at 4:56 PM Richard Duivenvoorde
> >> <rdmailings at duif.net> wrote:
> >> >
> >> > Hi Matt,
> >> >
> >> > I'm not a Mesh expert either, but I use (and create) netcdf using
> python using the
> >> > https://github.com/Unidata/netcdf4-python module
> >> >
> >> > Netcdf is pretty good supported in QGIS in my experience
> >> >
> >> > Our data has also a time dimension so we use the CF convention [0]
> and fiddling around with the so called UGRID convention [1] But maybe that
> is both too much for a simple tin...
> >> >
> >> > I Googled:
> >> >
> https://stackoverflow.com/questions/48864357/convert-hdf5-to-netcdf4-in-bash-r-python-or-ncl
> >> > as being able to convert hdf5 to netcdf... didn't/couldn't try/test
> though..
> >> >
> >> > Regards,
> >> >
> >> > Richard Duivenvoorde
> >> >
> >> > [0]
> https://en.wikipedia.org/wiki/Climate_and_Forecast_Metadata_Conventions
> >> > [1]
> http://ugrid-conventions.github.io/ugrid-conventions/#data-variables
> >> >
> >> > On 8/26/22 03:32, Matt Boyd via Qgis-user wrote:
> >> > > Thanks, thats pretty helpful.
> >> > > I'm running QGIS 3.26.2-Buenos Aires installed from osgeo.
> >> > > under the xdmf directory there the xmf/hdf files look pretty similar
> >> > > to what I'm using but they won't load. there's a partial duplicate
> of
> >> > > the data in the hdf file in that directory as a 2dm file which does
> >> > > work.
> >> > > I'm still not sure if I'm supposed to be able to load the xmf/hdf
> >> > > files directly using mdal? I can easily drop out my hdf5 data to the
> >> > > 2dm format is this the proposed way to do it?
> >> > >
> >> > > Thanks again
> >> > > Matt
> >> > >
> >> > > On Fri, Aug 26, 2022 at 4:09 AM Delaz J via Qgis-user
> >> > > <qgis-user at lists.osgeo.org> wrote:
> >> > >>
> >> > >> Hi Matt,
> >> > >>
> >> > >> The mdal repo has a number of mesh data
> >> > >> (https://github.com/lutraconsulting/MDAL/tree/master/tests/data)
> but
> >> > >> whether these are simple meshes/formats or not is beyond my
> >> > >> understanding of this data type.
> >> > >>
> >> > >> Hope that helps,
> >> > >>
> >> > >> Harrissou
> >> > >>
> >> > >> Le 25/08/2022 à 09:41, Matt Boyd via Qgis-user a écrit :
> >> > >>
> >> > >>> Hi QGIS people,
> >> > >>> I asked something like this a couple of years ago, managed to find
> >> > >>> some workarounds and now that I know a little more about what I'm
> >> > >>> doing I could use a bit of help.
> >> > >>> I've got some simple tin meshes that I'd like to drop into QGIS,
> they
> >> > >>> get generated in a python modelling software I'm using.
> >> > >>> The data all sits in a single hdf5 file, points with coordinates,
> the
> >> > >>> cells which are just the indexes of 3 points, plus attributes for
> each
> >> > >>> point. About the simplest mesh setup I can imagine.
> >> > >>> I'm trying to find the simplest format that mdal supports with an
> >> > >>> example dataset so I can make something similar. (ideally hdf5 so
> I
> >> > >>> don't need to work out how to use anything new in python).
> >> > >>>
> >> > >>> Any tips?
> >> > >>> Thanks
> >> > >>> Matt
> >> > >>> _______________________________________________
> >> > >>> Qgis-user mailing list
> >> > >>> Qgis-user at lists.osgeo.org
> >> > >>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> >> > >>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> >> > >> _______________________________________________
> >> > >> Qgis-user mailing list
> >> > >> Qgis-user at lists.osgeo.org
> >> > >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> >> > >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> >> > > _______________________________________________
> >> > > Qgis-user mailing list
> >> > > Qgis-user at lists.osgeo.org
> >> > > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> >> > > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> >> >
> >> _______________________________________________
> >> Qgis-user mailing list
> >> Qgis-user at lists.osgeo.org
> >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220830/46b97646/attachment.htm>


More information about the Qgis-user mailing list