python获得坐标系信息

# -*- coding: cp936 -*-
#############################################################

import arcpy

import os

from arcpy import env

import math



env.overwriteOutput = True

shp_sheet = arcpy.GetParameterAsText(0)
sr = arcpy.Describe(shp_sheet).spatialReference
arcpy.AddMessage("sr.type:"+sr.type)
arcpy.AddMessage("sr.datumName:"+sr.datumName)
arcpy.AddMessage("sr.name:"+sr.name)
arcpy.AddMessage("sr.PCSCode:"+str(sr.PCSCode))
arcpy.AddMessage("sr.PCSName:"+sr.PCSName)
arcpy.AddMessage("sr.projectionName:"+sr.projectionName)
arcpy.AddMessage("sr.projectionCode:"+str(sr.projectionCode))
arcpy.AddMessage("sr.GCSCode:"+str(sr.GCSCode))
arcpy.AddMessage("sr.GCSName:"+sr.GCSName)
arcpy.AddMessage("sr.spheroidName:"+sr.spheroidName)
arcpy.AddMessage("sr.type:"+sr.type)

 

上一篇:Web(shrine)


下一篇:arcpy-字段唯一值、重复值、最值、平均值、方差、标准差、中数、众数