Opened 7 years ago

Closed 7 years ago

#5073 closed defect (duplicate)

GDALINFO console redirection fails with 1.10

Reported by: jolly47roger Owned by: warmerdam
Priority: normal Milestone:
Component: Utilities Version: 1.10.0
Severity: normal Keywords: stdout redirection


I run a program which uses GDALINFO to interrogate the georeferencing data in a PDF file (USGS TOPO) in order to calculate the calibration.

Running Windows, I use a System.Diagnostics.Process to invoke GDALINFO with the STDOUT and STDERR redirected to a stream.

This works fine in GDAL 1.9 but no longer works in GDAL 1.10. (The normal 'DOS' redirect using '>' also fails in GDAL 1.10 - the output file is created but empty)

Change History (3)

comment:1 Changed 7 years ago by Even Rouault

I strongly doubt GDAL is the cause for your issue. It still uses printf() to output on standard output as in previous versions...

Are you sure you have not a dependency problem that would prevent the binary from being executed ?

I've tested "gdalinfo foo.tif > foo.txt" and foo.txt contains the expected output.

The Python autotest suite also checks the output of gdalinfo, and the tests pass.

comment:2 Changed 7 years ago by jolly47roger

I thought this problem had gone away but it has reappeared.

What I have found is that GDAL alone is good but if I install the ECW plugin then redirection stops. If I remove the ECW plugin, everything is good again.

comment:3 Changed 7 years ago by Even Rouault

Milestone: 1.10.1
Resolution: duplicate
Status: newclosed

Closing that ticket, since #5128 has been created about the same issue

Note: See TracTickets for help on using tickets.