Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 - geospatial.intergraph.com/products/other/ERDASERMapper/… –  Mapperz Jul 17 '12 at 15:26
2  
... which is not free software... –  markusN Jul 17 '12 at 20:55
add comment

2 Answers 2

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 `'
Subdatasets:
  SUBDATASET_1_NAME=HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":0
  SUBDATASET_1_DESC=[6002x6470] L71001027_02720020904.B10 (8-bit unsigned integer)
  SUBDATASET_2_NAME=HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":1
  SUBDATASET_2_DESC=[6002x6470] L71001027_02720020904.B20 (8-bit unsigned integer)
  SUBDATASET_3_NAME=HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":2
  SUBDATASET_3_DESC=[6002x6470] L71001027_02720020904.B30 (8-bit unsigned integer)
  SUBDATASET_4_NAME=HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":3
  SUBDATASET_4_DESC=[6002x6470] L71001027_02720020904.B40 (8-bit unsigned integer)
  SUBDATASET_5_NAME=HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":4
  SUBDATASET_5_DESC=[6002x6470] L71001027_02720020904.B50 (8-bit unsigned integer)
  SUBDATASET_6_NAME=HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":5
  SUBDATASET_6_DESC=[3001x3235] L71001027_02720020904.B60 (8-bit unsigned integer)
  SUBDATASET_7_NAME=HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":6
  SUBDATASET_7_DESC=[6002x6470] L72001027_02720020904.B70 (8-bit unsigned integer)
  SUBDATASET_8_NAME=HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":7
  SUBDATASET_8_DESC=[12004x12940] L72001027_02720020904.B80 (8-bit unsigned integer)
  SUBDATASET_9_NAME=HDF4_SDS:UNKNOWN:"L71001027_02720020904_HDF.L1G":8
  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
etc...
share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.