Advertisement
Guest User

Polygon Rubberband Python

a guest
Apr 8th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. mCanvas = iface.mapCanvas()
  2. rb = QgsRubberBand(mCanv,True) #shouldn't this create a polygon shaped band?
  3.  
  4. rb.addPoint(QgsPoint(300,300))
  5. rb.addPoint(QgsPoint(400,400))
  6. rb.addPoint(QgsPoint(400,600))
  7.  
  8. print rb.asGeometry().exportToWkt()
  9.  
  10. LINESTRING(300.0 300.0, 400.0 400.0, 400.0 600.0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement