Skip to content
Permalink
Browse files

[processing] add Points from vector algorithm

  • Loading branch information
alexbruy committed Sep 13, 2013
1 parent 91ea88f commit 0bda3b61e19045ddead930a4a7bbddb8083f6b1e
Showing with 17 additions and 0 deletions.
  1. +17 −0 python/plugins/processing/script/scripts/Points_from_vector.py
@@ -0,0 +1,17 @@
##[Example scripts]=group
##Input_raster=raster
##Input_vector=vector
##Output_layer=output vector

from qgis.core import *

vector = processing.getobject(Input_vector)
raster = processing.getobject(Input_raster)

geometryType = vector.geometryType()
if geometryType == QGis.Point:
processing.runalg("qgis:saveselectedfeatures", vector, Output_layer)
elif geometryType == QGis.Line:
processing.runalg("qgis:pointsfromlines", raster, vector, Output_layer)
elif geometryType == QGis.Polygon:
processing.runalg("qgis:pointsfrompolygons", raster, vector, Output_layer)

0 comments on commit 0bda3b6

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