当前位置: 首页>>代码示例>>Python>>正文


Python SSUtilities.setZMFlagInfo方法代码示例

本文整理汇总了Python中SSUtilities.setZMFlagInfo方法的典型用法代码示例。如果您正苦于以下问题:Python SSUtilities.setZMFlagInfo方法的具体用法?Python SSUtilities.setZMFlagInfo怎么用?Python SSUtilities.setZMFlagInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SSUtilities的用法示例。


在下文中一共展示了SSUtilities.setZMFlagInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import SSUtilities [as 别名]
# 或者: from SSUtilities import setZMFlagInfo [as 别名]

#.........这里部分代码省略.........
                DM.MakeFeatureLayer(inputFC, tempFC)
                inputFC = tempFC

        #### Describe Input ####
        self.info = ARCPY.Describe(inputFC)

        #### Assure Input are Features with OIDs ####
        if not self.info.hasOID:
            ARCPY.AddIDMessage("ERROR", 339, self.inName)
            raise SystemExit()

        #### Assign Describe Objects to Class Attributes ####
        self.inputFC = inputFC
        self.catPath = self.info.CatalogPath
        self.shapeType = self.info.ShapeType
        self.oidName = self.info.oidFieldName
        self.dataType = self.info.DataType
        self.shapeField = self.info.ShapeFieldName
        self.templateFC = templateFC
        self.hasM = self.info.HasM
        self.hasZ = self.info.HasZ
        self.silentWarnings = silentWarnings

        #### Set Initial Extent Depending on DataType ####
        if self.dataType in ["FeatureLayer", "Layer"]:
            try:
                tempInfo = ARCPY.Describe(self.catPath)
                extent = tempInfo.extent
            except:
                #### in_memory, SDE, NetCDF etc... ####
                extent = self.info.extent
            self.fidSet = self.info.FIDSet
            if self.fidSet == "":
                self.selectionSet = False
            else:
                self.selectionSet = True
        else:
            extent = self.info.extent
            self.fidSet = ""
            self.selectionSet = False
        self.extent = extent

        #### Set Spatial Reference ####
        inputSpatRef = self.info.SpatialReference
        inputSpatRefName = inputSpatRef.name
        if explicitSpatialRef:
            #### Explicitely Override Spatial Reference ####
            self.templateFC = None
            self.spatialRef = explicitSpatialRef
        else:
            #### 1. Feature Dataset, 2. Env Setting, 3. Input Hierarchy ####
            self.spatialRef = UTILS.returnOutputSpatialRef(inputSpatRef,
                                                  outputFC = templateFC)
        self.spatialRefString = UTILS.returnOutputSpatialString(self.spatialRef)
        self.spatialRefName = self.spatialRef.name
        self.spatialRefType = self.spatialRef.type

        #### Warn if Spatial Reference Changed ####
        if not silentWarnings:
            UTILS.compareSpatialRefNames(inputSpatRefName, self.spatialRefName)

        #### Check for Projection ####
        if self.spatialRefType.upper() != "PROJECTED":
            if self.spatialRefType.upper() == "GEOGRAPHIC":
                self.useChordal = useChordal
                if not explicitSpatialRef:
                    if self.useChordal:
                        ARCPY.AddIDMessage("WARNING", 1605)
                    else:
                        ARCPY.AddIDMessage("WARNING", 916)
            else:
                self.useChordal = False
                if not explicitSpatialRef:
                    ARCPY.AddIDMessage("WARNING", 916)
        else:
            self.useChordal = False

        #### Angular/Linear Unit Info ####
        self.distanceInfo = UTILS.DistanceInfo(self.spatialRef, 
                                         useChordalDistances = self.useChordal)

        #### Create Composition and Accounting Structure ####
        self.fields = {}
        self.master2Order = {}
        self.order2Master = {}

        #### Obtain a Full List of Field Names/Type ####
        self.allFields = {}
        listFields = self.info.fields
        for field in listFields:
            name = field.name.upper()
            self.allFields[name] = FCField(field)

        #### Set Z and M Flags and Defaults ####
        zmInfo = UTILS.setZMFlagInfo(self.hasM, self.hasZ, self.spatialRef)
        self.zFlag, self.mFlag, self.defaultZ = zmInfo
        self.zBool = self.zFlag == "ENABLED"

        #### Render Type ####
        self.renderType = UTILS.renderType[self.shapeType.upper()]
开发者ID:rvinc66,项目名称:ArcGISRuntimeBook,代码行数:104,代码来源:SSDataObject.py


注:本文中的SSUtilities.setZMFlagInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。