|
|
|
|
Code Library
Exelis Visual Information Solutions Code Contribution Library allows you to share images, data, technical white papers, and more with other members of the IDL & ENVI communities. Contributions can include code samples and documentation to help you jump start your programming or application development.
PLEASE NOTE: All examples in the Code Library are not supported by Exelis Visual Information Solutions.
Learn how the single-window interface in ENVI 5 can effect independently developed code
|
|
|
version 1.2. - Better handling of zoom in / out.
This utility opens an interactive Google Map centered at the same location and extent as your current ENVI view.
read article
This utility opens an interactive Google Map centered at the same location and extent as your current ENVI view.
It works only on Windows and it requires ENVI version 5.
To install, copy the gmaps_link.sav file and the \gmaps_link_files directory into your /envi50/extensions/ folder.
Make sure you have access to write in the \gmaps_link_files directory. This will not be the default setting in Windows 7.
|
|
|
|
|
|
|
Author : Devin White
Date : Thu 05/17/2012 @ 11:32
|
|
The Compact Parallelized Photogrammetric Projection Object (C-3PO) is an ENVI plugin that enables fast and rigorous image orthorectification and reprojection on multi-core computers.
read article
The Compact Parallelized Photogrammetric Projection Object (C-3PO) is an ENVI plugin that enables fast and rigorous image orthorectification and reprojection on multi-core computers. C-3PO works by launching ENVI in full batch mode on every available hardware thread through the IDL-IDL Bridge, passing each one a small part of the larger task, retrieving the results, and assembling the final product. Because each ENVI process is completely independent, this approach is referred to as weak parallelization. The same approach is used on high performance computing clusters, albeit on a much larger scale.
C-3PO does not use any of ENVI’s built-in orthorectification or reprojection support. Instead, routines were built from the ground up using proven photogrammetric methods. The results have been validated against output from several vetted geospatial software packages and are consistently more accurate than what ENVI can generate natively.
To process an image in C-3PO, it must either have a valid map projection or functional fit sensor model (RPC or RSM). In the former case, a reprojection will be performed. In the latter case, an orthorectification will be performed. A DEM, registered to Mean Sea Level, can be provided to enable more accurate orthorectification. If a DEM is not provided, C-3PO assumes the earth is flat and its height is the same as the “height offset” parameter in the functional fit model.
C-3PO can be accessed interactively through the ENVI menu system or through an application programming interface (API) that enables batch processing. The C3PO.zip file attached to this article contains the plugin and a users guide.
New version uploaded on 05/17/12: Fixed minor bug in logic that determines output file type
|
|
|
|
|
|
|
|
Katalog is a free ENVI add-on that helps organize satellite images and other geospatial data. Relevant features include:
- Finds satellite imagery and other geospatial files on selected folders. - Supports most formats read by ENVI. - Extracts and catalogs metadata. - Generates reduced resolution images and thumbnails. - Allows users to search and discover the data in a variety of ways - Creates web reports in HTML format. - Creates footprints in KML and Shapefile formats. - Creates table in database-ready CSV format. - Easy to integrate with Esri software.
Katalog has only been tested on Windows (XP and 7). Most of its features will not work at all in other operating systems.
read article
Installation instructions:
1. Uncompress the "katalog1.0.zip" file. 2. Move the file "katalog.sav" and the directory "\katalog" with all its files to the "\save_add" folder of your ENVI installation. 3. Make sure you have permission to write in this new "\save_add\katalog\" directory. 4. If you are using ENVI version 5, move the file "katalog_envi5extension.sav" to your "\extensions" folder.
|
|
|
|
|
|
|
Author : Mari Minari
Date : Wed 05/09/2012 @ 03:35
|
|
|
ENVI 5 includes most of the same functionality as previous versions of ENVI (and ENVI 5 Classic). However, there are some tools that are not currently available from the ENVI 5 interface. The generation of contours in previous versions of ENVI is one tool not directly available from the ENVI 5 interface. As a work around, a Code Library contribution, ENVI Classic Contours, has been created that allows a user to select a file as input to the classic Contour generation tool. This tool then displays the image in a classic 3-window display along with the Contour Plot dialog that defines the contour levels. Once the desired contours are generated, they can be saved to an ENVI vector file format (.evf) and opened in the ENVI 5 interface along with the image.
Note: Generating Contours is still available in ENVI 5 Classic. See the ENVI Classic help for details.
See related help article here.
read article
Add Article Text...
|
|
|
|
|
|
|
Author : Adam O'Connor
Date : Sat 05/05/2012 @ 10:30
|
|
This batch program creates the .enp pyramid files for raster datasets to be used in the ENVI v5+ software. This program is not supported in ENVI Classic or older versions of the software. Please note that this is a batch program meant to be executed on its own in a stand-alone fashion and it is not an extension that can be run from the Toolbox alongside an interactive session of the ENVI software.
read article
The ENVI software creates and uses pyramid files to improve the display performance of large raster datasets. Pyramid files contain a copy of the raster data at various reduced resolutions in order to enhance display at different zoom levels. The pyramid files improve raster display performance by reducing the resampling required when displaying large portions of a raster at low resolution. Pyramid files for the ENVI software can be identified by the ".enp" file extension.
Assuming that a copy of the ENVI v5+ software is the version last installed on your system you should be able to download the *.sav file over to your computer and double-click on it to launch the utility. If that doesn't work you can always manually launch IDL and execute the following statements:
IDL> restore, dialog_pickfile(filter='*.sav')
IDL> envi_pyramid_creation_utility
Although this program was generated by an Exelis VIS employee it is in no way supported, maintained, warranted, or guaranteed by Exelis Visual Information Solutions. Consequently, Exelis VIS Technical Support is not obligated to address questions related to this program. This program was developed and tested on Windows 7 64-bit operating system.
|
|
|
|
|
|
|
Author : Adam O'Connor
Date : Thu 05/03/2012 @ 03:20
|
|
This script is an example Toolbox Extension for the ENVI 5+ application that prompts the user to select a raster dataset and applies an unsharp-mask sharpening filter. The purpose of this program is to provide a simple proof-of-concept example using the new IDL API released in ENVI v5.0, and it is not meant to provide operational functionality.
read article
This program is not supported in ENVI Classic or older versions of the software. To install the extension simply place this program file into the ENVI "Extensions File Directory":
C:\Program Files\Exelis\ENVI##\extensions\
or
C:\Users\%username%\.idl\envi\extensions#_#\
Then restart the ENVI 5+ software and a new tool named "Example/Unsharp Mask Filter" will appear in the Extensions folder within the Toolbox.
Although this program was generated by an Exelis VIS employee it is in no way supported, maintained, warranted, or guaranteed by Exelis Visual Information Solutions. Consequently, Exelis VIS Technical Support is not obligated to address questions related to this program. This program was developed and tested on Windows 7 64-bit operating system.
|
|
|
|
|
|
|
Author : Adam O'Connor
Date : Thu 05/03/2012 @ 03:14
|
|
This script is an example of ENVI 5+ application control that launches ENVI in interactive UI mode and configures the display of a raster dataset in a multi-view environment. The purpose of this program is to provide a simple proof-of-concept example using the new IDL API released in ENVI v5.0, and it is not meant to provide operational functionality.
read article
This program is not supported in ENVI Classic or older versions of the software. To run this program simply execute within an IDL session from an installation associated with the ENVI 5+ software. Although this program was generated by an Exelis VIS employee it is in no way supported, maintained, warranted, or guaranteed by Exelis Visual Information Solutions. Consequently, Exelis VIS Technical Support is not obligated to address questions related to this program. This program was developed and tested on Windows 7 64-bit operating system.
|
|
|
|
|
|
|
Author : Adam O'Connor
Date : Thu 05/03/2012 @ 03:08
|
|
This script is an example Batch Program for the ENVI 5+ application that executes ENVI in headless mode to generate a simple ENVI Standard raster format file on disk. The purpose of this program is to provide a simple proof-of-concept example using the new IDL API released in ENVI v5.0, and it is not meant to provide operational functionality.
read article
This program is not supported in ENVI Classic or older versions of the software. To run this program simply execute within an IDL session from an installation associated with the ENVI 5+ software. Although this program was generated by an Exelis VIS employee it is in no way supported, maintained, warranted, or guaranteed by Exelis Visual Information Solutions. Consequently, Exelis VIS Technical Support is not obligated to address questions related to this program. This program was developed and tested on Windows 7 64-bit operating system.
|
|
|
|
|
|
|
Author : Adam O'Connor
Date : Thu 05/03/2012 @ 01:17
|
|
This program provides an interface for loading maps and imagery from 5 free web map servers (Google Maps, Bing Maps, OpenStreetMap, Wikimapia, MapQuest) using a geolocation coordinate (latitude & longitude). This program can be executed in stand-alone IDL or from an interactive session of ENVI, and it is only supported on Windows.
read article
To install this program simply download the file and move it to the "save_add" or "extensions" subfolder of the ENVI Classic installation:
ENVI 4.3 and older: C:\RSI\IDL##\products\envi##\save_add\
ENVI 4.4 to ENVI 4.8: C:\Program Files\ITT\IDL##\products\envi##\save_add\
ENVI 5.0 and newer:
- ENVI Classic: C:\Program Files\Exelis\ENVI##\classic\save_add\
- ENVI 5+: C:\Program Files\Exelis\ENVI##\extensions\
Once this is accomplished, restart ENVI and 2 new menu items or a Toolbox entry will be added to the software:
- MAIN MENU : File > Launch Web Map Servers
- DISPLAY MENU : Tools > Launch Web Map Servers...
- TOOLBOX : Extensions > Launch Web Map Servers
This program supports tabbing, so you can select a tab and navigate to its GUI components using the Tab key, or navigate to neighboring tabs using the left (<--) and right (-->) arrow keys. Also keep in mind that you can right-click within the browser window and use the standard Internet Explorer context menu, which contains useful tools such as "Back", "Forward", "Add to Favorites", and "Print".
If launched from ENVI, either the center coordinate of the selected dataset file or the current zoom window display pixel location are used for the initial latitude and longitude. This program can also be executed within IDL, IDL Runtime, or the IDL Virtual Machine. When launching this program from an interactive IDL> command prompt, the user has the ability to specify initial latitude and longitude using the LAT and LON keywords :
IDL> launch_web_map_servers, lat = 40.02, lon = -105.24
When using IDL 6.2 or newer, this program can also be launched (with or without arguments) from the MS-DOS Command Prompt within IDL Runtime using the following syntax :
C:\> idlrt Launch_Web_Map_Servers.sav -args latitude longitude
For example :
C:\> idlrt "C:\Launch_Web_Map_Servers.sav" -args 40.02 -105.24
|
|
|
|
|
|
|
|
|
Band Animator is an ENVI 5 extension that will allow the user to animate through the bands of a multi-spectral image. The user can then customize the animation and output the file to a movie file in either MP4 or AVI format.
Only supported on ENVI 5.0 or higher.
read article
The following customizable features are available:
- Adjustment of the animation frame-rate.
- Selection of a color table.
- Adjustment of the animation window size.
- The display of Band information, such as wavelength.
- Add custom annotations.
- Output to MP4 or AVI format movie files.
The zip file contains three files:
- Documentation: BandAnimator.pdf
- The ENVI 5 Extension save file: bandanimator.sav
- The source code: bandanimator.pro
See PDF file for full documentation (included in ZIP file).
|
|
|
|
|
|
|
|
Read and import in ENVI the data produced by the DMC sensors including DEIMOS-1.
Additional information about the DMC sensors are available at: http://www.dmcii.com/index.html
The toolkit is able to read, ingest and process the DMC products levels L1R and L1T. In addition the toolkit is able to calibrate files to radiance or sensor reflectance, using the information extract from the DIMAP file associate with the image file.
The functions are available in the ENVI menu at the following locations:
Ingestion: File->Open External File->DMCs and DIMAP
Radiance & Reflectance: Basic Tools->Preprocessing->Calibration Utilities->DMCs Radiance Basic Tools->Preprocessing->Calibration Utilities->DMCs Reflectance
To install this toolkit just download the file and move it to the "save_add" subfolder of the ENVI installation: ENVI 4.8: - Windows : C:\Program Files\ITT\IDL\IDL80\products\envi48\save_add\ - Mac OS X : /Applications/itt/idl/idl80/products/envi48/save_add/ - UNIX/Linux : /usr/local/itt/idl/idl80/products/envi48/save_add/
Note: This toolkit replaces the previous toolkit "envi_deimos1.sav", so if you have installed the previous version make sure to delete it from the folder save_add.
read article
Read and import in ENVI the data produced by the DEIMOS-1 Sensor operate by DEIMOS Imaging S.L. (DMI).
Additional information about the DEIMOS-1 Sensor are available at: http://www.deimos-imaging.com/technology/our-satellite-deimos-1
The toolkit is able to read, ingest and process the DEIMOS-1's products levels L1R and L1T. In addition the toolkit is able to calibrate files to radiance or sensor Reflectance, using the information extract from thie DIMAP file associate with the image file.
The functions are available in the ENVI menu at the following locations:
Ingestion: File->Open External File->DEIMOS-1
Radiance & Reflectance: Basic Tools->Preprocessing->Calibration Utilities->DEIMOS-1 Radiance Basic Tools->Preprocessing->Calibration Utilities->DEIMOS-1 Reflectance
To install this program simply download the file and move it to the "save_add" subfolder of the ENVI installation: ENVI 4.8: - Windows : C:\Program Files\ITT\IDL\IDL80\products\envi48\save_add\ - Mac OS X : /Applications/itt/idl/idl80/products/envi48/save_add/ - UNIX/Linux : /usr/local/itt/idl/idl80/products/envi48/save_add/
|
|
|
|
|
|
|
Author : Devin White
Date : Sat 04/14/2012 @ 01:46
|
|
ENVI plugin for converting and georeferencing Ocean Color data sets
read article
The ENVI Plugin for Ocean Color (EPOC) is an HDF file conversion and georeferencing utility for data sets that are currently distributed through the OceanColor web site (http://oceancolor.gsfc.nasa.gov) or created using the SeaWiFS Data Analysis System (SeaDAS, http://oceancolor.gsfc.nasa.gov/seadas/). Level 1A, Level 2, and Level 3 SMI data sets are supported for five sensors: MODIS Aqua, MODIS Terra, SeaWiFS, CZCS, and OCTS. The plugin works on all operating systems that can run IDL and ENVI. Suggestions for improvements are welcome. Installation instructions are in the user guide. If the plugin is installed correctly, there should be an “Ocean Color” group in the ENVI menu system under File->Open External File. Now comes with an API so a large number of files can be processed in batch mode.
New version uploaded on 08/27/11: Minor bug fixes.
New version uploaded on 04/14/12: Fixed geolocation issue for swaths that cross the Prime Meridian or International Dateline
|
|
|
|
|
|
|
Author : Devin White
Date : Sat 04/14/2012 @ 01:44
|
|
An easy-to-use plugin for processing and georeferencing every known MODIS product
read article
The MODIS Conversion Toolkit (MCTK) is a plugin for ENVI that can ingest, process, and georeference every known MODIS product (currently 143) through your choice of an easy-to-use interactive widget interface or a fully-accessible programmatic interface. Supported products include: - Level 1A Uncalibrated Radiance - Level 1B Calibrated Radiance - Level 2 Swath - Level 2G, Level 3, and Level 4 Grid The interface allows you to take a "cafeteria" approach to MODIS data by providing a list of all available datasets within a file, from which you can choose the ones to process. The ENVI equivalents of MRT and MRTSwath are built in as well, which means that you can input a file, have its contents converted to scientifically meaningful values, and then project those contents into the coordinate system of your choice--all within one interface. Bow tie correction is also available for all swath products. The user guide (included with the plugin) contains:
- Descriptions of how the plugin interacts with each major MODIS product category
- Screen captures to aid in using the interactive version
- A complete explanation of the programming interface with fully functional sample programs for each major MODIS product category.
- A list of all supported MODIS products
Updates will be posted occasionally; comments and suggestions are welcome. Please check the displayed build date on your current version of MCTK against the most recent upload date listed below. If your version does not show a build date, or the date is earlier than the most recent one listed below, please click Download to obtain the latest version.
New version created on 08/25/11: Added support for MCD12Q1, MCD12Q2, and MCD12C1 land cover products.
New version created on 10/01/11: Bug fixes for handling of HDF scientific datasets (SDs); saturated pixels in Level 1B products with an integer value of 65533 are now set to maximum possible radiance value of 32767 prior to conversion; binary recompiled in 32-bit IDL to mitigate 64-bit Linux compatibility issues
New version created on 04/14/12: Fixed geolocation issue for swaths that cross the Prime Meridian or International Dateline, added support for MOD16A2 and MOD16A3, updated list of supported products in user guide
|
|
|
|
|
|
|
|
|
After downloading the file for this toolkit copy the .sav file to the "save_add" subfolder of the ENVI installation: ENVI 4.4, 4.5, 4.6 (in ENVI 4.7 & 4.8 the toolkit is included in the product) : Note: Don't add the .sav file for ENVI version 4.7 and 4.8
- Windows: C:\Program Files\ITT\IDL##\products\envi##\save_add\ - Mac OS X: /Applications/itt/idl##/products/envi##/save_add/ - UNIX/Linux: /usr/local/itt/idl##/products/envi##/save_add/ Once this is accomplished, restart the ENVI software and some new menu items will be added to the ENVI menu system: File->Open External File->Cosmo SkyMed Radar->Open/Prepare Radar File->COSMO SkyMed Utilities->View Basic COSMO SkyMed Header Radar->Open/Prepare Radar File->COSMO SkyMed Utilities->View Extend COSMO SkyMed Header Radar->Open/Prepare Radar File->COSMO SkyMed Utilities->COSMO Meta to XML Radar->Open/Prepare Radar File->COSMO SkyMed Utilities->Prepare data for SARSCAPE Basic Tools->Preprocessing->Data-Specific Utilities->COSMO SkyMed->Georeference COSMO SkyMed (DGM) Map->Georeference COSMO SkyMed (DGM) Note: The georeference function is just using the four corners of the image plus the central point, so the accuracy of the function is limited. This toolkit provides function to read and import COSMO SkyMed data (Level 1A up to Level 1D including GTC), and some utilities to extract header information, additional functions and capabilities such as precise georefencing, filtering, interferometry processing are available through the SARscape product suite.
read article
After downloading the file for this toolkit copy the .sav file to the "save_add" subfolder of the ENVI installation: ENVI 4.4 and newer: - Windows: C:\Program Files\ITT\IDL##\products\envi##\save_add\ - Mac OS X: /Applications/itt/idl##/products/envi##/save_add/ - UNIX/Linux: /usr/local/itt/idl##/products/envi##/save_add/ Once this is accomplished, restart the ENVI software and some new menu items will be added to the ENVI menu system: File->Open External File->Cosmo SkyMed Radar->Open/Prepare Radar File->COSMO SkyMed Utilities->View Basic COSMO SkyMed Header Radar->Open/Prepare Radar File->COSMO SkyMed Utilities->View Extend COSMO SkyMed Header Radar->Open/Prepare Radar File->COSMO SkyMed Utilities->COSMO Meta to XML Radar->Open/Prepare Radar File->COSMO SkyMed Utilities->Prepare data for SARSCAPE Basic Tools->Preprocessing->Data-Specific Utilities->COSMO SkyMed->Georeference COSMO SkyMed (DGM) Map->Georeference COSMO SkyMed (DGM) Note: The georeference function is just using the four corners of the image plus the central point, so the accuracy of the function is limited. This toolkit provides function to read and import COSMO SkyMed data (Level 1A up to Level 1D including GTC), and some utilities to extract header information, additional functions and capabilities such as precise georefencing, filtering, interferometry processing are available through the SARscape product suite.
|
|
|
|
|
|
|
|
A set of four higher-level (higher than the GRIB API in IDL 8.1) library routines for reading information from a GRIB file.
read article
IDL's GRIB routines are a thin layer on top of the the C version of the ECMWF GRIB API
(http://www.ecmwf.int/products/data/software/grib_api.html). The ECMWF routines exposed in IDL are fairly low-level, so they require a bit of programming to extract even simple information from a GRIB file.
I have four routines, built on IDL's GRIB API, to help make it easier to get information from a GRIB1/2 file:
- GRIB_INVENTORY: Creates an inventory of a GRIB1/2 file, returned as a string array.
- GRIB_GET_RECORD: Gets a single record, selected by index, from a GRIB1/2 file.
- GRIB_GET_PARAMETERNAMES: Gets the value of the 'parameterName', 'name', 'shortName' or 'cfName' key from each record in a GRIB1/2 file.
- GRIB_GET_PARAMETER: Uses GRIB_GET_PARAMETERNAMES and GRIB_GET_RECORD to extract all the records in a GRIB1/2 file with a given parameter name.
These routines can be called from the IDL command line or used as library routines in programs. See the IDLdoc documentation for these routines for examples of how to call them.
I've tested these routines on a variety of GRIB1 and GRIB2 files from ECMWF, NCEP, NCAR, NOAA and AFWA. Please let me know if they don't work with a particular GRIB file.
Update: 2012-03, updated three original routines, added GRIB_INVENTORY.
Update: 2011-11, modified GRIB_GET_RECORD.
|
|
|
|
|
|
|
Author : Adam O'Connor
Date : Tue 03/06/2012 @ 02:28
|
|
Program that converts IDL source code to HTML with chromacoding that can be printed in color
read article
The purpose of this program is to convert IDL ASCII text source code *.pro file(s) into HTML with the default IDE color chromacoding so that IDL code can be viewed within a web browser and subsequently printed in color. Here is an example of the output this program will produce :
data = DIST (50) ;create data
WINDOW, xs=400, ys=400, /FREE, TITLE='DIST' ;open window
if !D.N_COLORS GT 256 then DEVICE, DECOMPOSED=0
LOADCT, 13 ;load rainbow colortable
SURFACE, data, SHADES=BYTSCL(data) ;display surface
In order to install this program simply download and unpack the ZIP archive file and move the "IDL_Language.sav" file to the "lib/hook/" subfolder of the main IDL installation directory.
|
|
|
|
|
|
|
Author : Adam O'Connor
Date : Tue 03/06/2012 @ 01:53
|
|
IDL program that utilizes ENVI batch routines to read, stretch, and georeference MODIS data
read article
The purpose of this program is to provide an interactive tool that can be used to view MODIS L1B data in HDF-EOS format. This program was built specifically for the "MOD021KM" data product distributed by the Goddard Earth Sciences Distributed Active Archive Center (DAAC). This program must be called independently as a stand-alone IDL procedure. It uses a timer to periodically query the contents of the "current working directory" to look for new files that match the "*MOD021KM*.HDF" naming convention. When a new file appears, it asks the user if they wish to load this new file or continue working with the currently loaded dataset.
|
|
|
|
|
|
|
|
This reader is intended to read data from TerraSAR-X/TanDEM-X CoSSC and SSC files using IDL or ENVI. It was developed by Exelis Visual Information Solutions in collaboration with DLR Microwaves and Radar Institute.
read article
This reader is intended to read data from TerraSAR-X/TanDEM-X CoSSC and SSC files using IDL or ENVI. It was developed by Exelis Visual Information Solutions in collaboration with DLR Microwaves and Radar Institute.
See the PDF in the distribution for details on installation and usage.
|
|
|
|
|
|
|
|
This IDL/ENVI code is to correct the ALOS AVNIR-2 level 1B1 images. Details on the using of the code can be found in the .pro file.
read article
Add Article Text...
|
|
|
|
|
|
|
|
An example of using the GRIB helper routines to read wind data from a GRIB2 file and display it as an image on the native projection of the data.
read article
The example is packaged as a zip file containing an IDL program, a GRIB file and a PNG file showing sample output from the program. Information about the GRIB file can be found in the program header. Be sure the program and the directory containing the GRIB file are in your IDL path.
The GRIB helper routines (http://www.exelisvis.com/Default.aspx?tabid=1540&id=1340) are used in this example.
|
|
|
|
|
|
|
|
An example of reading entities from an ESRI Shapefile and displaying them in a map projection using IDL 8 (a.k.a. New) Graphics.
read article
The example is packaged as a zip file containing an IDL program, a Shapefile and a PNG file showing sample output from the program. Information about the Shapefile can be found in the program header. Be sure the program and the directory containing the Shapefile are in your IDL path.
|
|
|
|
|
|
|
|
This PHP and IDL example will execute an IDL command and show the results in a browser webpage under MS Windows.
The idea behind this example PHP code is to show how to interact between IDL and a webpage, in other words, how to have IDL on the Web.
In short, IDL will execute an IDL sav file that will, in turn, execute a direct graphic plot routine and generate a image as the output of the plot, and a text file with some information of the plot. Those two files, the image file (JPG) and the text file, will be read back by the PHP and shown using HTML tags, on the webpage.
This Code Contribution contains 9 attached files compressed into the file "IDLonWeb.zip"
read article
IDL on the Web with PHP for Windows
*******************************
Index
1- Setting the Environment
2- Apache Server Configuration
3- IDL and PHP program examples
4- Executing the PHP file
*******************************
1- Setting the Environment
In Windows you will need to configure or set the PATH environment variable so that the following IDL path is included in it:
C:\Program Files\ITT\IDL\IDL81\bin\bin.x86
Please, see the attached file called "Windows Environment Path Variable.PNG" for more details on how to achieve that.
2- Apache Server Configuration
Using the Web Server application called XAMPP, that is available to download from:
http://www.apachefriends.org/en/xampp-windows.html
will allow you to run the Apache Server. Please, install XAMPP and then Start the Apache Module. See attached screen shot "Apache
Webserver XAMPP.PNG" for more details.
3- IDL and PHP program examples
The example consists of four files. This files are:
index.php
idlweb1.sav
idlweb1.pro
makefile.pro
-------------------------------------------------------------------------------------------------------------------
index.php:
This is the main PHP program. You will need to edit it to be sure that the user variables are pointing to the right places. For
example, in the section of the index.php file you can find:
/////////////////////////////////
//// USER VARIABLES ////////////
$savfile = "C:\\xampp\\htdocs\\idl\\idlweb1.sav";
$path = "C:\\xampp\\htdocs\\idl";
/////////////////////////////////
As you can see the Apache server program XAMPP is installed under C:\. Then, under "htdocs\" I have created a folder called "idl".
Under that folder I copied the "index.php" file plus the "idlweb1.sav" file that will be executed by a called to IDL runtime:
$command = "idlrt.exe $savfile -args $path $fileimg $filetext $npoints";
-------------------------------------------------------------------------------------------------------------------
idlweb1.sav:
The save file that IDL will execute, see line above.
-------------------------------------------------------------------------------------------------------------------
idlweb1.pro:
The actual IDL pro code that produces the plot and the text output.
-------------------------------------------------------------------------------------------------------------------
makefile.pro:
You can run this pro code to produce the save file, but this is not needed.
-------------------------------------------------------------------------------------------------------------------
To set everything up just copy the files:
index.php
idlweb1.sav
into the XAMPP folder:
C:\xampp\htdocs\idl
See screen shot "XAMPP htdocs directory.PNG"
4- Executing the PHP file
Now that everything is in place, you can open a web browser and type:
http://localhost/idl/index.php
You can then select a value for the number of points to be plotted, e.g. 100, and the PHP code will execute IDL and show what you see
in the screen shot "Example PHP output.PNG".
Notes
Screen shot file names included with this examples are:
Windows Environment Path Variable.PNG
Apache Webserver XAMPP.PNG
Example PHP output.PNG
XAMPP htdocs directory.PNG
|
|
|
|
|
|
|
Author : Igor Okladnikov oig@scert.ru
Date : Thu 10/13/2011 @ 03:36
|
|
read article
Recently I ran into a necessity to plot Taylor diagrams. Unfortunately, I could not find any IDL routine, so I've created it by taking an NCL routine (http://www.ncl.ucar.edu/Applications/Scripts/taylor_diagram.ncl) and recoding it into IDL. The function requires cgColor.pro function by David Fanning (you can google it) and returns IDLgrView object. So you can create a window (IDLgrWindow) to display it, or a buffer (IDLgrBuffer) to write it into a file. A simple example is in the description header of the function.
Upd: I've updated the function. Now it uses cgColor.pro by David Fanning (he recommended it). Also now one can add a Model skill to a plot (2 types of Model skill are available).
Any comments and suggestions are welcomed!
|
|
|
|
|
|
|
|
A set of (a few) Object Graphics classes that inherit from IDL_Object, which allows them the use of implicit Get/SetProperty calls.
read article
Here's a quick example of using one of the classes included:
IDL> s = esggrsurface(dist(30))
IDL> s.color = !color.blue ; implicit SetProperty
IDL> print, s.color ; implicit GetProperty
IDL> xobjview, s
I think (arguably) that this looks a lot cleaner than making the explicit calls to Get/SetProperty.
|
|
|
|
|
|
|
Author : Devin White
Date : Mon 08/01/2011 @ 07:29
|
|
Toolkit for accessing, correcting, and using L1R, L1G, and L1T Hyperion datasets in ENVI
read article
The Hyperion Tools plugin is designed to facilitate the use of Hyperion data in ENVI. Its most basic functionality is to covert Level 1R HDF and Level 1G/1T HDF and GeoTIFF datasets into ENVI format files that contain wavelength, full width half maximum, and bad band information. Also included are options specific to each input dataset format that further aid in using Hyperion data within ENVI.
Version 2.0 of the toolkit runs significantly faster, includes support for the new Level 1R format (L1R + AUX), and comes with an API that enables batch processing. Please consult the PDF Installation and User Guide for more information.
|
|
|
|
|
|
|
Author : Mari Minari
Date : Mon 06/13/2011 @ 10:46
|
|
Utility to convert SPOT DN to radiance
read article
This is a user function that will convert SPOT DN values to floating point radiance values (W.m-2.Sr-1.um-1) using the gain and offset information found in the associated dimap metadata file (.dim). For SPOT data, ENVI's Apply Gain and Offset tool cannot perform the calibration because SPOT uses the equation: L = X/A + B where: • L is the resulting physical value expressed in PHYSICAL_UNIT • X is the radiometric value at a given pixel location as stored in the raster file (unitless). • A is the gain (PHYSICAL_GAIN) • B is the bias (PHYSICAL_BIAS) This is different than ENVI's gain/offset correction which uses the following equation: L = X*A + B The user function is placed in the Basic Tools -> Preprocessing -> Calibration Utilities menu. The calibration is based on information provided by SPOT imaging: http://www.spotimage.fr/dimap/spec/dictionary/pdf/SPOT%20Scene.pdf
*Updated August 17, 2010* - User's now can choose to calibrate to radiance or TOA reflectance for SPOT DIMAP data. Added in a Top of the Atmosphere (TOA) calculation for SPOT DIMAP files. Additional parameters extracted from the DIMAP metadata (.DIM) include the SOLAR_IRRADIANCE_VALUE, SUN_ELEVATION, and IMAGING_DATE. The Earth-Sun distance table comes from JPL Ephemeris (DE405) data (http://ssd.jpl.nasa.gov/?horizons). The .DIM must be selected for the tool to work.
*Updated June 13, 2011 to fix some XML parsing issues with some metadata files.
|
|
|
|
|
|
|
|
read article
The SPOT DIMAP calibration tool for ArcGIS® is the same tool as the spot_calibration tool available for ENVI in the Code Library. The tool allows a user to calibrate a SPOT DIMAP file (1A or 2A) to radiance or reflectance within the ArcGIS® environment. The tool consists of an IDL .sav file called from ArcGIS® using a python script and is added as a custom toolbox to the standard ArcGIS® Toolbox. It has been tested in both ArcGIS® 9.3 and 10.0.
Instructions for adding the toolbox into ArcGIS® is contained in a text file within the downloaded .zip file. This functionality requires ENVI 4.8 to be installed and licensed on the same machine as ArcGIS® 9.3 or 10.0.
For more information on Authoring Custom Tools for ArcGIS®, see the ENVI for ArcGIS® help in ENVI 4.8.
|
|
|
|
|
|
|
|
read article
The Max/Min value image tool calculates the maximum and minimum values of an image stack. The max/min values are generated for each pixel from all of the bands of the input file. You can think of the values as the max/min values of a z-profile (spectrum). The returned file includes two bands called 'Max value' and 'Min value'. This tool uses IDL's MAX function to perform the calculation.
Place the max_min_value.sav in the \envixx\save_add directory and restart ENVI. A new button called 'Max/Min value image' should appear under Basic Tools ->Statistics.
*Updated 12/21/2010 to pass on georeferencing
|
|
|
|
|
|
|
|
read article
This program is able to import ALOS PALSAR Ortho products distributed by ERSDAC, Japan.
http://www.palsar.ersdac.or.jp/e/product/index.html
Please save 'ersdac_geo_ortho_read.sav' file in ENVI save_add directory, and you will see new menu at File->Open External File->ALOS->ERSDAC GeoCoded Ortho Product in ENVI.
---------------------(Japanese)-----------------------------
資源・環境観測解析センター様より配布されています、PALSARオルソプロダクトの読み込みプログラムになります。
http://www.palsar.ersdac.or.jp/product/index.html
ENVIのsave_addディレクトリにersdac_ortho_read.savファイルを保存して、ENVIを起動していただくと、File->Open External File->ALOS->ERSDAC GeoCoded Ortho Product メニューが追加されます。このメニューよりデータファイルを指定して、データを読み込んでください。
詳細は、support_jp@ittvis.co.jp にお問い合わせください。
|
|
|
|
|
|
|
|
read article
This toolkit is specifically designed to work with HJ-1A and HJ-1B Level 2 HDF5 or GeoTIFF files. The default output is a ENVI standard format file. Optional processing choices vary by input format. Including the HDF5 data viewer and XML data viewer.
1.Run the save file directly
2.Copy the save file to the folder "save_add",like "C:\Program Files\ITT\IDL##\products\envi##\save_add"
Then you can see the menu : File→Open Extenral File→HJ-1→HJ1A/1B
|
|
|
|
|
|
|
Author : ITT Visual Information Solutions
Date : Thu 11/04/2010 @ 01:10
|
|
read article
This LiDAR toolkit provides a user of .LAS format LiDAR point cloud data with visualization, analysis and interpretation tools. Specific functionality includes various point cloud filtering methods, ASCII to .LAS conversion, raster product generation and .LAS tiling, subsetting, buffering and decimation.
Whitepaper >
Recorded Webinar >
|
|
|
|
|
|
|
|
read article
This program serves as a guide to modify the transformation parameters using default ENVI. The user can create their own parameters or use those that come included in ESRI Projection Engine and are not visible through the ENVI menu.
This routine allows the user to load the set of global parameters of Chile that by default are configured in ESRI Projection Engine for ENVI. In the case of Chile, the mapping is referred to the systems PSAD56, SAD69 and WGS84.
The tools Convert Map Projection and Convert Projection Layer by default made the transformation between Coordinate Systems through ESRI Projection Engine, but these transformations do not fit completely to Chile.
This .pro allows viewing directly the transformations from de ENVI menu options that can be used.
|
|
|
|
|
|
|
|
read article
New in IDLdoc 3.3:
* Created tutorial and reference manual documentation.
* Added embed directive to embed SVG or other graphics formats. For the "latex" comment style, .svg will be replaced with .pdf.
* Directory overview comments can be picked up from a .idldoc file in each directory. Tags include private and hidden to control the level of visibility of the directory and its contents, as well as author, copyright, and history.
* Added ROUTINE_LINE_CUTOFFS keyword to control level of warning for number of lines in a routine (only used when STATISTICS is set). Set ROUTINE_LINE_CUTOFFS to a two-element array indicating the number of lines that needs to be exceeded before the routine has a warning or is flagged.
* McCabe complexity computed for each routine when STATISTICS set. Added COMPLEXITY_CUTOFFS keyword to control level of warning for complexity. Set COMPLEXITY_CUTOFFS to a two-element array indicating the complexity that needs to be exceeded before the routine has a warning or is flagged.
* Added a link in each routine's details to its source code.
* Improved rst markup style. Headings can be created by underlining with "=" (for level 1 headings), "-" (level 2), or "~" (level 3). Links can be done explicitly via `my website ` or looked up in the scope of the comment's context, like `my_routine`. Added title directive so that .idldoc files can have a separate title to be display (instead of just their filename).
* Added a preformatted markup style which is nearly equivalent to verbatim, but also makes HTML output respect line-breaks. * Added author, copyright, history, and version tags to the overview file
* Allow properties of a class to be marked as hidden or private in rst format.
* Small changes to ensure compatible with IDL 8.0.
* Miscellaneous bug fixes.
|
|
|
|
|
|
|
|
read article
In image processing, rotate and rot function can be used to rotate an image. But if we want to keep orignal data after rotated an image, either one can't do. So, I modified the rot.pro in the path(C:\Program Files\ITT\IDL\IDL80\lib), using this pro, if use the KEEP keyword, the rotated result can be returned. You can see the picture.
|
|
|
|
|
|
|
Author : ben xiong nxqx@tom.com
Date : Tue 08/24/2010 @ 07:42
|
|
read article
HJ_Radio_Correction.sav is a user function that will convert HJ satalite DN values to floating point radiance values (W.m-2.Sr-1.um-1) using the gain and offset information found in the associated XML metadata file (.xml), and layersatcking four bands into one muti-bands layer file. you can see "HJ radio Correction" menu under Basic Tools menu if you put this sav file into \ITT\IDL##\products\envi##\save_add\ if you have some suggust,please connect me ,my emial address is nxqx@tom.com,or nxqx@21cn.com.
|
|
|
|
|
|
|
|
read article
The sav file was for extend envi's statistics function. If you copy the sav file to the folder "..\save_add",you can filnd the menu "basic tools" →'Mosaicking' →'Mosaic Batch', then you can select the files for mosaicing and set the value to see through.
|
|
|
|
|
|
|
|
read article
RevolutionIDL.zip
[Update - July 22, 2010] -- Revolution IDL 2.8 supports IDL 8.0
Revolution IDL unleashes the power of the IDL Object Graphics architecture by providing a high-level graphical user interface that allows the user to visualize data in a variety of ways, changing properties, positioning objects in 3D, and much more.
Object Graphics in IDL are very powerful, but writing the code necessary to produce even simple results is quite time consuming, which limits their usability. Revolution IDL helps working with complex 3D graphics by combining these four main components: 1. A powerful and intuitive 3D-based environment. 2. GUI access to object properties and hierarchy. 3. Algorithms to produce advanced graphics. 4. A source code generation mechanism that extracts the IDL program for all the graphics created with the application. You will find this 3D environment powerful enough to make it your regular graphics environment. The IDL source code generation capability will allow you to take any scene that you create and embed it into your own IDL programs.
|
|
|
|
|
|
|
Author : Eduardo Iturrate
Date : Fri 07/23/2010 @ 12:00
|
|
Source code generator for beginners
read article
[Update - July 22, 2010] -- Adopting IDL 8.0 new Graphics API
Whether you are new to IDL, or already have some experience with the language, this tool will assist you in creating basic programs that are easily reusable. Select among a variety of data sources, processing, and visualization options and the Source Code Generator will produce a simple program that does what you want. Each choice comes with a few links to further information in the documentation. You can also run all the programs for testing purposes, and save them for use in your own application. In addition, it brings together existing examples of basic widget programs as a quick reference of how to create GUI interfaces in IDL.
|
|
|
|
|
|
|
|
read article
The sav file was for extend envi's statistics function. If you copy the sav file to the folder "..\save_add",you can filnd the menu "basic tools" →'Statistics' →'Statistics Extended', then you can select the file for statistics and set the value to ignore. Then you can see the statics result, included pixelNumber,pixelTotal,pixelMax,pixelMin,pixelMean, pixelDeviation, pixelSquareSum and pixelVariance.
|
|
|
|
|
|
|
|
read article
This user function simply displays the contents of an ASCII text file. You can switch the view between an equal-spaced font and the current system font.
|
|
|
|
|
|
|
Author : David Gorodetzky
Date : Wed 05/19/2010 @ 03:21
|
|
converts data from spectral library format to tab delimted ascii text
read article
This batch routine converts data from spectral libary files into tab delimted column data in ascii format. The output text files are automatically named the same as the input files but the extension is changed to .txt. The user is prompted to select the input files from an ENVI_SELECT dialog. Remember to select all the files you want to convert (using CTRL+CLICK for multiple file selection). Also, be aware that ASCII format is not terribly efficient, so a small spectral library can turn into quite a large text file.
|
|
|
|
|
|
|
|
read article
The EO-1 ALI calibration tool allows you to calibrate single band ALI files to radiance (W/(m^2*sr*um)) or at-sensor reflectance (0-1.0%). Information needed to calibrate ALI files include Sun Elevation and Acquisition Date which are present in the _MTL_L1T that should accompany the ALI files. The equations used to perform the calibration are taken from the document:
"Summary of current radiometric calibration coefficients for Landsat MSS, TM, ETM+ and EO-1 ALI sensors.", Chander et al. 2009 Remote Sensing of Environment 113, pp. 893-903.
Place the ali_calibration.sav in the \ENVI47\save_add directory. When you start ENVI, the new tool should reside in the Basic Tools ->Preprocessing->Calibration Utilities->EO-1 ALI Calibration.
|
|
|
|
|
|
|
Author : Daniel Pulido
Date : Wed 03/31/2010 @ 10:58
|
|
read article
This IDL application is a simple XML Viewer. It allows a user to visualize a XML file in a tree structure and search the file by its Elements, Content, Attribute or their Value.
- To run XML Viewer in IDL the file xmlviewer.sav can be restored and then run xmlViewer.
- To run XML Viewer in ENVI + IDL copy the file xmlviewer.sav to the save_add subfolder of the ENVI installation. The ENVI menu bar will contain a new pull down menu option File -> Launch XML Viewer.
Note, currently XML Viewer does not contain any file editing/saving features. It is intended to be quick visualization tool to ease the parsing and reading of xml files as they are becoming more ubiquitous as input files to many engineering applications.
|
|
|
|
|
|
|
|
read article
hen using the Scatter tool of ENVI, it can only show the image window's scatter plots, also the background and the point color can't be modified, this is very inconvenience for users to use the picture.
After downloading the file for this toolkit copy the .sav file to the "save_add" subfolder of the ENVI installation:
ENVI 4.4 and newer:
- Windows: C:\Program Files\ITT\IDL##\products\envi##\save_add\
- Mac OS X: /Applications/itt/idl##/products/envi##/save_add/
- UNIX/Linux: /usr/local/itt/idl##/products/envi##/save_add/
Once this is accomplished, restart the ENVI software and some new menu items will be added to the ENVI image window menu system:
Tools-Custome 2d Scater Plots...



|
|
|
|
|
|
|
|
read article
To use this program is very simply: download the file and move it to the "save_add" subfolder of the ENVI installation.
Once this is accomplished, restart ENVI and a new menu item will be added to the software:
Basic Tools→Preprocessing→General Purpose Utilities→ Landsat ETM+ Destripe
The purpose of this program is to destripe the Landsat7 ETM+ image's tripe for the .It used two interpolate methods to process the Landsat7 ETM+ image and corresponding Masking image.Also the program can be used to destripe other image which have masking file.

|
|
|
|
|
|
|
|
read article
This zip file contains the python and IDL code required to construct a GP Tool in ArcGIS around an ENVI routine. The example uses Feature Extraction, but any process can be substitued. The powerpoint file contains the slides from the web seminar on Mar.16.2010 on creating a GP Too. The video will be uploaded and linked at a later date.
This version requires ENVI+IDL, ENVI EX, and ArcGIS licenses to run.
|
|
|
|
|
|
|
|
read article
When using the ROI tool of ENVI, if the ROI has been drawn; ENVI has no tool to modify it. Here is a example: When you are drawing the Training Sites for supervised classification, you must be very carefully because if you make a little mistakes, there is no way go back, the only thing you can do is delete this ROI and redraw it. Usually the training site contains lots of small parts. This will make you crazy...
This IDL module is written to work with ENVI in order to modify the ENVI ROI interactively. Current version can complete following tasks: 1: erase ROIs in a interactive way 2: Eliminate overlaps between Cutter ROI and other ROIs
|
|
|
|
|
|
|
|
read article
The IMAGE_SAVGOL program applies the Savitzky-Golay smoothing filter to multispectral and hyperspectral images. The filer is defined as a weighted moving average with weighting given as a polynomial of a certain degree. The returned coefficients, when applied to a signal (spectrum in this case), perform a polynomial least-squares fit within the filter window. This polynomial is designed to preserve higher moments within the data and reduce the bias introduced by the filter. The filter can use any number of points for this weighted average and works especially well when the typical peaks of the signal are narrow. The heights and widths of the curves are generally preserved. For more information see the IDL help regarding the SAVGOL filter.
Place the image_savgol.sav in the \envi47\save_add directory of your ENVI installation. A new button will appear under the Filter menu called 'Apply Savgol filter'.
|
|
|
|
|
|
|
|
read article
The IKONOS calibration tool allows you to calibrate single band IKONOS files to radiance (W/(m^2*sr*um)) or at-sensor reflectance (0-1.0%). Information needed to calibrate IKONOS files include Sun Elevation and Acquisition Date which are present in the _metadata.txt that should accompany the IKONOS files. The equations used to perform the calibration are taken from the document:
IKONOS Planetary Reflectance and Mean Solar Exoatmospheric Irradiance, Taylor, Martin. GeoEye.
Place the ikonos_calibration.sav in the \ENVI47\save_add directory. When you start ENVI, the new tool should reside in the Basic Tools ->Preprocessing->Calibration Utilities->IKONOS Calibration.
|
|
|
|
|
|
|
Author : Adam O'Connor
Date : Fri 12/18/2009 @ 07:40
|
|
GUI program to convert between degress lat/lon and meters
read article
To install this program simply download the file and move it to the "save_add" subfolder of the ENVI installation:
ENVI 4.3 and older:
- Windows : C:\RSI\IDL##\products\envi##\save_add\
- Mac OS X : /Applications/rsi/idl_#.#/products/envi_#.#/save_add/
- UNIX/Linux : /usr/local/rsi/idl_#.#/products/envi_#.#/save_add/
ENVI 4.4 and newer:
- Windows : C:\Program Files\ITT\IDL##\products\envi##\save_add\
- Mac OS X : /Applications/itt/idl##/products/envi##/save_add/
- UNIX/Linux : /usr/local/itt/idl##/products/envi##/save_add/
Once this is accomplished, restart ENVI and a new menu item will be added to the software:
Map > Map Distance Converter
The purpose of this program is to provide a GUI interface for map distance conversion between decimal degrees lat/lon and meters, and vice-versa, using a wide variety of ellipsoids. This program is useful to determine the appropriate pixel size when converting data from a fixed-angle (e.g. Geographic Lat/Lon) projection to a fixed-length projection (e.g. UTM). It is important to note that this program performs a DISTANCE conversion ... not a fixed map coordinate conversion. There is already a map coordinate conversion in ENVI under the "Map" menu.
|
|
|
|
|
|
|
|
|
|
|
|