如果我们需要把一个栅格文件(可以是tifgridarcgis所能识别的)的一部分特定感兴趣区截取出来,而且是任意形状的那种,就可以使用arcgisRaster Caclutaor功能实现。利用Raster Caclutaor功能我们也可以把某个栅格图像与某一个矢量文件的相重叠部分单独切出来。两者的步骤基本一致,都是需要把矢量文件先转成栅格格式,然后利用进行象元间的加减乘除操作。

步骤:

1. 将矢量文件和栅格文件同时添加到arcmap当中。

 

2. 先将矢量文件转为栅格文件” polygonRaster - polygonraster”

Spatial analysis工具条下的convert, Features to Raster

 

3. Spatial analysis工具条打开Raster Caclutaor,在计算框内输入:

[Topo.sid] - [polygonRaster - polygonraster]

 

 

Tips这里采用的是两图层相剪操作,是因为polygonRaster – polygonrasterd栅格文件的Value0,这样两图层象素间Value值对应相减,得到的是Topo.sidValue值。

如果说polygonRaster – polygonrasterdvalue值为1.为了获得Topo.sidvalue值则应该选择两图层象素值相乘操作。

有时候这样的图层相剪操作会不成功,提示“Error:  Failed to evaluate the calculator expression”。目前我还不太清楚具体原因是什么,在ESRI支持中心找到一篇文章,提到了可能的原因(语法错误、像元大小不一致、大小写不一致等)

http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=18406

 

The error message "Failed to evaluate the calculator equation" appears after clicking Evaluate on the Raster Calculator dialog box.

Cause

There are several causes for this problem:
• You have a syntax error in the calculator expression.
• The extent and cell size of your input raster is different than the extent set for your analysis results.
• The expression will not be evaluated if there are carriage returns before or after the expression.
• The Raster Calculator is case sensitive.
• There are too many open grids. There is a limit of 50 open rasters of the grid format at any one time.

Solution or Workaround

Some of these issues have been addressed in ArcGIS Version 8.1.2.

The corresponding workarounds for the above causes are:

Check your syntax. Type Map Algebra in the index of the online Help system for information on Map Algebra and its syntax.

Make sure the extent and cell size of your analysis result is set appropriately in the Extent and cell size tabs of the Options dialog box. The extent of your analysis results should be set the same as, or encompass, the extent of the layer you are using in the Raster Calculator.

Do not use carriage returns in your expression. Allow the expression to word-wrap if it is lengthy.
This problem has been resolved in ArcGIS 8.1.2.

Make sure the layer name typed into the expression box case-matches the name of the layer in the Layers list. For example:

Layer name: Elevation
Expression typed: slope([elevation])
This expression will not work. The first letter of "elevation" should be capitalized.
This problem has been resolved in ArcGIS 8.1.2.

Remove any un-needed grids from the ArcMap Table of Contents. The total number of open grids, including the one being created by the Spatial Analyst function, cannot exceed 50.
This limit does not apply to non-grid rasters. A workaround is to convert grids to rasters in ArcCatalog with the Export > Raster To Different Format option.

posted on 2006-07-13 12:33  powermap  阅读(2735)  评论(2编辑  收藏  举报