[Shake-dev] Orientation of the shake_result.hdf IMTS grids?
timbeale at catalyst.net.nz
timbeale at catalyst.net.nz
Tue Sep 17 05:32:42 UTC 2019
Hi,
I'm trying to read the shakemap imts data directly from a
shake_result.hdf file and I'm just a little unsure what lat/long
co-ordinates the 0,0 dataset index refers to. I.e. does the dataset
start from upper-left or lower-left or something else?
I'm trying to read a grid dataset like this:
DATASET "/arrays/imts/GREATER_OF_TWO_HORIZONTAL/PGA/mean" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 217, 303 ) / ( 217, 303 ) }
DATA {
(0,0): -5.84422, -5.83708, -5.82995, -5.82284, -5.81574, -5.80865,
...
I can see the metadata attributes for xmin, xmax, ymin, ymax, which tell
me the lat/long grid that the dataset is in. But what lat/long
co-ordinates does dataset index 0,0 correspond to - is it xmin, ymin? I
saw some references to 'upper left' (i.e. xmin, ymax) in the python code
(e.g. geodict.py getRowCol()) which confused me.
Unfortunately I need to work in another language, so I can't use the
MapIO python code to read the file. I tried to read through the Python
code to work this out, but I got a little lost.
If someone could confirm where the dataset index starts from, that would
be a big help.
Thanks,
Tim
More information about the Shake-dev
mailing list