Prj 文件属性
摘要
Describe 函数可返回 Prj 文件的以下属性。
Prj 文件可返回“PrjFile”的 dataType。
属性
属性 | 说明 | 数据类型 |
spatialReference (只读) |
The SpatialReference class instance of the .prj file | SpatialReference |
代码示例
Prj File properties example (stand-alone script)
The following stand-alone script displays some SpatialReference class properties for a prj file.
import arcpy # Create a Describe Object from a prj file. # desc = arcpy.Describe("C:\data\mexico.prj") # Print some properties of the SpatialReference class object. # SR = desc.spatialReference print "Name: " + SR.name print "Type: " + SR.type print "isHighPrecision: " + str(SR.isHighPrecision) print "scaleFactor: " + str(SR.scaleFactor)
7/10/2012