Imagery to elevation, saving scripts
Skip Pack
Global Mapper User
Hello,
I am working with some 36 band hyperspectral .tif files (with tfw files) containing
16 bit data for each band. I would like to move these to in-process ascii outputs
in and x, y, z, b1, b2 . . . . b36 format, or write out one .bil elevation file. Is there
a way to write out image data into an elevation output or to simply export to ascii
as described above?
Alternatively, I have exported a single band to a .bil image file. I can handle those
outputs with other tools I have. If I could capture the script file that does this, I
could encapsulate it in larger scripts much more quickly than I will be able to develop
such a GML script from scratch.
thanks for your help,
Skip Pack
I am working with some 36 band hyperspectral .tif files (with tfw files) containing
16 bit data for each band. I would like to move these to in-process ascii outputs
in and x, y, z, b1, b2 . . . . b36 format, or write out one .bil elevation file. Is there
a way to write out image data into an elevation output or to simply export to ascii
as described above?
Alternatively, I have exported a single band to a .bil image file. I can handle those
outputs with other tools I have. If I could capture the script file that does this, I
could encapsulate it in larger scripts much more quickly than I will be able to develop
such a GML script from scratch.
thanks for your help,
Skip Pack
Comments
-
Skip,
While there isn't a way to directly export a text file like that, you can export your hyperspectral imagery to a 36-band BIL file using the File->Export Raster Data menu command. You can also do this in a script using the EXPORT_RASTER script command.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Thanks for your response. I generated the following script:
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
IMPORT FILENAME="I:\neptec\first36\aoi\test\1625.tif" \
TYPE=GEOTIFF
EXPORT_RASTER FILENAME="I:\neptec\first36\aoi\test\1625.bil" \
TYPE=BIL \
GEN_WORLD_FILE \
GEN_PROJ_FILE \
PALETTE=MULTIBAND \
NUM_BANDS=1 \
BAND_BIT_DEPTH=32 \
BAND_EXPORT_SETUP=1?1?
UNLOAD_ALL
_____________________________________________________
and it runs to completion with a couple of anomalies. In this case, I want to
export a single band from a 36 band hyperspectral .tiff file to the .bil file.
The .bil file itself seems fine. The first anomaly is that, in spite of the
command to produce a world file, it does not do so. Since that file would
be exactly the same as the .tfw file, I can make a copy and change the
suffix to .blw. The second anomaly is that the .hdr file reflects 3 bands
while I only want one. I can text edit that entry to "1" and go forward.
Please let me know if changes to my script would clear these up.
thanks,
Skip -
Skip,
You need to use GEN_WORLD_FILE=YES and GEN_PROJ_FILE=YES to get those added.
What version of Global Mapper are you using? Your script generates a band count of 1 in the .hdr file for me in v13.00.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
I just added the "=YES" to the two file generation commands and reran the script.
Strangely, the .hdr file now reflects just one band, correctly. I have GM 13 built on
27 September. The other difference in the two runs is that the first was done in
a command window on the command line (GlobalMapper13.exe test1.gms), and the
run just now was made using the run script option from the interface. I'm good to
go forward now.
Thanks,
Skip
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 627 GM Script Language
- 52 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website