[gdal-dev] vsistdin and VRT

Even Rouault even.rouault at spatialys.com
Fri Mar 15 08:26:16 PDT 2019


On vendredi 15 mars 2019 18:14:48 CET Nikolai Bezdna wrote:
> Can vsistdin be used in VRT source definition?
> So that one can use output from another utility (osmium in my case) as a
> valid OGR source.

The general answer is No. This depends a lot of the underlying driver (the 
format must allow sequential reading), and how you use it afterwards.

A particular case where this might work is a VRT referencing CSV:/vsistdin/ 
and using that vrt as the source for ogr2ogr

For example with test.vrt being:

<OGRVRTDataSource>
  <OGRVRTLayer name="test">
    <SrcDataSource>CSV:/vsistdin/</SrcDataSource>
    <SrcLayer>layer</SrcLayer>
  </OGRVRTLayer>
</OGRVRTDataSource>

you can do:

cat test.csv | ogr2ogr -f GML out.gml test.vrt 

Even

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


More information about the gdal-dev mailing list