[Qgis-developer] Plugin GdalTools - Build Virtual Raster
(catalog) idea to develop
Giuseppe Sucameli
sucameli at faunalia.it
Thu Nov 25 14:04:26 EST 2010
2010/11/25 Germán Carrillo <carrillo.german at gmail.com>
> The waste of time occurs when you call the add layer methods (either vector
> or raster) several times and the QGIS canvas is refreshed once by layer, so
> you can see every layer refreshing the canvas unnecesarily. For me it's
> certainly a waste of time. Anyway, QGIS manages this in an appropriate way
> by providing the setRenderFlag method.
I filed a ticket, see ticket #3254 [1]
As Santiago proposed, he'd like the Build Virtual Raster tool to take into
> account files in subdirectories, so you can use some code of the Load Them
> All plugin to achieve this, particularly the getFilesToLoad method in
> LoadFiles.py. Of course, you won't load more than one layer, but anyway you
> need to look for layers in subdirectories.
>
The GdalTools batch tools already have a function to get all the files
contained a
directory and that function can also search for files recursively into
subdirectory
(as implemented in the Assign Projection tool).
I'm just trying to help, if you find my comments causing troubles please
> ignore them :)
>
Don't you worry, your comments was very useful!!
Cheers.
Regards,
>
> Germán
>
> 2010/11/24 Giuseppe Sucameli <sucameli at faunalia.it>
>
>> Germán,
>>
>> 2010/11/25 Germán Carrillo <carrillo.german at gmail.com>
>>
>> I mean, the Load Them All plugin receives a base directory and an
>>> extension (e.g. GML) to look for layers in the base directory and in its
>>> subdirectories. It also loads those layers to QGIS by managing the canvas
>>> setRenderFlag method to avoid an unnecessary waste of time in the process.
>>>
>> the BuildVRT tool add only one layer to canvas. I unable to find the waste
>> of time
>> in cases like this.
>>
>> Instead managing the render flag would be pretty useful in batch tools
>> (e.g. Translate).
>> Thanks a lot, I'm going to improve each batch tool by properly
>> disabling/enabling the
>> render flag while it adds layers to canvas.
>>
>> Cheers.
>>
>> Regards,
>>>
>>> Germán
>>>
>>> 2010/11/24 Giuseppe Sucameli <sucameli at faunalia.it>
>>>
>>>> Hi Germán,
>>>>
>>>> 2010/11/24 Germán Carrillo <carrillo.german at gmail.com>
>>>>
>>>> I think you may reuse some code of the Load Them All Plugin [1] to
>>>>> accomplish this.
>>>>>
>>>> what did you mean writing "to accomplish this", to load the layers or
>>>> maybe to do a recursive scan?
>>>>
>>>> Cheers.
>>>>
>>>>
>>>>> Regards,
>>>>>
>>>>> Germán
>>>>>
>>>>> -------------------
>>>>> [1]
>>>>> http://geotux.tuxfamily.org/index.php?option=com_myblog&task=view&id=264&Itemid=59&lang=en
>>>>>
>>>>> 2010/11/24 Giuseppe Sucameli <sucameli at faunalia.it>
>>>>>
>>>>>> Hi Santiago,
>>>>>>
>>>>>> On Wed, Nov 24, 2010 at 6:01 PM, Santiago Lastra <
>>>>>> santiago.lastra at gmail.com> wrote:
>>>>>>
>>>>>>> Recently I've found this very interesting and useful tool, at least
>>>>>>> for me. I will propose two ways to improve the tool:
>>>>>>> - The tool right now offers the user the possibility to select as
>>>>>>> many files as he wants inside a directory. I propose to give also the
>>>>>>> possibility to define only a directory that contains raster files (of every
>>>>>>> kind), with a check box to give the oportunity to follow the subdirectories
>>>>>>> of the first one.
>>>>>>>
>>>>>> there's an opened ticket yet, see [1] ;)
>>>>>>
>>>>>> - I think it's better to explain my problem and I think you will
>>>>>>> understand the reason of my second proposal. I have directories with up to
>>>>>>> 2000 raster files or even more. If you try the tool as is and if you select
>>>>>>> "add to canvas", it takes several minutes to load and see the virtual raster
>>>>>>> catalog (VRT) into QGIS, but if I zoom in to the right scale QGIS move the
>>>>>>> images very quickly. What I suggest is to add in the dialog the possibility
>>>>>>> to define the "scale dependent visibility" when the VRT is added to the TOC
>>>>>>> of QGIS.
>>>>>>>
>>>>>> Why don't you stop the rendering? So you can set the "scale dependent
>>>>>> visibility"
>>>>>> range using the existent layer properties dialog.
>>>>>>
>>>>>> Simply you can disable it either before you add the layer or while
>>>>>> QGis loads it.
>>>>>> Or maybe did I misunderstand?
>>>>>>
>>>>>> Cheers.
>>>>>>
>>>>>> [1] https://trac.osgeo.org/qgis/ticket/3095
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Giuseppe Sucameli
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Qgis-developer mailing list
>>>>>> Qgis-developer at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>>>>
>>>>>> --
>>>>> -----------
>>>>> |\__
>>>>> (:>__)(
>>>>> |/
>>>>>
>>>>> Soluciones Geoinformáticas Libres
>>>>> http://geotux.tuxfamily.org/
>>>>>
>>>>> _______________________________________________
>>>>> Qgis-developer mailing list
>>>>> Qgis-developer at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Giuseppe Sucameli
>>>>
>>>>
>>>
>>>
>>> --
>>> -----------
>>> |\__
>>> (:>__)(
>>> |/
>>>
>>> Soluciones Geoinformáticas Libres
>>> http://geotux.tuxfamily.org/
>>>
>>> _______________________________________________
>>> Qgis-developer mailing list
>>> Qgis-developer at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>>
>>
>>
>> --
>> Giuseppe Sucameli
>>
>>
>
>
> --
> -----------
> |\__
> (:>__)(
> |/
>
> Soluciones Geoinformáticas Libres
> http://geotux.tuxfamily.org/
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
--
Giuseppe Sucameli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20101125/b07ad60c/attachment.html
More information about the Qgis-developer
mailing list