2013年5月14日 星期二

登山社出隊地圖

2001~2009我在登山社出隊地圖

在較大的地圖上查看Mountains
註:綠色樹木為勘查或郊山;藍色波浪為溯溪隊;黃色太陽為高山傳統隊伍;紅色山崩屬於技術攀岩隊伍。

我發現爬山主要集中在宜蘭和烏來一帶,這也反應出操、鳥、賤的登山風格。而中、南部的隊伍數不到十隊,但幾乎都是長程的隊伍。

雖然我去過的隊伍已勘查居多,但一個不會游泳的人居然去過那麼多溯溪隊!!。

這幾年,登山社爬山的記憶在似乎退化的特別快。今天怪叔叔和子容從美國回台,從學術研究聊到美國生活,再聊到爬山。問到我過去爬過哪些台灣中部的山,我居然完全想不來。如果不常整理,可能再過幾年就會忘光了。

2013年4月22日 星期一

Matlab寫入text或Excel

寫入文字檔text


fid = fopen('filename.txt','w' ); 
fprintf(fid, '%d %d %5.2f\n', data' ); 
fclose(fid);

寫入Excel

xlswrite('filename.xlsx', data, 'sheet1', 'A1')

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