Link to USGS home page

U.S.G.S. Planetary GIS Web Server - PIGWAD

Planetary Interactive G.I.S.-on-the-Web Analyzable Database

PERL Code

all updated March 19, 2009

For parameters and examples, just type the name of the program without any options. The MsDOS/Windows versions are just the PERL scripts compiled using perl2exe. Windows users do not need PERL to be install but if you do, I would suggest installing ActiveState Perl.

These programs work on a single file. Here are a couple examples to run on several files (options may need to be different):

  • Unix/Linux
    • foreach i (*.cub)
    • perl isis2world.pl -e $i
    • end
  • In MsDOS command window (for Windows machines)
    • for %i in (*.img) do pds2world -t %i

 

  • isis2world.pl (MsDOS/Windows version isis2world.exe) - This program parses an ISIS cub to grab out needed information (line_projection_offset and sample_projection offset) to generate a detached georeference world file and a detached header file needed for programs like Arc/Info, ArcView, ENVI, etc. The values in the world file are in projected meters.  Current defaults output a raw band interleaved by line (*.blw) if the input image is one band or band sequential world file (*.bqw) if the input image has multiple bands. This program will work on 32 bit image files but software like ArcView 3.x will not be able to read it.  For 32 bit data use isis2arc to generate an ESRI ASCII Grid format. If you are using ArcMap 8.x or ERDAS use the "-e" switch, which can support 8, 16, and 32 bit data. Here are some example runs - all parameters are optional. For an MsDOS run, just run "isis2world":

perl isis2world.pl [-bit=8|16] [-c|-e|-g|-t|-j|-r] input.cub
-c = output cub header and world file; w/ skipbytes for ISIS image (default)
-e = output ERDAS raw header and world file (8, 16, 32 bit)
-p = output PCI raw header (8, 16, 32 bit)
-P = output PNG
-g = output gif world file
-t = output tif world file
-j = output jpeg world file
-J = output jpeg2000 world file
-r = output raw header and world file; w/ skipbytes = 0 
-bit = 8 or 16 forces the header to set the bit type to 8 or 16. Normally don't need.

-prj = to create Well Known Text (WKT) projection file for the input (input.prj)

Examples:
Create files for an ISIS cub: perl isis2world.pl input.cub
Create files for 32 bit cub for ArcMap or ERDAS: perl isis2world.pl -e input.cub
Create worldfile for tif: perl isis2world.pl -t input.cub
Create files for 8 bit raw: perl isis2world.pl -bit=8 -r input.cub


  • isis2world_dd.pl (MsDOS/Windows version isis2world_dd.exe) - This program parses an ISIS cub to grab out needed information (line_projection_offset and sample_projection offset) to generate a detached georeference world file and a detached header file needed for programs like Arc/Info, ArcView, ENVI, etc. The values in the world file are in geographic or lat/lon and thus should ONLY be used on files with a "SIMP" (simple cylindrical) projection set.  Current defaults output a raw band interleaved by line (*.blw) if the input image is one band or band sequential world file (*.bqw) if the input image has multiple bands. This program will work on 32 bit image files but software like ArcView 3.x will not be able to read it.  For 32 bit data use isis2arc to generate an ESRI ASCII Grid format. If you are using ArcMap 8.x or ERDAS use the "-e" switch, which can support 8, 16, and 32 bit data. Examples will be the same as above.

  • isis3world.pl (MsDOS/Windows version isis3world.exe) - This program parses an uncompressed ISIS3 image or label to grab out needed information (line_projection_offset and sample_projection offset) to generate a detached georeference world file and a detached header file needed for programs like Arc/Info, ArcView, ENVI, etc. The values in the world file are in projected meters.  All raw formats will require a non-tiled image or BSQ format except the ERDAS Raw format which can handled both. Examples will be the same as above.
  • pds2world.pl (MsDOS/Windows version pds2world.exe) - This program parses an uncompressed PDS image or label to grab out needed information (line_projection_offset and sample_projection offset) to generate a detached georeference world file and a detached header file needed for programs like Arc/Info, ArcView, ENVI, etc. The values in the world file are in projected meters.  Currently outputs a raw band interleaved by line (*.blw) if the input image is one band or band sequential world file (*.bqw) if the input image has multiple bands. This program has not been fully tested and should only be used with map projected images. Examples will be the same as in the isis2world section.

  • vicar2world.pl (MsDOS/Windows version vicar2world.exe) - This program parses an uncompressed VICAR image or label to grab out needed information (line_projection_offset and sample_projection offset) to generate a detached georeference world file and a detached header file needed for programs like Arc/Info, ArcView, ENVI, etc. The values in the world file are in projected meters.  Currently outputs a raw band interleaved by line (*.blw) if the input image is one band or band sequential world file (*.bqw) if the input image has multiple bands. This program was written for MEX images and has not been fully tested with other VICAR images. It  should also only be used with map projected images. Examples are mostly the same as in the isis2world section.

U.S. Department of the Interior | U.S. Geological Survey | Astrogeology Research Program
HOME | Search | Disclaimers & Privacy
Send Comments to: thare@usgs.gov
URL:
Last modified: