I'm trying to get the intersection geometry result of two polygons using the python OGR library.
I have verified that each polygon is a geometry and that they intersect. However, intersects returns true while Intersection returns None. Any ideas?
# First polygon
ringA = ogr.Geometry(ogr.wkbLinearRing)
ringA.AddPoint(1179091.1646903288, 712782.8838459781)
...
polyA = ogr.Geometry(ogr.wkbPolygon)
polyA.AddGeometry(ringA)
# Second polygon
ringB = ogr.Geometry(ogr.wkbLinearRing)
ringB.AddPoint(1179091.1646903288, 712782.8838459781)
...
polyB = ogr.Geometry(ogr.wkbPolygon)
polyB.AddGeometry(ringB)
if (polyA.Intersects(polyB)) # returns True
return polyA.Intersection(polyB) # returns None