Skip to Content.

mget-help - [mget-help] RE: HDF

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


From: "Jason Roberts" <>
To: "'Nicholas Wolff'" <>
Cc: <>
Subject: [mget-help] RE: HDF
Date: Wed, 20 May 2009 23:12:53 -0400
Hi Nick,

It definitely is a problem when you have non-square grid cells. The core
problem is that the most raster formats that Arc can work with require
square cells, or at least rectangular cells that are all the same size. Most
common ArcGIS format, ArcInfo Binary Grid (the kind you get if you do not
specify an extension for the raster name), requires square cells. I have
seen a few ways to deal with this, none of them especially pretty.

1. Pick a format that does support it. Arc 9.2 and later have some support
for NetCDF. This support includes non-square cells. But Arc can be finicky
about what NetCDFs it supports. Your variables have to be defined in the
right way, with the right attributes, etc. You can find HDF to NetCDF
converters. MGET cannot do this.

2. Figure out whether the cells are actually square in another coordinate
system. Sometimes, HDFs or NetCDFs will include variables that specify the
geographic coords (lat, lon) of each cell. You look at these and they do not
increment by a constant rate. This may just mean that the data are
projected. For example, Aviso SSH data is this way. They use a certain
Mercator projection but provide coordinates only in lat, lon. Once you can
track down the documentation on the projection, you can figure out what the
cell size is supposed to be in that projection, and it is square. The MGET
tools that download Aviso data do this.

3. Convert the HDF to points and then interpolate a raster that has square
cells. MGET does not currently have a tool to do this, but it might not be
too difficult to write one in Python. If you are familiar with Python: it is
not too hard to read an HDF variable as a numpy array. You could read the
variable of interest, plus the two variables that record the coordinates
(the dimension variables) and then write out a shapefile using a Python
library or write a CSV file and use ArcGIS's make XY Event Layer or some
utility such as ascii2shp (I wrote a while back) to convert to a shapefile.

Jason

P.S. My correct email address is 

 or 
.
Amazingly, there is another Jason Roberts at Duke, with the alias
.
 I dropped him from my reply because I suspect you mean to
reach me, not him.

-----Original Message-----
From: Nicholas Wolff 
[mailto:]
 
Sent: Wednesday, May 20, 2009 1:46 PM
To: 
;
 

Subject: HDF

Hi,
I work on the Census of Marine Life GoMA project and I have been down
to Duke several times.  I'm using MGET and I love it.

I have a question regarding hdf data.  What do you recommend I do to
deal with with HDF data that has non-square cell size.  I can get your
convert hdf to arcgis raster to work, but of course the latitudes are
off due to the uneven cell size in the underlying data.  How would you
recommend I proceed to get the data correctly projected /
georeferenced?

Thanks,
-Nick

-- 
Nicholas Wolff
University of Southern Maine
350 Commercial Street
Portland, ME 04101
(207) 228-1677

http://www.usm.maine.edu/gulfofmaine-census/

Archives powered by MHonArc.
Top of Page