Quantcast
Channel: Question and Answer » gdal
Viewing all articles
Browse latest Browse all 397

Suppress verbose output when something goes wrong with ogr2ogr

$
0
0

Whenever ogr2ogr is not able to read a file, it seems to produce pages of output:

Unable to open datasource `file.geojson' with the following drivers.
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> SDTS
  -> TIGER
  -> S57
  -> DGN
  -> VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> NAS
  -> GML
  -> GPX
  -> LIBKML
...

Is there a way to suppress this incredibly annoying output? My workaround is:

ogr2ogr ... 2>&1 | grep -v '^  ->'

Viewing all articles
Browse latest Browse all 397

Trending Articles