天水一色分享 http://blog.sciencenet.cn/u/lincystar

博文

Arcgis栅格切割和拼接(含多光谱影像切割和融合)

已有 15038 次阅读 2011-6-18 05:39 |个人分类:科研笔记|系统分类:科研笔记| color

1. clip a raster based on polygon shape file or feature class.(用shp多边形切割栅格)
from http://support.esri.com/en/knowledgebase/techarticles/detail/30806
procedure:
  1. In ArcToolbox navigate to Spatial Analyst Tools > Extraction > Extract by Mask. Open this tool.
  2. Specify the raster desired to clip as the input raster.
  3. Specify the polygon feature class/shapefile desired to clip the raster.
  4. Specify an output raster.
  5. Click OK to run the tool.
Note:
>>  This can only be performed one band at a time. For color images (multiband), each individual band needs to be run through this procedure. The resulting bands need to be grouped back together with the 'Composite Bands' tool.
>> The Spatial Analyst extension is required to access the proper tools.

2. clip a multi-band image using ArcGIS and Spatial Analysis(切割多光谱影像)
Procedure
To use this procedure a masking dataset that covers the area to be clipped is required. The dataset may be a raster or a polygon feature class and should be in the same coordinate system as the raster being clipped.
  1. Add the individual bands of raster to ArcMap. Do not add the raster as a multiband. Each band should be its own separate layer in ArcMap's Table of Contents.
  2. Add the masking dataset to ArcMap.
  3. Navigate to Spatial Analyst > Options.
  4. On the General tab set the Working Directory. 

     The path to the Working Directory may not have any spaces. For example, a folder called 'My Documents' may cause an error, but 'My_Documents' does not.

  5. On the General tab set the Analysis Mask to the masking dataset.
  6. On the Extent tab set the extent to the masking dataset.
  7. On the Cell Size tab set the cell size to the clipping raster.
  8. Click OK.
  9. Open Spatial Analyst > Raster Calculator.
  10. Double-click on the first band in the Layers list. This will put the band into the expression box below.
  11. Click Evaluate. A new calculation layer will be added to ArcMap's Table of Contents.
  12. Repeat Steps 10 and 11 until all bands of the raster have been clipped.
  13. Right-click on each new calculation layer and save it to a raster dataset with Make Permanent.
  14. Open Spatial Analyst > Raster Calculator.
  15. Use the MAKESTACK function to make an ESRI Grid Stack from the calculation layers.  MAKESTACK <outstack> LIST <band1> <band2> <band3>. Where <outstack> is a name for the output stack and <band1>, <band2>, <band3> are the calculation layers.Optionally, the output stack may be converted to a TIFF, IMG or ArcSDE Raster in ArcCatalog.
3. Multiband images mosaic using ArcGIS and Spatial Analysis(多光谱影像融合)
Procedure
  1. Start ArcCatalog and navigate to the raster of choice.
  2. Right click on the raster and select Export > Raster To Different Format...
  3. Save as an ESRI GRID.-show me-

    [O-Image] Export raster dialog


    This process will create a grid for each band in the image. The grids will be distinguished by a "c + number" suffix. For example, image1 will export to image1c1, image1c2 and image1c3. A grid stack with the root name of the other output grids will also be created.
  4. Start ArcMap and add the grids representing the bands of data to a data frame.
  5. Select Raster Calculator from the Spatial Analyst pull-down menu
  6. Use the MOSAIC command in Raster Calculator to mosaic the data together. 
    Here is an example of the syntax: 

    [Band1] = MOSAIC([ImageName1],[ImageName2],[ImageName3])


     [Band1] is the name of the output grid; a permanent grid will be created on disk called Band1. This step will need to be done for each band.


     ImageName1 refers to the output raster from band1 of the first image. ImageName2 and ImageName3 refer to the output rasters from the first band of images 1 and 2, respectively.

  7. Use the MAKESTACK command in the Raster Calculator to create a grid stack from the mosaiced bands. Here is an example of the syntax: 

    MAKESTACK newstack LIST [Band1] [Band2] [Band3]


     "Newstack" will be the name of the output stack. There are no parentheses or commas used with this command in the Raster Calculator.


     The word "LIST" should be omitted when using the MAKESTACK command in version 8.1.2

  8. Navigate to the directory containing the new grid stack in ArcCatalog.
  9. Right click on the grid stack and select Export. Choose Raster to MrSID if you need this format or Raster to Different Format. The Raster to Different Format utility will allow you to create TIFF's or ERDAS Imagine image files.
4. convert individual raster bands to a color or multiband image
Procedure
  1. In ArcToolbox, navigate to Data Management Tools > Raster > Composite Bands and open this tool.
  2. Specify the individual raster bands as the input rasters. 

     The order in which the individual raster layers are listed are how they output to the output raster. The first layer is the red band, the second layer is the green band, and the third layer is the blue band. If working with greater than three bands, the other layers are also added in order but are not assigned to a red, green or blue value.

  3. Specify a path and a name for the output raster. 

     If a GRID stack is not desired, enter a *.tif or *.img extension or write to a geodatabase.

  4. Click OK to run the tool.



https://blog.sciencenet.cn/blog-237238-456522.html

上一篇:土壤质地计算器(soil texture calculator)
下一篇:石油工程找工作
收藏 IP: 131.216.32.*| 热度|

1 杨华磊

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

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

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

GMT+8, 2024-5-17 11:37

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部