-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fixes and enhancements for GDALTools VRT, GDAL sublayer dialog and browser dock #101
Conversation
…for GDALTools Build Virtual Raster
…ers dock ; add an option to load all sublayers of a GDAL raster with subdatasets
…to raster file names in browser ; add HDF4 file suffix (.hdf) in buildSupportedRasterFileFilterAndExtensions()
I'm adding comments to commit 3c1eb0a (GdalTools) with changes I'm going to do on your patch before applying it. |
everything except 3c1eb0a applied. Thanks. |
Great! thanks a bunch for such a quick response! I missed that recommendation in the guideline in http://hub.qgis.org/wiki/quantum-gis/Developers_Manual Are there emacs macros out there that are compatible with qgis indentation rules? In the dev guidelines, there is a mention of a .indent.pro but I can't find it in the source. regards |
uhm... using both your About your question, the GdalTools dialogs are not modal (you can open more dialogs at one time and continue to work on QGis while tools are running). To make things easy I added that method |
when you mean selected, do you mean the ones that are checked or the ones that are highlighted? My initial goal was to use the ones that were highlighted (regardless of being active/checked), but I didn't see anything to get that). When I tested, only the checked layers were considered. |
I meant highlighted but getting checked layers is also good changing the checkbox label to something like "Use visible raster layers for input". I think it's better to use visible layers instead of selected ones because it's more intuitive. Anyway, to get highlighted layers in the legend you have to use the QgsLegendInterface available through the |
Looking at QgsLegendInterface I only see functions to get visible layers, nothing to get selected/highlighted ones. My idea was that using selected/highlighted layers is faster, because you don't have to render them all, but if you think that it is more intuitive to use the visible/checked layers than that is fine by me. |
Oops, no methods to get selected layers, you're right and now I'm not even sure there's a way to do it (except that using QT methods to get the legend widget from QGis mainWindow). BTW the user does his actions on what he's seeing in that moment IMHO: how could he decide which layers to add to the VRT and which ones keep out without seeing them? |
patch for 3c1eb0a applied! Here's a summary: I removed the |
Giuseppe - thanks a lot! It is great, except for a detail... visible layers are added to self.visibleRasterLayers only when they change, but not when you open the dialog. The following one-liner patch makes sure that visible layers are loaded when the widget is loaded ( add self.onVisibleLayersChanged() to initialize(self) ) diff --git a/python/plugins/GdalTools/tools/doBuildVRT.py b/python/plugins/GdalTools/tools/doBuildVRT.py
|
Applied in 213138e, thanks. |
2.0 Manual Update : Print Composer / Composition Tab
GDALTools Build Virtual Raster - allow to use loaded layers as input files (instead of file selector)
I have enhanced the GDAL Tools VRT dialog to optionally use the active layers as input, instead of manually adding the files.
This is more convenient and also allows to use rasters within subdatasets (e.g. HDF files). I have created this to add (and extend) the functionality of the deprecated RGB composition plugin.
see thread "plugin bug and patch - RGB composition plugin broken in 1.7.4 and master" on the mailing list.
askUserForGDALSublayers dialog:
Jürgen graciously applied my patches for bug #5041 that are related to this.
fixes for browser panel:
( ERROR 4: `/data/research/work/modis/mod13/MOD13Q1.A2009353.h13v10.005.2010009131529.250m 16 days relative azimuth angle.tif.aux.xml' not recognised as a supported file format. )
Add selected layers via context menu and tool button. This is handy when you want to load many layers.
I have added a button with the text "Add Selection" (maybe the text is not necessary) and 2 context menu items ("Add Layer" and "Add Selected Layers")
Thanks, Etienne