Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add missed scripts to examples group
  • Loading branch information
alexbruy committed Nov 12, 2012
1 parent 15004f4 commit 4496c74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
@@ -1,3 +1,4 @@
##[Example scripts]=group
##input=vector
##cellsize=number 1000.0
##grid=output vector
Expand Down
@@ -1,5 +1,6 @@
#Definition of inputs and outputs
#==================================
##[Example scripts]=group
##input=vector
##class_field=field input
##value_field=field input
Expand Down Expand Up @@ -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.