Skip to content

Instantly share code, notes, and snippets.

@jef-n
Created June 14, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jef-n/5c59fc0b83acf5c4f0b0 to your computer and use it in GitHub Desktop.
Save jef-n/5c59fc0b83acf5c4f0b0 to your computer and use it in GitHub Desktop.
f=QgsFeature()
for x in range(0,100,10):
for y in range(0,100,10):
f.setGeometry( QgsGeometry.fromRect( QgsRectangle( x, y, x+10, y+10 ) ) )
iface.activeLayer().addFeature(f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment