Johnson2的个人博客分享 http://blog.sciencenet.cn/u/Johnson2

博文

地理学ENVI/IDL常用函数

已有 5198 次阅读 2013-4-14 21:45 |系统分类:科研笔记| 地理学_技术工具

ENVI_ENTER_DATA

This procedure is used to enter image data in memory into ENVI. The individual images appear as bands in the Available Bands List and are available for display or use by other ENVI functions. ENVI_ENTER_DATA internally calls ENVI_SETUP_HEAD and registers the bands in the available bands list. Items entered using ENVI_ENTER_DATA are considered IN_MEMORY items.

利用该函数可以将影像进入计算机内存,开始处理,也可以获得fid。


ENVI_FILE_MNG

This procedure is used to manage ENVI files in memory and on disk.

Syntax

ENVI_FILE_MNG [, /DELETE], ID=file ID, /REMOVE

KeywordsDELETE

Set this keyword to delete the specified file from the hard disk.

ID

Use this keyword to specify the file ID for the open file. This is the value returned from the keyword R_FID in the ENVI_OPEN_FILE procedure. FID is a long integer with a value greater than 0.

REMOVE

Set this keyword to remove the specified file from within ENVI.

Example

Remove the file specified by FID from ENVI and delete it from the disk.

ENVI_FILE_MNG, id=fid, /REMOVE, /DELETE

该函数,避免处理的影像出现在ENVI Band List里,加快计算速度。

STRMID

The STRMID function extracts a substring from a string expression. The result of the function is a string of Length characters taken from Expression , starting at character position First_Character .

Calling Sequence

Result = STRMID( Expression, First_Character [, Length ] )

Arguments
Expression

The expression from which the substring is to be extracted. If this argument is not a string, it is converted using IDL's default formatting rules. If Expression is an array, the result is an array with the same structure, where each element contains the substring of the corresponding Expression element.

First_Character

The starting position within Expression at which the substring starts. The first character position is 0.

Length

The length of the substring. If there are not enough characters left in the main string to obtain Length characters, the substring is truncated. If Length is not supplied, STRMID extracts all characters from the specified start position to the end of the string.

Example

If the variable B contains the string "IDL is fun", the substring "is" can be extracted and stored in the variable C with the command:

C = STRMID(B, 4, 2)

用于删减字符串,可用于文件批量重命名。

不断添加中……




https://blog.sciencenet.cn/blog-343587-680182.html

上一篇:Websites related to landslide studies
下一篇:还会再跳起来去够那片银杏叶吗?
收藏 IP: 159.226.111.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-12-23 05:52

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部