【ArcPy】判断要素类的空间参考Spatial Reference(坐标系统Coordinate System)是地理坐标系、投影坐标系,还是没有定义

未定义空间参考

lyr=
desc=arcpy.Describe(lyr)
spatialRef = arcpy.Describe(lyr).spatialReference
print spatialRef.type
结果是'Unknown'

已定义空间参考

>>> geoSR = arcpy.SpatialReference(4490)
... print geoSR.type
... 
Geographic
>>> projSR = arcpy.SpatialReference(4525)
... print projSR.type
... 
Projected

 

posted @ 2023-02-19 16:27  yzhyingcool  阅读(188)  评论(0编辑  收藏  举报