Opened 16 years ago

Closed 16 years ago

#2387 closed defect (wontfix)

Idrisi driver: misleading error message

Reported by: Markus Neteler Owned by: ilucena
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: idrisi
Cc: warmerdam

Description

When opening an IDRISI .rst file which lacks the corresponding .rdc file, the error message is unhelpful:

gdalinfo TMIN_2007_172.rst
ERROR 4: `TMIN_2007_172.rst' not recognised as a supported file format.

gdalinfo failed - unable to open 'TMIN_2007_172.rst'.

It would be useful to have additionally: "TMIN_2007_172.rdc file not found".

Thanks, Markus

Change History (5)

comment:1 by warmerdam, 16 years ago

Cc: warmerdam added
Keywords: idrisi added
Owner: changed from warmerdam to ilucena

Ivan, What do you think?

comment:2 by ilucena, 16 years ago

I would rather not issue any warning on the case where a GDAL driver does not recognize the dataset. I believe that the standard behavior for any driver is to just return null. The .rst is a plain and simple raw bag of pixels but the extension .rst is not exclusive to Idrisi either so, imagine that someone store HDF5 (or any other free extension raster) with .rst as extension. The result will an annoying warning message:

% gdalinfo TMIN_2007_172.rst Warning: If that is a Idrisi RST file, the .rdc file is missing! ERROR 4: `TMIN_2007_172.rst' not recognised as a supported file format.

But if the file is recognized by another driver:

% gdalinfo TMIN_2007_172.rst Warning: If that is a Idrisi RST file, the .rdc file is missing! Driver: HDF4/Hierarchical Data Format Release 4 Files: TMIN_2007_172.rst Size is 512, 512 Coordinate System is `' Metadata:

HDFEOSVersion=HDFEOS_V2.9 Number_of_Instrument_Scans=2040 Maximum_Number_of_1km_Frames=1354

...

Frank, If the that doesn't seams to happens very often (how else uses .rst anyway) and if the warning message is not so annoying, I will go ahead and add the warning, no problem.

comment:3 by Markus Neteler, 16 years ago

If it helps for reasoning: I don't know anything about Idrisi but have got 1000+ files like that from a research project. Reading http://www.gdal.org/frmt_Idrisi.html I understand that it should work, but it doesn't. Only from Ivan I learned (thanks!) that also an .rcs file is needed which is absent.

Mumble, I just see that the docs say "The description of the file is stored in a companying text file, extension RDC.". Maybe add to the docs that absence of both Idrisi on the system and rds file lead to a problem?

Markus (plain user hat on)

comment:4 by ilucena, 16 years ago

So we have to proposals here: add a warning message and/or change the documentation.

I think that the documentation is good enough the way it stands now. It mentions the importance of .RDC files and it mentions the advantage of having Idrisi on the system. It doesn't requires Idrisi on the system but it implies that a "description" is.

The warning message at that point is against the GDAL standards so it could cause some problems. But again, that would be so hare that someone uses .RST for something other than Idrisi files that would be better to just do it. Or not.

comment:5 by ilucena, 16 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.