Introduction:
USGS provides batch file conversion scripts (
http://gisdata.usgs.gov/website/USGS_Raster_Conversion_Scripts.zip) to make it easier to convert
The National Map raster staged products from current downloadable formats into other common formats. These scripts require either Geospatial Data Abstraction Library (GDAL) or Esri ArcGIS software for raster data file conversions. The documentation is in HTML and is under the 'How_To' folder. It includes procedures for getting GDAL from
http://www.gisinternals.com and Esri based scripts that should work with ArcGIS 10.x.
Prerequisites:
- ESRI ArcGIS 10, 10.1, 10.2, or 10.3 - The Python code needs to be able to import arcpy in order to function appropriately. The call to Python is in C:\Python26\ArcGIS10.0 or C:\Python27\ArcGIS10.[1,2, or 3] or in the PATH environment variable.
OR
- The gdal_translate.exe is in the PATH environment variable, or is in C:\Program Files\GDAL\. Steps to install GDAL are demonstrated here.
Conversion Script Walk-throughs:
ESRI ArcGIS Based Script Directions
GDAL Based Script Directions
Python and GDAL PATHS used in the scripts
The batch files provided here attempt to use the GDAL or ArcGIS installed Python utilities in order to perform the conversion. They will attempt to find the correct version of gdal_translate.exe or python.exe in default install locations. If the scripts are unable to find the correct utility, it will try to call the utility without any file path. This only works if the path to the correct gdal_translate.exe or python.exe has been added to the PATH environment variable. If the utlities are not in the default location, and you are unable to change the PATH environment variable (IE: changing environment variables requires privileged access or administrator level account), then you must edit the batch files to correct the path to gdal_translate.exe and/or python.exe.
The version of python used in the default locations is the 32-bit version. ArcGIS 10.2 and newer include both a 32-bit and a 64-bit version of python. To use this, you must edit the batch files to change the python call to using the python.exe in the ArcGISx6410.2 or ArcGISx6410.3 sub-folder of the python install. If you just put the python.exe in the PATH environment variable, the scripts will still find the 32-bit install and use that.
Reference Links:
License