cl991036
管理员
管理员
  • 注册日期2003-07-25
  • 发帖数5917
  • QQ14265545
  • 铜币29669枚
  • 威望217点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • GIS帝国铁杆
阅读:1045回复:0

使用ArcGIS的Raster Caclutaor剪切栅格文件

楼主#
更多 发布于:2007-10-11 10:10
<P>如果我们需要把一个栅格文件(可以是<FONT face="Times New Roman">tif</FONT>、<FONT face="Times New Roman">grid</FONT>等<FONT face="Times New Roman">arcgis</FONT>所能识别的)的一部分特定感兴趣区截取出来,而且是任意形状的那种,就可以使用<FONT face="Times New Roman">arcgis</FONT>的<B>Raster Caclutaor</B>功能实现。利用<B>Raster Caclutaor</B>功能我们也可以把某个栅格图像与某一个矢量文件的相重叠部分单独切出来。两者的步骤基本一致,都是需要把矢量文件先转成栅格格式,然后利用进行象元间的加减乘除操作。 </P>
<P>步骤:</P>
<P><FONT face="Times New Roman"><STRONG>1.</STRONG> </FONT>将矢量文件和栅格文件同时添加到<FONT face="Times New Roman">arcmap</FONT>当中。</P>

<P><FONT face="Times New Roman"><STRONG>2.</STRONG> </FONT>先将矢量文件转为栅格文件<FONT face="Times New Roman">” polygonRaster - polygonraster”</FONT></P>
<P><FONT face="Times New Roman">Spatial analysis</FONT>工具条下的<FONT face="Times New Roman">convert, Features to Raster</FONT></P>

<P><FONT face="Times New Roman"><STRONG>3.</STRONG> Spatial analysis</FONT>工具条打开<B>Raster Caclutaor</B><B>,在计算框内输入:</B><B></B></P>
<P><B>[Topo.sid] - [polygonRaster - polygonraster]</B><B>。</B><B></B></P>

<P><FONT face="Times New Roman"></FONT> </P>
<P><FONT face="Times New Roman" color=#f73809>Tips</FONT><FONT color=#f73809>:</FONT>这里采用的是两图层相剪操作,是因为<B>polygonRaster – polygonrasterd</B><B>栅格文件的</B><B>Value</B><B>为</B><B>0</B><B>,这样两图层象素间</B><B>Value</B><B>值对应相减,得到的是</B><B>Topo.sid</B><B>的</B><B>Value</B><B>值。</B><B></B></P>
<P>如果说<B>polygonRaster – polygonrasterd</B><B>的</B><B>value</B><B>值为</B><B>1.</B><B>为了获得</B><B>Topo.sid</B><B>的</B><B>value</B><B>值则应该选择两图层象素值相乘操作。</B><B></B></P>
<P>有时候这样的图层相剪操作会不成功,提示“<FONT face="Times New Roman">Error:  Failed to evaluate the calculator expression</FONT>”。目前我还不太清楚具体原因是什么,在<FONT face="Times New Roman">ESRI</FONT>支持中心找到一篇文章,提到了可能的原因(语法错误、像元大小不一致、大小写不一致等)</P>
<P>(<FONT face="Times New Roman">http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow;d=18406</FONT>)</P>
<P><FONT face="Times New Roman"> </FONT></P>
<P><FONT face="Times New Roman">The error message "Failed to evaluate the calculator equation" appears after clicking Evaluate on the Raster Calculator dialog box.</FONT></P>
<P><FONT face="Times New Roman">Cause</FONT></P>
<P><B>There are several causes for this problem: <BR></B><FONT face="Times New Roman">&#8226; You have a syntax error in the calculator expression. <BR>&#8226; The extent and cell size of your input raster is different than the extent set for your analysis results. <BR>&#8226; The expression will not be evaluated if there are carriage returns before or after the expression. <BR>&#8226; The Raster Calculator is case sensitive. <BR>&#8226; There are too many open grids. There is a limit of 50 open rasters of the grid format at any one time.</FONT></P>
<P><B>Solution or Workaround</B></P>
<P><FONT face="Times New Roman">Some of these issues have been addressed in ArcGIS Version <ST1:CHSDATE w:st="on" IsROCDate="False" IsLunarDate="False" Day="30" Month="12" Year="1899">8.1.2</ST1:CHSDATE>. <BR><BR>The corresponding workarounds for the above causes are:</FONT></P>
<P><FONT face="Times New Roman">Check your syntax. Type Map Algebra in the index of the online Help system for information on Map Algebra and its syntax. </FONT></P>
<P><FONT face="Times New Roman">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. </FONT></P>
<P><FONT face="Times New Roman">Do not use carriage returns in your expression. Allow the expression to word-wrap if it is lengthy. <BR>This problem has been resolved in ArcGIS <ST1:CHSDATE w:st="on" IsROCDate="False" IsLunarDate="False" Day="30" Month="12" Year="1899">8.1.2</ST1:CHSDATE>. </FONT></P>
<P><FONT face="Times New Roman">Make sure the layer name typed into the expression box case-matches the name of the layer in the Layers list. For example: </FONT></P>
<P><FONT face="Times New Roman">Layer name: Elevation<BR>Expression typed: slope([elevation]) <BR>This expression will not work. The first letter of "elevation" should be capitalized. <BR>This problem has been resolved in ArcGIS <ST1:CHSDATE w:st="on" IsROCDate="False" IsLunarDate="False" Day="30" Month="12" Year="1899">8.1.2</ST1:CHSDATE>. </FONT></P>
<P><FONT face="Times New Roman">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. <BR>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. <BR><BR></FONT></P>
喜欢0 评分0
没钱又丑,农村户口。头可断,发型一定不能乱。 邮箱:gisempire@qq.com
游客

返回顶部