Opened 17 years ago

Closed 15 years ago

#104 closed enhancement (fixed)

HDF read-only access

Reported by: mggr Owned by: benj
Priority: alpha 4 medium Milestone: The Glorious Future
Component: az* programs Keywords:
Cc: Other processors:

Description

Peter Land suggested altering azgcorr to allow L1 files to be opened read-only. Currently they are opened read-write, which causes problems if they are on / were copied from read-only media.

Change History (5)

comment:1 Changed 17 years ago by mggr

Bill replied with:

Mike,

I have had a further look at this suggestion of Peter's (of course, over the years, he is not the only person to bring this up!). I would assume my original problems with the HDF library in 1995 have been cured and it would also be a possible advantage to be able to open the HDF-1 file read-only so that it can reside on a read-only file system.

The outstanding problem is that the link library was not written to be re-entrant and as azgcorr has two HDF files open with the HDF-3 being write, the relevant HDF accesses (Vattach and VSattach, etc) have to be write for both files; hence why the HDF-1 file is opened wr.  This issue only affects azgcorr as no other program has two HDF files open at once.  All the other az programs update the HDF-1 file so it is opened wr.

It would take around 3 days to change and test.  Do you think this is worth the effort?

Br Bill

===================

Peter,

Unfortunately simple suggestions do not always have simple solutions. The history of this is:

In 1995, when I wrote the high level access library used in all the az programs including azgcorr there was a bug in the HDF library routine  Hopen; this, at the time, was the way of opening an HDF file for vgroup access.

For it to work under solaris, it could only be opened read/write.

In the rest of the link library I also used "write" access to do all operations on any vgroups and vdatas. So the link library has many calls that would have to considered and altered to allow the HDF file to be opened read-only.

Personally I don't think the effort is worth it but if you put the suggestion for change to Mike and Pete Purcell; meanwhile I will estimate how long it will take to implement and test.

Br Bill


On 31 Jan 2008, at 13:19, Peter Land - RSG wrote:

> Hi Bill,
>
> Here's a simple suggestion, how about azgcorr opening its input L1B file
> readonly? At the moment I have to make copies of my readonly L1B files
> so azgcorr can open them RDWR and then not write to them!
>
> Cheers, Peter

comment:2 Changed 17 years ago by mggr

Replied that this is definitely a nice-to-have, but need to fix things like #81 first. Bill suggested making a list of our priorities, which I'll do.

comment:3 Changed 16 years ago by mggr

Additional changes for ILS access that Bill will do at the same time.

ils access:  the problem was that with an external level-1 BIL holding the image data and the HDF file with the ils and rest, when the level-1 access is made in azexhdf it indicates the file type is BILi because I only have one flag for the main image item - it really needs flags for each item. All that is needed is a bit of logic to check which image item has been requested and the image file access initialised appropriately.

The image link routines ( part of my HDF link library ) handle HDF or BIL by having the same high level calls for read/write but then have a lower layer that does either HDF-SDS or BIL. In theory this part should be re-entrant so you can access both in the same program at the same time. So it is moderately complicated and I try to avoid quick mods in case the whole card pack falls!

I have held off finishing it as it really means a release of all programs to re-link everything with the slightly changed HDF link library. I will do this when I do the open read-only and new HDF release update.

comment:4 Changed 16 years ago by mggr

  • Owner changed from mggr to benj

Handing to Ben as he's been testing this - close if fixed :)

Note comment on ILS access.

comment:5 Changed 15 years ago by benj

  • Resolution set to fixed
  • Status changed from new to closed

Appears to be fixed. Closing ticket.

Note: See TracTickets for help on using tickets.