2013年10月29日 星期二

SQL 與 空間分析 Spatial Analysis

Discuss in class

這禮拜的課堂內容主要著重在空間分析的利用,並且透過MapInfo的實作方式了解什麼是SQL,以及SQL能幫助GIS使用者做哪些事情?

回顧

1. SQL 結構化語言查詢 (Structure Query Language)

又稱標準化查詢語言(Standard Query Language)結構化查詢語言(Structure Query Language較常使用),它是一個用來查詢、更新和管理關聯式資料庫的語言,即使用者可以從資料庫表單與表單的查詢中擷取、排序和篩選想要的資料,如果與gis結合(可以做出空間座標的連結),如地理空間資訊的關聯式資料庫,讓屬性資料能有所連結。
上圖為兩個不同的軟體的SQL介面差異
 從上面兩個不同的軟體可以看到SQL的查詢不管在哪個軟體都離不開幾個核心,即Slect、From、Where、Group、Into。選擇需要資料→資料來自哪個圖層(來源)→以什麼做分類群集→查詢後的成果要放在哪邊?
並藉由其他函數式進行資料的篩選及其他運用。如:全世界人口密度>500的國家有哪些?                                


2.設計資料庫(需求分析)
3.資料庫文件


Example we do in class

Project1: Using  MapInfo professional version 6.0  do a Taipei  high speed route themetic map

Process :
1. open a table Taipei
2. open a route points table
3. open edit mode to graph a polyline
4. save a copy as a new layer 
5. add Taipei and route line layer. Go to Layer control chose this two layer view.
6. set the polyline layer to target (Object →Set Target → Split)

open point table
connect the point to line
poly line result
Taipei ,Route and split 

Project 2 : Using QGIS do the same thematic map like project one

Process :
1.install QGIS 2.0.1-Dufour
2.open Taipei map and route points( See fig 資料匯入
3.use point2one function let points to a line ( See fig. ponts2one function and fig. result_point2one_line
4. if you cannot see the table attribute , you must change the way to input file. Using CSV form input  QGIS and you will      see the attribute.
5. The final step that you need to do is use intersect with theme map(Taipei map) 
6. Setting  the color gradient to identify the high speed line in  different area and label the name of all area. The theme map 
    result you can see fig  ( fig.成果圖_將各個區域label 並使用交集將其作分割
 fig.資料匯入
fig. ponts2one function
fig.result_point2one_line
fig.成果圖_將各個區域label 並使用交集將其作分割

Weekly knowledge about GIS

你還在看風水?? 現在用GIS的概念就可以知道店應該開在哪裡。
運用技術分析選店家位子
上圖是一張利用打卡位子來選開設店家位置的分布圖,從圖上的屬性資料可以看到有三個店家分別是STARBOUCKS、MCDONAL、DUNKIN DONUTS ,他們依照需求的不同,會選擇不同的位子開設店面,譬如說鄰近的商店類型、所在範圍內商店是否有吸引人的地標、是否靠近大眾交通工具等等議題都是開設店面是需要被考量的因素。國外的研究團隊藉由打卡數據分析,可以知道哪些地區是高密度的顧客密集區,且每個店面受歡迎的程度不同,因此考量的因素也不同,一如星巴克喜歡在人潮流動高的運輸站或交通便利的地區旁進行店面的設置,麥當勞以及DUNKIN DONUTS 則偏好在人口密度高的都會區設置,這樣的展示成果與呈現方式,正是GIS 用於商業用途上的一項應用。

FourSquare: 
https://foursquare.com/explore?mode=url&near=New%20York%2C%20NY&q=starbucks

沒有留言:

張貼留言