编程语言
首页 > 编程语言> > python获得坐标系信息

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)

 

标签:AddMessage,python,sr,信息,str,type,import,arcpy,坐标系
来源: https://www.cnblogs.com/gisoracle/p/10923800.html