【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