Welcome to the Harris Geospatial documentation center. Here you will find reference guides and help documents.


  >  Docs Center  >  Using ENVI  >  Save and Chip Output

ENVI

Save and Chip Output

Save and Chip Output

You can save raster and vector files to a file, and you can create a screen capture (or chip) of all layers displayed in the current view and save it to a file, print layout view, ArcMap™, Geospatial PDF, or PowerPoint.

See the following sections:

Save Files


Use File > Save As > Save As (ENVI, NITF, TIFF, DTED) to save image data to ENVI, NITF, TIFF, or DTED formats.

You can also write a script to export files to these formats (except DTED) using ENVIExportRasterToENVITask, ENVIExportRasterToNITF20Task, ENVIExportRasterToNITF21Task, ENVIExportRasterToNSIF10Task, and ENVIExportRasterToTIFFTask.

ENVI does not retain display enhancements for images when you use Save As. These include rotating, zooming, contrast, brightness, sharpening, stretching, Portals, or viewing multiple layers. Use the File > Chip View To options to retain display enhancements, which is described later in this topic.

If an image contains both standard and Rational Polynomial Coefficient (RPC) spatial references, the RPC information will not be written to the file header upon saving to ENVI format.

Also use this menu option to save vector layer changes to a shapefile (.shp). The vector layer must be the active layer, and it must have been modified. You cannot edit or save Esri® layer files.

  1. From the menu bar, select File > Save As > Save As (ENVI, NITF, TIFF, DTED). The File Selection dialog appears.
  2. Select an input file and perform optional subsetting and masking, then click OK. The Save File As Parameters dialog appears.
  3. Select a format from the Output Format drop-down list. The following options are available:
    • NITF: NITF 2.0 and 2.1 or NSIF 1.0. If you select this option, the Compression drop-down list appears. See Save NITF Files for further instructions.
    • ENVI: ENVI writes the data to ENVI image format and creates and saves an associated header file (.hdr) to disk. This option is disabled for input NITF files with multiple image segments.
    • TIFF: TIFF and GeoTIFF. This option is disabled for input NITF files with multiple image segments.
    • DTED: Digital Terrain Elevation Data. This option is disabled for input NITF files with multiple image segments.
  4. Enter a Data Ignore Value, which is the pixel value that ENVI should ignore when processing data or computing statistics from the image you are saving. Click the Find Suitable Data Ignore Value button to automatically determine a suitable value to use based on the image statistics and data type. After the image has been saved and redisplayed, pixels with the specified data ignore value will be transparent in the view and marked as NoData.
  5. Click the Browse button to open the Select Output Filename dialog and choose an output destination and filename. Click Open accept the output file settings.
  6. Keep the Display Result check box enabled to automatically display the output result in the Image window view. Disable the check box if you do not want to automatically display the output.
  7. Click OK. If you enabled Display Result, ENVI automatically displays the result. The output is also added to the Data Manager.

Save File as ASCII


This option saves raster data to ASCII (.txt) files that contain the digital number (DN) values for every pixel. If you output multiple bands, the file interleave is the same as the input file. The format of the ASCII file is that of a 2D array.

  1. From the menu bar, select File > Save As > ASCII. The Output File to ASCII Input Filename dialog appears.
  2. Select a file and perform optional spatial subsetting, then click OK. The Output to ASCII Parameters dialog appears.
  3. Enter an integer value for Total Field Size to set the total number of characters in the field.
  4. To set the number of digits that follow the decimal point in the output data, enter a value for Decimal Precision.
  5. Enter an output filename and directory, then click OK.

Save File as ArcView Raster


This option saves output data to ArcView® raster (.bil) format file, including the associated .hdr and .stx files. The output file does not contain datum and ellipsoid information.

  1. From the menu bar, select File > Save As > ArcView Raster.
  2. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Output File to ArcView dialog appears.
  3. Enter an output filename and directory, then click OK.

Save File as CADRG


You can also write a script to export files to CADRG format using ENVIExportRasterToCADRGTask.

This option saves raster data to Compressed ARC Digitized Raster Graphics (CADRG) format. You must have a ENVI NITF/NSIF Module license to write to CADRG format.

  1. From the menu bar, select File > Save As > CADRG.
  2. Select an input file and perform optional spatial subsetting, then click OK. The RPF (CADRG) Output Parameters dialog appears.
  3. Enter an output directory.
  4. Select a Resolution from the drop-down list.
  5. Select a Classification, Country Code, Release Marking, and Producer code option from the drop-down lists provided.
  6. The Originating Station ID and Originator's Name fields are automatically populated with the values (with the same names) from the nitf.cfg file located in the \classic\menu folder of the ENVI installation path. You can override these as needed. The first field is the station ID of the organization in which the image originated. The second field is the image originator name.
  7. Click OK. ENVI creates an RPF directory containing the A.TOC file and a subdirectory under RPF containing the output.

Note: You can customize the country code, release marking, and producer code drop-down lists by editing the rpf_countries.txt, rpf_release.txt, and rpf_producer.txt files located in the menu directory of your ENVI installation.

Save File as CIB


This option saves raster data to Controlled Image Base (CIB) format. You must have a ENVI NITF/NSIF Module license to write to CIB format.

  1. From the menu bar, select File > Save As > CIB.
  2. Select an input file and perform optional spatial subsetting, then click OK. The RPF (CIB) Output Parameters dialog appears.
  3. Enter an output directory.
  4. Select a Resolution from the drop-down list.
  5. Select a Classification, Country Code, Release Marking, and Producer code option from the drop-down lists provided.
  6. Click OK. ENVI creates an RPF directory containing the A.TOC file and a subdirectory under RPF containing the output.

Note: You can customize the country code, release marking, and producer code drop-down lists by editing the rpf_countries.txt, rpf_release.txt, and rpf_producer.txt files located in the menu directory of your ENVI installation.

Save File as ER Mapper


This option saves raster data to ER Mapper format, including required header fields, a bad bands list, band names, and map information or pixel sizes. ER Mapper files are output in a UTM projection only.

  1. From the menu bar, select File > Save As > ER Mapper.
  2. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Output File to ArcView dialog appears.
  3. Enter an output filename and directory, then click OK.

Save File as ERDAS IMAGINE


This option saves raster data to IMAGINE (.img) format. ENVI saves the following file attributes when saving a file in IMAGINE 8.x format:

  • Map information
  • Class colors and names for classification images
  • Spatial and spectral subsets
  • NaN values
  • Unrestricted numbers of samples, lines, or bands
  • Data type: unsigned byte, integer, unsigned integer, long integer, unsigned long integer, floating-point, double-precision floating point, complex, and double-precision complex

Follow these steps to save files to IMAGINE format:

  1. From the menu bar, select File > Save As > ERDAS IMAGINE.
  2. Select an input file and click OK. The ERDAS IMAGINE Output Parameters dialog appears.
  3. The Block Width and Block Height fields default to an optimized block size (in pixels) for writing. You can change the default values as desired, especially if you want to specify the optimal ERDAS block size (64 by 64 pixels). The input image can be any interleave type, but the image is written as block band sequential (BSQ) interleave.
  4. Blocks are similar to tiles used by ENVI to manage data. The size of the block dictates how much image data is processed at one time. Smaller block sizes may result in slower writing performance.

  5. The Enter Output IMAGINE Filename field defaults to the root filename, but uses the .img extension for the IMAGINE format. You can change the path and filename.

  6. You can assign any name to the file, but it must have the .img extension. If the file size is greater than the 2 GB limit, a second file using the root name and the .ige extension is automatically generated in the same directory as the .img file.

  7. Note: If the filename contains a character that is not valid for the ERDAS filename convention, it is changed to an underscore character (_) when the file is saved.

  8. Click OK.

Save File as JPEG2000


This option saves raster data to JPEG2000 (.jp2) format.

  1. From the menu bar, select File > Save As > JPEG2000.
  2. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Output File to JPEG2000 dialog appears.
  3. Enter an output filename and directory.
  4. Use the drop-down list to specify the output compression type:
    • Lossless Compression (default): A completely reversible compression that produces a high-quality result. Less data content is compressed than with Low Compression or High Compression.
    • Low Compression: A non-reversible compression that retains nearly all the original data content while maintaining moderate compression.
    • High Compression: A non-reversible compression that provides the highest level of data content compression, while potentially producing a lower-quality result
  5. Click OK. ENVI creates a JPEG2000 file (.jp2) that is optimized for visual performance.

Save File as PCI


This option saves raster data to a PCI file (.pix), including required header fields, band names, a bad bands list, and map information or pixel sizes.

  1. From the menu bar, select File > Save As > PCI. The Output to PCI Input Filename dialog appears.
  2. Select an input file and perform optional spatial and spectral subsetting, then click OK.
  3. Enter an output filename and directory, then click OK.

Chip the View


Use the File > Chip View To options to create a screen capture of all layers displayed in the current view. Any display enhancements, zooming, rotating, or Portals that are displayed in the view are burned into the output image. ENVI creates an 8-bit, three-band image at screen resolution, even if the input data is a only single vector layer or consists of one band (a grayscale image).

You must display the layer(s) in the current view prior to using Chip View To options. The menu options are disabled if you do not have any layers displayed. You can display any combination of image and/or vector layers for a chip.

Chip to a File

You can also write a script to chip the contents of a view to a file using the ENVIView::ChipToFile method.

  1. Display the layer(s) you wish to chip in the Image window. You can use the Zoom, Pan, or enhancement tools to customize the display. The layers must be oriented with North up. For images that are not georeferenced, you must establish a base projection. For example, to chip an image with RPC information to Geospatial PDF, you can use a DEM to establish a base projection.
  2. From the menu bar, select File > Chip View To > File or click the Chip to File button on the toolbar. The Chip to File Parameters dialog appears.
  3. Select an output format from the Output File drop-down list. The following options are available:
    • NITF: NITF 2.0 and 2.1 or NSIF 1.0. If you select this option, the Compression drop-down list appears. See Save NITF Files for more information about the available options. If you select the Metadata Editor button, you can optionally edit some NITF metadata fields and add PIA tags and text segments before saving the file.

      Note: You will lose all NITF metadata if you use Chip View to > File. Default metadata values will be used based on NITF preferences. To save metadata, use File > Save As to create output instead.

    • ENVI: ENVI image format. When you select this option, ENVI creates and saves an associated header file (.hdr) to disk.
    • TIFF: TIFF and GeoTIFF
    • JPEG: JPEG
    • JPEG2000: JPEG2000
    • GDB: Geodatabase
  4. Click the File Select button File Select button to open the Select Output Filename dialog and choose an output destination and filename. Click Open to accept the output file settings.
  5. Keep the Display Result check box to enabled to automatically display the output result in the Image window view or disable the check box to not automatically display the output.
  6. Click OK. If you enabled Display Result, ENVI automatically displays the result. The output is also added to the Data Manager.

Chip to Print Layout View

Run ENVI in 32-bit mode from the Windows Start menu before performing these steps. This option is available on Windows platforms with a licensed ArcGIS® installation.

  1. Display the layer(s) you wish to chip in the current view. You can use the Zoom, Pan, Rotate, or enhancement tools to customize the display.
  2. From the menu bar, select File > Chip View To > Print to export the chipped image display to the Print Layout view. Any display enhancements, zooming, rotating, or Portals that are displayed in the view are burned into the Print Layout image.

ENVI creates an 8-bit, three-band image at screen resolution, even if the input data is a only single vector layer or consists of one band (a grayscale image). This results in the creation of a Legend (if the Legend is included in the associated Map Template) displaying Chip as the layer name followed by the RGB information.

For more information on the Print Layout view, see Working with the Print Layout View.

Chip to ArcMap

Run ENVI in 32-bit mode from the Windows Start menu before performing these steps.

This option is available on Windows platforms with a licensed ArcGIS® installation. It is not available when the Image window is divided into multiple views.

You can export a chipped image display to ArcMap™. The exported image retains all display enhancements and annotations you added in ENVI. Use the following steps:

  1. From the menu bar, select File > Chip View To > ArcMap.
  2. If ArcMap is not already running, ENVI will initiate it. The dataset will automatically display in ArcMap with the ArcMap default enhancements, and it will be added as a new layer to the ArcMap table of contents.
  3. If you have one or more instances of ArcMap already running, an ArcMap Instances dialog appears. Select an instance to display your dataset, or start a new instance of ArcMap. Click OK.

Raster datasets in GeoTIFF or NITF format, those stored in a geodatabase, and those referenced by an Esri® layer file) can pass directly into ArcMap without any conversion. For all other formats, ENVI temporarily converts the datasets to GeoTIFF format before passing them to ArcMap. These are stored in the location you specify in the Temporary Directory preference.

Datasets exported to ArcMap remain open in ENVI.

Chip to Google Earth

  1. Display the layer(s) you wish to chip in the Image window. You can use the Zoom, Pan, Rotate, or enhancement tools to customize the display.
  2. From the menu bar, select File > Chip View To > Google Earth. If you have not yet started Google Earth, it will automatically start. If you do not have Google Earth installed, or if you are on a non-Windows platform, ENVI will create a KML file in the directory specified in the Temporary Directory preference.
  3. You can save the generated image as a KML or KMZ file from Google Earth; be sure to do this before closing ENVI.

Chip to Geospatial PDF

This option is available on all supported platforms. It creates a screen capture of all georeferenced data layers displayed in the current view to a Geospatial PDF file. Any display enhancements, zooming, or Portals that are displayed in the view are burned into the PDF document. A Geospatial PDF document is georeferenced, allowing you to obtain latitude and longitude coordinates, measure distances, mark and copy location coordinates.

  1. Display the layer(s) you wish to chip in the current view. You can use the Zoom, Pan, or enhancement tools to customize the display. The layers must be oriented with North up. In addition, a standard base projection must be established.
  2. From the menu bar, select File > Chip View To > Geospatial PDF to export the chipped image display to Geospatial PDF.
  3. In the Chip to Geospatial PDF dialog, enter a an output filename and any of the following information you want to save to the PDF Properties and click OK.
    • Title
    • Author
    • Subject
    • Keywords

You can open the output PDF file in Adobe Acrobat Reader or use Adobe Acrobat Pro for more options, including viewing latitude and longitude coordinates, measuring distances, and marking and copying location coordinates. For more information, see the Adobe website at www.adobe.com.

Chip to PowerPoint

This option is available on Windows 32-bit and 64-bit platforms with the PowerPoint presentation program installed.

  1. Display the layer(s) you wish to chip in the current view. You can use the Zoom, Pan, Rotate, or enhancement tools to customize the display.
  2. From the menu bar, select File > Chip View To > PowerPoint. If you have not yet started the PowerPoint program, it will automatically start and the chipped image is added to a slide in a new presentation. If the PowerPoint program is already open, the PowerPoint Presentations dialog appears.
  3. Choose one of the following options for the PowerPoint Presentations dialog:
  • If you have more than one presentation open in the PowerPoint program, select the presentation where you want the chip to be added, and click OK (or, double-click the presentation name). The chipped image is added to a new slide at the end of your presentation.
  • If you only have one presentation open, select the presentation name and click OK (or double-click the presentation name). The chipped image is added to a new slide at the end of your presentation.
  • Select Start a new presentation and click OK if you are running the PowerPoint program and want to start a new presentation while working in an existing presentation. The chipped image is added to a slide in a new presentation.

If your source image contains map information, the geographic coordinates of the center of the chipped view are added to the Notes field in the presentation. The following is an example:

  The center of the image is located at the following coordinates:
* Lat,Lon DMS: 40°0'17.58"N, 105°12'22.18"W
* Lat,Lon DD: 40.00488301N, 105.20616103W
* Map: 482403.4032, 4428319.5364
* Proj: UTM, Zone 13N, WGS-84
* MGRS: 13TDE8240328320

You can copy and paste the numerical coordinates directly from the PowerPoint program into the Go To field of the ENVI tool bar to jump to that location in the display. In the example above, you could copy any of the following:

  • 40°0'17.58"N, 105°12'22.18"W
  • 40.00488301N, 105.20616103W
  • 482403.4032, 4428319.5364

  • 13TDE8240328320

Export View to Geospatial PDF


This option exports one or more georeferenced raster layers displayed in the current view to a Geospatial PDF file. It does not retain vector layers, nor does it retain any image rotation or sharpening.

A Geospatial PDF document is georeferenced, allowing you to obtain latitude and longitude coordinates, measure distances, and mark and copy location coordinates.

  1. Display the layers you wish to export in the current view. A standard base projection must be established.
  2. From the menu bar, select File > Export View To > Geospatial PDF.
  3. Select All Layers in View to include ENVI layers that have been unchecked in the Layer Manager and are not displayed in the current view. These hidden layers must be enabled within the PDF viewer to be visible. Select Visible Layers Only to export only those ENVI layers displayed in the current view.
  4. The default image resolution (in pixels per inch) is displayed in the Limit Resolution To field. You can enter a different value if necessary.
  5. The default page size (in inches) is displayed in the Width and Height fields. You can enter a different value in one of these fields if desired, then press the Enter key. The other field will update automatically to maintain the correct aspect ratio.
  6. Enter an output filename and any of the following information you want to save to the PDF Properties.
    • Title
    • Author
    • Subject
    • Keywords
  7. Click OK to export the image to a Geospatial PDF document.

You can open the output PDF file in Adobe Acrobat Reader or use Adobe Acrobat Pro for more options, including viewing latitude and longitude coordinates, measuring distances, and marking and copying location coordinates. For more information, see the Adobe website at www.adobe.com.

Example

Suppose the current view contains two raster layers:

  • The current view size is 800 by 800 pixels.
  • The first raster layer is 7400 x 7400 pixels.
  • The second layer is 1103 x 1103 pixels.
  • The page Width and Height are set in inches, proportional to the view dimensions, at a default resolution of 150 pixels per inch (800 / 150) x (800 / 150) = 5.333 x 5.333 inches.
  • You increased the default resolution from 150 to 300 pixels per inch.

The first raster image's width and height in inches are calculated based on the percentage of the view covered by the image. The current resolution of the first raster layer is then calculated by dividing its pixeldimensions by its physical dimensions (inches).

Since the image covers 100% of the view, the width and height in inches are 5.333 x 5.333. The current resolution is (7400 / 5.333) x (7400 / 5.333) = 1387 pixels per inch. Since this value is greater than the resolution that you selected, the image will be down-sampled by a proportion equivalent to a resolution of 300 pixels per inch. Up-sampling is not available.

Export View to Image File


This option exports all contents of a view to an RGB 24-bit image file. Even if a panchromatic image is displayed in the view, the output will have three bands (red, green, blue). The output image preserves any vector layers, annotation layers, feature counting layers, raster color slices, and image enhancements. It does not preserve any north arrows or cursor probe (crosshairs).

If the view contains a standard base map projection, the output file will be georeferenced to that projection.

This tool is similar to Chip to File except that you can select the output zoom factor and it saves the entire image layer, not just what is displayed on the screen.

You can write a script to export the view to an image file using the ENVIView::Export method.

To save a full-resolution raster to PNG format, write an ENVI API script that uses the ENVIExportRasterToPNGTask routine.

  1. Display the layers you wish to export in the current view.
  2. From the menu bar, select File > Export View To > Image File. The Export View to Image File dialog appears.
  3. Choose an Output Extent. The choices are:
    • Current (default): Exports the contents of the current view extent.
    • Full: Exports the entire dataset extent, not just what is displayed in the view.
  4. The following options define the pixel resolution of the output image. Setting one value will automatically update the other two values. The choices are:
    • Zoom Factor: Enter a floating-point value. This field allows for more precision than the Map Scale field.
    • Map Scale: Enter a denominator value, for example 24000 for a 1:24000 map scale. This field is enabled when a raster layer is georeferenced to a standard map projection.
    • Pixel Size: Enter an integer value indicating the output pixel size.
  5. Select an Output Format. The choices are ENVI or TIFF.
  6. Enter an Output Filename.
  7. Enable the Display Result check box if you want the output image to open in the view when processing is complete.
  8. Click OK to export the image to disk. On Linux systems, make sure that the view is not obstructed by another dialog or window during the export process.

Tip: If you find a zoom level that you like in the display and you want to match this zoom level in the output raster, select Use Map Scale from the zoom drop-down list in the menu bar. Note the map scale that is displayed, then enter this value in the Map Scale field in the Export View to Image File dialog.

Export Layer to TIFF


This option exports a raster layer displayed in the current view to a TIFF file. It saves the full raster layer extent, with image enhancements, at full resolution.

Note: Sharpening is not preserved upon export. To export a raster layer with sharpening, use Export View to Image File to export only the displayed raster layer.

You can also write a script to export the raster layer of a view to a TIFF file using the ENVIRasterLayer::Export method.

  1. Display the layer you wish to export in the current view. A standard base projection must be established.
  2. Right-click the layer in the Layer Manager, and select Export Layer to TIFF. The Export Layer to TIFF dialog appears.
  3. Enter an Output Filename.
  4. Enable the Display Result check box if you want the TIFF layer to open in the view after it is saved.
  5. Click OK to export the image to a TIFF file.

Send Files to ArcMap


Run ENVI in 32-bit mode from the Windows Start menu before performing these steps. This option is available on Windows platforms with a licensed ArcGIS® installation.

Raster file formats for ENVI raster, ENVI classification, geodatabase rasters, TIFF, TFRD, MrSID, JPEG, PNG, JPEG2000, NITF will be sent in their original file format. All other formats will be saved as a temporary TIFF file.

Vector file formats for shapefiles and geodatabase vectors (feature classes) will be sent in their original file format. All other vector formats will be saved as a temporary SHP file.

  1. Start ArcMap. ArcMap Versions 10.2 and newer need to be running before you send the file. If ArcMap is not running, you will get a warning to launch it.
  2. Do one of the following in ENVI:

    • In the Layer Manager, right-click on a layer and select Send to ArcMap
    • In the Data Manager, select the layers from the list, and click the Open Selected Files in ArcMap button from the toolbar.
  3. The file opens in ArcMap.

Sending a file to ArcMap from the Layer Manger option behaves differently from the Data Manager option. For example:

  • The band combination is preserved for all formats, even if it gets saved off to a temporary TIFF file.
  • The layer name is preserved, even if it has [REPROJECTED] in the name.
  • Vector symbology is preserved.

See Also


Save and Restore Sessions, Save to a Geodatabase, Save NITF Files, Supported Data Types



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us