Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to convert a Landsat L1G raster file like L71001070_07020000728_B30.L1G to Geotiff using free software?

share|improve this question
ER Mapper Demo (30 day) license -… – Mapperz Jul 17 '12 at 15:26
... which is not free software... – markusN Jul 17 '12 at 20:55

Use a version of GDAL that includes HDF4 support. As you don't specify what OS you're using, I'm assuming Windows. The OSGEO4W package includes GDAL with HDF4 support (note that Tamas' GIS Internals GDAL binary packages do not come with HDF4 built in).

Use gdalinfo to get an overview of the data structure, pass it the *_HDF.L1G file as an argument:

gdalinfo L71001027_02720020904_HDF.L1G

You'll see something like:

Driver: HDF4/Hierarchical Data Format Release 4
Files: L71001027_02720020904_HDF.L1G
Size is 512, 512
Coordinate System is `'
  SUBDATASET_1_DESC=[6002x6470] L71001027_02720020904.B10 (8-bit unsigned integer)
  SUBDATASET_2_DESC=[6002x6470] L71001027_02720020904.B20 (8-bit unsigned integer)
  SUBDATASET_3_DESC=[6002x6470] L71001027_02720020904.B30 (8-bit unsigned integer)
  SUBDATASET_4_DESC=[6002x6470] L71001027_02720020904.B40 (8-bit unsigned integer)
  SUBDATASET_5_DESC=[6002x6470] L71001027_02720020904.B50 (8-bit unsigned integer)
  SUBDATASET_6_DESC=[3001x3235] L71001027_02720020904.B60 (8-bit unsigned integer)
  SUBDATASET_7_DESC=[6002x6470] L72001027_02720020904.B70 (8-bit unsigned integer)
  SUBDATASET_8_DESC=[12004x12940] L72001027_02720020904.B80 (8-bit unsigned integer)
  SUBDATASET_9_DESC=[3001x3235] L72001027_02720020904.B60 (8-bit unsigned integer)

Each band is represented as an HDF subdataset. Use gdal_translate to convert from L1G to GeoTiff. Note the syntax for specifying a subdatset.

gdal_translate HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":0 band1.tif
gdal_translate HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":1 band2.tif
share|improve this answer

I've never done it myself but try:

These should all be able to read it and write GeoTIFF. Make sure HDF file format support is enabled in the software you choose. You might have to create the world file yourself.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.