I'm sure I must be missing something here but for the life of me I can't see what it might be. I have been struggling for the last hour with an issue with the Contains() method in OGR.
I am iterating through a grid square feature set and trying to perform a function when Polygon.Contains(Point) returns true. Both point and polygon are projected correctly to ETRS89(3035), but contains always returns false.
The map below illustrates one such point and square:
But the following returns false. Note the WKT is taken directly from QGIS to ensure an accurate test.
testPoly = ogr.CreateGeometryFromWkt("POLYGON ((3260000 3560000, 3260000 3570000, 3270000 3570000, 3270000 3560000, 3260000 3560000))") testPoint = ogr.CreateGeometryFromWkt("POINT (310936.84887920797336847 319641.00836165697546676)") print(testPoly.Contains(testPoint)) #Always returns false!!