Writing a hyperslab to file

This may seem simple to most, so hopefully I'll get a response.

We're working on keeping soldiers safe from IED's in Iraq and I have been
stuck on this problem for two days.

I have a source file. From that file, I select a hyperslab, 250x250 from it
and place it into a 2D array data[250][250]. I do some math with the array
and then I need to output the array to another HDF file.

The problem is that I can not for the life of me get it to create a new file.
I want to create a file that is the size of the original input file
(6000x4000) and fill in the data one hyperslab at a time (250x250).

I'm using C++ and Visual Studio 2005. Any suggestions? If someone could
write some pseudo code, I can handle the rest, I just don't even know where
to start

Do I have to create a dataset that enables chunking?

Do the chunks have to be the same size as the array I want to print?

Does it need to be an extendible dataset? (I don't see why, it's always a
fixed size 6000x4000 [or larger])

Very respectfully,

Phil Salesses
Cartographic Technician
U.S. Army Topographic Engineering Center (TEC)
7701 Telegraph Road
Alexandria, VA 22315-3864
Mark.P.Salesses@usace.army.mil

TEC R&D - Anything But Ordinary

Hi Mark,

This may seem simple to most, so hopefully I’ll get a response.

We’re working on keeping soldiers safe from IED’s in Iraq and I have been stuck on this problem for two days.

I have a source file. From that file, I select a hyperslab, 250x250 from it and place it into a 2D array data[250][250]. I do some math with the array and then I need to output the array to another HDF file.

The problem is that I can not for the life of me get it to create a new file. I want to create a file that is the size of the original input file (6000x4000) and fill in the data one hyperslab at a time (250x250).

I’m using C++ and Visual Studio 2005. Any suggestions? If someone could write some pseudo code, I can handle the rest, I just don’t even know where to start

Do I have to create a dataset that enables chunking?
Do the chunks have to be the same size as the array I want to print?
Does it need to be an extendible dataset? (I don’t see why, it’s always a fixed size 6000x4000 [or larger])

  Hmm, have you seen the HDf5 tutorial and example code web-pages? Here's the URL:

http://www.hdfgroup.org/tutorial5.html

    Quincey

···

On Jun 3, 2008, at 9:03 AM, Salesses, Mark P ERDC-TEC-VA wrote:

Very respectfully,
Phil Salesses
Cartographic Technician
U.S. Army Topographic Engineering Center (TEC)
7701 Telegraph Road
Alexandria, VA 22315-3864
Mark.P.Salesses@usace.army.mil

TEC R&D - Anything But Ordinary

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.