[Qgis-developer] Vector equivalent of a VRT

Even Rouault even.rouault at spatialys.com
Sun Oct 26 07:22:30 PDT 2014


> I still get no syntax errors on opening the VRT, and no features either.
> Could it be the 'slashes' in the filename? 

No that's OK

> I would have thought they'd
> be OK because they are in double-quotes:

You likely need to add the attribute  relativeToVRT="1" in <SrcDataSource> so 
that the paths are interpreated relatively to the VRT file.

i.e.

 <SrcDataSource  
relativeToVRT="1">2730/2730_RIVER_LINE_2006_06.shp</SrcDataSource>

You can check with "ogrinfo -al /path/to/your.vrt" to see if it works and if 
there are error messages.

> 
> <OGRVRTDataSource>
>    <OGRVRTUnionLayer name="Rivers">
>    <OGRVRTLayer name="2730_RIVER_LINE_2006_06">
> <SrcDataSource>2730/2730_RIVER_LINE_2006_06.shp</SrcDataSource>
>    </OGRVRTLayer>
>    <OGRVRTLayer name="2731_RIVER_LINE_2006_04">
> <SrcDataSource>2731/2731_RIVER_LINE_2006_04.shp</SrcDataSource>
>    </OGRVRTLayer>
>    <OGRVRTLayer name="2732_RIVER_LINE_2006_04">
> <SrcDataSource>2732/2732_RIVER_LINE_2006_04.shp</SrcDataSource>
>    </OGRVRTLayer>
>    </OGRVRTUnionLayer>
> </OGRVRTDataSource>
> 
> 
> Regards,
> Zoltan

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the Qgis-developer mailing list