[Qgis-developer] VRT functionality

Zoltan Szecsei zoltans at geograph.co.za
Sun Oct 26 08:44:37 PDT 2014


Hi,
I just want to clear up my mindset as to how a VRT is implemented in QGIS.

I'd like to understand when QGIS opens a file, when it reads the 
contents, and when it writes (if need be) and closes a file.
In this context, I am thinking about SHP files - especially the NGI 
dataset which comes out "cut up" into degree squares.
Let's just deal with 1 feature type: Rivers lines. My VRT looks like:
<OGRVRTDataSource>
   <OGRVRTUnionLayer name="Rivers">
   <OGRVRTLayer name="2730_RIVER_LINE_2006_06">
     <SrcDataSource 
relativeToVRT="1">2730/2730_RIVER_LINE_2006_06.shp</SrcDataSource>
   </OGRVRTLayer>
   <OGRVRTLayer name="2731_RIVER_LINE_2006_04">
     <SrcDataSource 
relativeToVRT="1">2731/2731_RIVER_LINE_2006_04.shp</SrcDataSource>
   </OGRVRTLayer>
   <OGRVRTLayer name="2732_RIVER_LINE_2006_04">
     <SrcDataSource 
relativeToVRT="1">2732/2732_RIVER_LINE_2006_04.shp</SrcDataSource>
   </OGRVRTLayer>
   </OGRVRTUnionLayer>
</OGRVRTDataSource>

  * When I open the VRT in QGIS, does QGIS open ALL the VRT files and
    look for the extent of each of the files?
      o If my VRT had the extents included for each of the files, would
        this stop QGIS from (at this stage) opening the files and
        reading the extents?

  * Before rendering the VRT, does QGIS look at the extents of my
    viewport and only physically open my files and render it's contents?
    In other words, if I first zoom into a known area, then open my VRT,
    will QGIS at this stage still open all the subfiles, instead of
    waiting until a specific subfile needs opening)

  * As I pan around my map, does QGIS open and close the VRT subfiles
    that are out of my current viewing region?

  * Presumably if any of my VRT subfiles touch or overlap my current
    viewport, they would be "processed" depending on what I am doing?

  * Is there a way to structure a VRT file so that you can have access
    to the underlying files that make up the VRT? (Even edit access?)


Or, is the VRT just any easy way to bunch a whole lot of maps under one 
name, and there is no processing benefit depending on the area you are 
viewing or working in?

TIA,
Zoltan






-- 

===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
GIS and Photogrammetric Services

P.O. Box 7, Muizenberg 7950, South Africa.

Mobile: +27-83-6004028
Fax:    +27-86-6115323     www.geograph.co.za
===========================================

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20141026/3966bf3e/attachment.html>


More information about the Qgis-developer mailing list