Created
October 9, 2012 11:42
-
-
Save esisa/3858218 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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