2012年12月1日 星期六

山、海和溪流環抱的南澳


前幾個星期,因工作需要去南澳一趟
見到許久未見的毛,勾起許多南澳的回憶

2012年5月26日 星期六

ArcGIS將Raster網格資料轉成xyz文字檔

以前在把Raster網格資料轉成xyz的表格,通常經過許多繁複的程序: Raster to point > add xy > open attribute table >export table,這幾天從ESRI網站發現原來只要一個指令就可以做到以上的步驟:

資料來源: http://support.esri.com/en/knowledgebase/techarticles/detail/26568
The following steps require the Spatial Analyst extension to be active and the Spatial Analyst toolbar to be turned on.

  1. Add the grid to ArcMap.
  2. Select the Raster Calculator option from the Spatial Analyst menu.
  3. Use the following expression in the Raster Calculator where [ingrid] is the name of the grid layer:

    outfile.txt = SAMPLE([ingrid],[ingrid])
  4. The text file called outfile.txt is written to the working directory. The working directory can be determined or set from the Spatial Analyst > Options > General tab. 

     The format of the output text file may have to be modified to be compatible with specific needs. The first and last columns in the text file are the z-values. 

     ESRI does not provide the VBA code for the above procedure. The necessary code must be developed by the user.

    翻譯
    1. 將你的grid加入ArcMap.
    2. 從 Spatial Analyst 開啟   Raster Calculator .
    3. 輸入以下的code,其中ingrid為你要轉出的檔案,例如 abc.txt = SAMPLE(C:\a1,  C:\a1 )。

      outfile.txt = SAMPLE([ingrid],[ingrid])
    4. 如果你要改輸出路徑,可以從 Spatial Analyst > Options > General tab去修改,但是其實只要在輸出檔名增加路徑即可,例如: D:\abc.txt = SAMPLE(C:\a1,  C:\a1 )

2012年4月18日 星期三

如何批次製作河道橫斷面

 
在模擬水理模式時,常需要由DEM資料收產橫斷面資料,如何自動生產垂直縱斷面的polyline常需要花費許多人力,以下介紹當有一個河道縱斷面的polyline,並且已經切割為數個河段(feature),如何生批次產出河道橫斷面。
1. 到ESRI網站下載Create Perpendicular Lines to Each Segment of a Shapefile
1
http://arcscripts.esri.com/details.asp?dbid=15756