<< Click to Display Table of Contents >>
LayerProp
圖層物件描述資料
LayerProp物件屬性
參數 |
說明 |
參數類型 |
extension (唯讀) |
檔案副檔名 |
字串 |
file (唯讀) |
檔案名稱 |
字串 |
path (唯讀) |
檔案路徑 |
字串 |
spatialReference (唯讀) |
座標系統 |
spatialReference |
hasM (唯讀) |
是否有M值 |
布林 |
hasZ (唯讀) |
是否有Z值 |
布林 |
bandCount (唯讀) |
波段數 |
長整數 |
shapeType (唯讀) |
Feature Class幾何類型, 為下列任一種 Point PointZ (有Z值) MulitPoint MulitPointZ (有Z值) PolyLine PolyLineZ (有Z值) Polygon PolygonZ (有Z值) |
字串 |
format (唯讀) |
格式 |
字串 |
featureClass (唯讀) |
featureClass |
|
table (唯讀) |
圖層屬性表格 |
|
LayerProp使用範例
import sgpy #讀取shp檔案描述屬性 (只有圖層檔,副檔名為slr者,才能取得LayerProp) fc =sgpy.Describe("D:/temp/Line2.slr") #取得”副檔名”,”檔案路徑”等屬性,並列印 path=fc.path extension =fc.extension del fc print str(path) print str(extension) |
©2015 Supergeo Technologies Inc. All rights reserved.