qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.46k stars 2.99k forks source link

Do not read all time step of a mesh just to find min/max for color ramp #48008

Open nicogodet opened 2 years ago

nicogodet commented 2 years ago

Observation

After a discussion with @vcloarec, I learned that QGIS need to read all the time step to compute the min/max for the color ramp.

It results in a really bad user experience when :

Loading a mesh can take several tens of minutes which is quite unacceptable just for an accurate color ramp.

Request

Could we consider another approach to reduce the loading time ?

FWIT my opinion

I'm ready to sacrifice the color ramp for a reduced loading time. I will change the color ramp right after anyway. It could be possible to sample few time step to set an approximate min/max and later offer the possibility to compute the real min/max.

Additional context

No response

saberraz commented 2 years ago

You need to write the statistics to the file and then MDAL can parse those instead.

nicogodet commented 2 years ago

In my case, SELAFIN, statistics are not written in the file. And it's not in SELAFIN format to write statistics in files.

saberraz commented 2 years ago

You need to ask the format vendor to add that either within the format or as a separate file.

nicogodet commented 2 years ago

Well. SELAFIN format exists for more than 15 years. I don't see my self asking openTelemac consortium to change this format because it does not comply to a newer software. I believe it's up to MDAL/QGIS to adapt and not the other way around.

Load all the file just for a color ramp is a bit aberrant. No one need a precise min/max for this, sampling over the file could be enough.

And I think this is an issue for another formats too.