My script to export data to usgs executes however it does not result in any output
I want to export multiple .tif files or .tif files in a .tar zip to usgs dem format.
The following is the script I tried for exporting all the files in the directory.
calling this script in command prompt does not give any, however it does give any result as well.
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
// Loop over all DEM files in a folder and convert them
DIR_LOOP_START DIRECTORY="J:\Data\" FILENAME_MASKS="*.tif" RECURSE_DIR=NO
// Import an archived SDTS DEM file. Global Mapper will automatically
// determine that this is an archived SDTS DEM file and load it
// correctly.
IMPORT FILENAME="%FNAME_W_DIR%" ANTI_ALIAS=YES
// Export Raster file to USGS DEM.
EXPORT_RASTER FILENAME="%DIR%%FNAME_WO_EXT%.DEM" TYPE=USGS_DEM GEN_PRJ_FILE=YES
// Unload the loaded data
UNLOAD_ALL
// End the loop
DIR_LOOP_END
Trying to find out the issue and a solution.
Thanks in advance,
Pavan.
Comments
-
Hello,
Do your GeoTIFF files load correctly in the UI for Global Mapper? When you are going to import a file in a script, it is often helpful to load the file with the settings that you want in the main user interface and then save a workspace. A workspace file is a script, so you can examine the IMPORT command for your file in the .gmw to see what other parameters may have been set. The LOAD_FLAGS parameter can be important. In particular, GeoTIFF files often need a parameter that indicates whether it is a raster image or elevation grid.
Cheers,
Bob -
Thanks Bob, using import parameters works.
Categories
- 12.9K All Categories
- 5.7K Features Discussion
- 346 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 643 GM Script Language
- 54 User Scripts
- 115 GPS Features
- 419 Projection Questions
- 829 Raster Data
- 1.4K Vector Data
- 6.6K Support
- 179 Announcement and News
- 926 Bug Report
- 561 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 574 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 241 How I use Global Mapper
- 108 Global Mapper Forum Website