<< Click to Display Table of Contents >>

 

SGDOpenDocument

 

 

開啟sgd地圖文件

SGDOpenDocument使用範例

import sgpy

# 在desktop程式,開啟sgd專案

sgpy.SGDOpenDocument("C:\\temp\\test.sgd")

# 取得目前地圖

sgd = sgpy.mapping.MapDocument("current")

# 取得data frame

df = sgd.activeDataFrame

#從檔案中載入圖層,並加入data frame中

lyr = sgpy.mapping.Layer("D:/temp/Line2.shp")

sgpy.mapping.AddLayer(df, lyr,"AUTO_ARRANGE")

#地圖更新 (將前面所做的設定,套用到地圖上)

sgpy.RefreshActiveView()

 


©2015 Supergeo Technologies Inc. All rights reserved.