Skip to content

Instantly share code, notes, and snippets.

@NathanW2
Created December 23, 2010 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save NathanW2/752661 to your computer and use it in GitHub Desktop.
Save NathanW2/752661 to your computer and use it in GitHub Desktop.
pyqgis
import qgis.core
import qgis.gui
def TestWrite(iface):
can = iface.mapCanvas()
layer = can.currentLayer()
geom = layer.selectedFeatures()[1].geometry()
return geom.length()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment