Skip to content

Commit 4496c74

Browse files
committed
add missed scripts to examples group
1 parent 15004f4 commit 4496c74

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

python/plugins/sextante/script/scripts/Hex_grid_from_layer_bounds.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
##[Example scripts]=group
12
##input=vector
23
##cellsize=number 1000.0
34
##grid=output vector

python/plugins/sextante/script/scripts/Number_of_unique_values_in_classes.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#Definition of inputs and outputs
22
#==================================
3+
##[Example scripts]=group
34
##input=vector
45
##class_field=field input
56
##value_field=field input
@@ -44,18 +45,18 @@
4445
if clazz not in classes:
4546
classes[clazz] = []
4647
if value not in classes[clazz]:
47-
classes[clazz].append(value)
48+
classes[clazz].append(value)
4849

4950
# Create output vector layer with additional attribute
5051
while provider.nextFeature(inFeat):
5152
print int((500 * nElement)/nFeat)
52-
nElement += 1
53+
nElement += 1
5354
inGeom = inFeat.geometry()
5455
outFeat.setGeometry( inGeom )
5556
atMap = inFeat.attributeMap()
5657
clazz = atMap[class_field_index].toString()
5758
outFeat.setAttributeMap( atMap )
5859
outFeat.addAttribute( len(provider.fields()), QVariant(len(classes[clazz])))
5960
writer.addFeature( outFeat )
60-
61-
del writer
61+
62+
del writer

0 commit comments

Comments
 (0)