Skip to Content.

mget-help - RE: [mget-help] about using "Convert SDS in HDFs Listed in Table To ArcGIS Rasters"

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


From: "Jason Roberts" <>
To: "'Grazia Zulian'" <>
Cc: <>
Subject: RE: [mget-help] about using "Convert SDS in HDFs Listed in Table To ArcGIS Rasters"
Date: Tue, 5 May 2009 10:57:20 -0400

Grazia,

 

The best way to start is to first convert one HDF file using the Convert SDS in HDF to ArcGIS Raster tool. By starting with just one file using this tool, you will figure out most of the parameters you need for the batch tools. There is an example here.

 

Once you know how to do that, you can either of the other two tools. The one you mentioned, Convert SDS in HDFs Listed in Table to ArcGIS Rasters, is the harder one but is suitable for certain situations. Before you use this tool, you must create a table with two columns. The first column lists the path to an HDF file. The second column lists the path to an ArcGIS raster that you want created from that HDF file. You can create this table using whatever mechanism is easiest for you. For example, you could use Microsoft Excel, or you could use the MGET Find Files tool to create a table listing the HDFs, then use Add Field to create a field to hold the raster paths, then use Calculate Field to populate the raster paths from the HDF names.

 

In addition to specifying the table and the columns to use, you must also provide the parameters you provided to the Convert SDS in HDF to ArcGIS Raster tool (SDS name, x coordinate, and so on).

 

The other tool, Find HDFs and Convert SDS to ArcGIS Rasters, may be slightly easier. This tool requires you to pick an input directory containing the HDFs and an output directory to receive the rasters. For some HDFs, you can then just run the tool (after also specifying the parameters you provided to Convert SDS in HDF to ArcGIS Raster). But most of the time you must also modify the Output Raster Python _expression_ that appears under Output Raster Name Options. This _expression_ is responsible for assigning the output raster name given the input HDF name. By default, it just uses the first 13 characters of the HDF name (only the characters that appear before the first period). This is because ArcGIS rasters, when stored in the default format (ArcInfo Binary Grid), have the constraint that they cannot exceed 13 characters in length. They must also start with a letter, and can only contain letters, numbers, and the underscore character. Many HDFs have long names, and the first 13 characters are often the same. When this happens, the tool will report an error message saying that two inputs resulted in the same output names, and you must adjust the _expression_ so that this does not happen. The tool does not allow you to proceed, because it would mean the raster from one HDF would output the raster from another. If you are comfortable with Python programming, you'll be able to easily adjust the _expression_ to fix the problem. If not, please email me back when this error occurs and I will help you fix it.

 

Best regards,

 

Jason

 

From: Grazia Zulian [mailto:]
Sent: Tuesday, May 05, 2009 9:18 AM
To:
Subject: [mget-help] about using "Convert SDS in HDFs Listed in Table To ArcGIS Rasters"

 

 

Hi

I downoaled Marine Geospatial Ecology Tools for working on HDF data.

I need to convert and mosaic hundreds of *.hds files. SO I’d like to use the Convert SDS in HDFs Listed in Table To ArcGIS Rasters. But I can’t understand how to organize the table. And to fill up the parameters. Could you give me a support?

Thanks, regards

 

Grazia Zulian, PhD

Rural, water and Ecosystem Resources (RWER) Unit

Institute for Environment and Sustainability

European Commission,

Joint Research Centre

Ispra (I)

Ph. +390332786281

Fax +390332785601

 

Archives powered by MHonArc.
Top of Page