本文整理汇总了Python中lds.LDSUtilities.LDSUtilities.extractFields方法的典型用法代码示例。如果您正苦于以下问题:Python LDSUtilities.extractFields方法的具体用法?Python LDSUtilities.extractFields怎么用?Python LDSUtilities.extractFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lds.LDSUtilities.LDSUtilities
的用法示例。
在下文中一共展示了LDSUtilities.extractFields方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: readLayerParameters
# 需要导入模块: from lds.LDSUtilities import LDSUtilities [as 别名]
# 或者: from lds.LDSUtilities.LDSUtilities import extractFields [as 别名]
def readLayerParameters(self,id):
'''Full Feature config reader'''
from DataStore import InaccessibleFeatureException
layer = self.lcfname.ds.GetLayer(self.lcfname.LDS_CONFIG_TABLE)###fname -> lcfname
layer.ResetReading()
#HACK Win7
layer.GetFeatureCount()
feat = self.lcfname._findMatchingFeature(layer, 'id', id)###fname -> lcfname
if not feat:
InaccessibleFeatureException('Cannot access feature with id='+str(id)+' in layer '+str(layer.GetName()))
return LU.extractFields(feat)
示例2: readAllLayerParameters
# 需要导入模块: from lds.LDSUtilities import LDSUtilities [as 别名]
# 或者: from lds.LDSUtilities.LDSUtilities import extractFields [as 别名]
def readAllLayerParameters(self):
'''Full Layer config reader'''
lcel = []
layer = self.lcfname.ds.GetLayer(self.lcfname.LDS_CONFIG_TABLE)### fname -> lcfname
if layer:
layer.SetIgnoredFields(('OGR_GEOMETRY',))
layer.ResetReading()
#HACK Win7
layer.GetFeatureCount()
feat = layer.GetNextFeature()
while feat:
#ii = LU.extractFields(feat)
#print '>1>',ii
#lcel += [ii,]
lcel += [LU.extractFields(feat),]
feat = layer.GetNextFeature()
#if feat: print '>2>','fid=',feat.GetFID(),'rc=',layer.GetRefCount(),'fc=',x
return lcel