Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open MDAL data dialog does NOT show All files #27528

Closed
qgib opened this issue Aug 27, 2018 · 3 comments
Closed

Open MDAL data dialog does NOT show All files #27528

qgib opened this issue Aug 27, 2018 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers

Comments

@qgib
Copy link
Contributor

qgib commented Aug 27, 2018

Author Name: Richard Duivenvoorde (@rduivenvoorde)
Original Redmine Issue: 19703
Affected QGIS version: 3.3(master)
Redmine category:data_provider/mdal


In current master if I open a Mesh via the Data Source Manager by clicking on the ... button, I get an 'Open MDAL Supported Mesh Dataset(s)' dialog, with on the bottom the possibility to only show 'GRIB Files', '2DM Meshfile' or All files.

BUT even using the 'All files', I do not see all files. Only when I rename a file to something.grib I start to see it.

To test: go to: https://data.knmi.nl/datasets/harmonie_p1/0.2?q=grib

To get a current weather grib file, untar the .tgz file which will open as a long list of filenames like:
/tmp/harm36_v1_ned_surface_2018082700_048_GB (not without extension!)

But you will not be able to open those, unless you rename them to *.grib (see screenshot, where I untarred the tgz into my /tmp and only renamed 1 of the files to /tmp/harm36_v1_ned_surface_2018082700_048_GB.grib)

Also added a screenshot to show the mesh in QGIS because it is so cool :-)


@qgib
Copy link
Contributor Author

qgib commented Oct 19, 2018

Author Name: Richard Duivenvoorde (@rduivenvoorde)


Ok, I had a look into this myself, and found that the value of mFilter in qgsfilewidget.ccp

https://github.com/qgis/QGIS/blob/master/src/gui/qgsfilewidget.cpp#L254-L278

Was different for different kind of files:

For grib it was:

"All files(.);;GRIB File(*.grb *.grb2 *.bin *.grib *.grib1 .grib2);;2DM Mesh File(.2dm);;3Di Resu"

For rasters it is:

"All files ();;GDAL/OGR VSIFileHandler (.zip *.gz *.tar *.tar.gz *.tgz *.ZIP *.GZ *.TAR *.TAR.GZ *."

For csv it is:

"Text files (*.txt *.csv *.dat .wkt);;All files ( .)"

AND actually only the csv shows ALL files for me!

According to http://doc.qt.io/qt-5/qfiledialog.html#setNameFilters using "." is not portable.
They point to dot-files, but in my case the downloaded grb files without(!) any extension is also not shown.

I'll add a patch which change All files(.) to All files(*).

Grepping on "All files(*" there are still a lot of other places where this is used.


  • assigned_to_id removed Peter Petrik

@qgib
Copy link
Contributor Author

qgib commented Oct 19, 2018

Author Name: Richard Duivenvoorde (@rduivenvoorde)


See #8245

@qgib
Copy link
Contributor Author

qgib commented Oct 22, 2018

Author Name: Richard Duivenvoorde (@rduivenvoorde)


Applied in changeset 4fa62e9.


  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Oct 22, 2018
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers
Projects
None yet
Development

No branches or pull requests

1 participant