Skip to content

Instantly share code, notes, and snippets.

@esisa
Created October 9, 2012 11:42
Show Gist options
  • Save esisa/3858218 to your computer and use it in GitHub Desktop.
Save esisa/3858218 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
from shapely.geometry import Polygon
polygon = Polygon([(0, 0), (1, 1), (1, 0)])
#print polygon.bounds
print "Areal før buffer: " , polygon.area
polygon2 = polygon.buffer(10)
print "Areal etter buffer: " , polygon2.area
print "Intersects: ", polygon2.intersects(polygon)
print "Intersects: ", polygon.within(polygon2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment