Skip to content
Permalink
Browse files

add missed scripts to examples group

  • Loading branch information
alexbruy committed Nov 12, 2012
1 parent 15004f4 commit 4496c74e7c823eb373661be4ef0ee7846b9482e9
@@ -1,3 +1,4 @@
##[Example scripts]=group
##input=vector
##cellsize=number 1000.0
##grid=output vector
@@ -1,5 +1,6 @@
#Definition of inputs and outputs
#==================================
##[Example scripts]=group
##input=vector
##class_field=field input
##value_field=field input
@@ -44,18 +45,18 @@
if clazz not in classes:
classes[clazz] = []
if value not in classes[clazz]:
classes[clazz].append(value)
classes[clazz].append(value)

# Create output vector layer with additional attribute
while provider.nextFeature(inFeat):
print int((500 * nElement)/nFeat)
nElement += 1
nElement += 1
inGeom = inFeat.geometry()
outFeat.setGeometry( inGeom )
atMap = inFeat.attributeMap()
clazz = atMap[class_field_index].toString()
outFeat.setAttributeMap( atMap )
outFeat.addAttribute( len(provider.fields()), QVariant(len(classes[clazz])))
writer.addFeature( outFeat )
del writer

del writer

0 comments on commit 4496c74

Please sign in to comment.
You can’t perform that action at this time.