[gdal-dev] New capabilities in OGR VRT : OGRVRTWarpedLayer and OGRVRTUnionLayer

Even Rouault even.rouault at mines-paris.org
Sun Jul 1 13:51:34 PDT 2012


FYI, I've just commited into trunk a few extensions to the OGR VRT syntax.

In addition to the existing <OGRVRTLayer>, <OGRVRTDataSource> can now accept :
- a <OGRVRTWarpedLayer> child to do on-the-fly reprojection of a base layer
- a <OGRVRTUnionLayer> to do on-the-fly concatenation of several base layers.

Examples from the updated http://gdal.org/ogr/drv_vrt.html :

Example: Reprojected layer (GDAL >= 2.0.0)
The following example will return the source.shp layer reprojected to 

        <OGRVRTLayer name="source">

Example: Union layer (GDAL >= 2.0.0)
The following example will return a layer that is the concatenation of 
source1.shp and source2.shp.

    <OGRVRTUnionLayer name="unionLayer">
        <OGRVRTLayer name="source1">
        <OGRVRTLayer name="source2">

The unioning capability can also be used in OGR SQL, for example :
"SELECT * FROM first_layer UNION ALL SELECT * FROM second_layer"

Best regards,


More information about the gdal-dev mailing list