Last active
December 23, 2015 17:59
-
-
Save hugoledoux/6672756 to your computer and use it in GitHub Desktop.
GEOS doesn't check the orientation of rings, ie if oring and iring have same orientations then it's still valid
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
from shapely.wkt import loads | |
wkt = 'POLYGON((0 0, 10 0, 10 10, 0 10, 0 0), (1 1,3 1, 3 3, 1 1))' | |
p = loads(wkt) | |
print p.exterior.is_ccw | |
print p.interiors[0].is_ccw | |
print "p valid?", p.is_valid | |
print p.wkt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment