PointOnSurface(Geometry self) -> Geometry
OGRGeometryH
OGR_G_PointOnSurface(OGRGeometryH hGeom)
Returns...If OGR is built without the GEOS library,
this method will always fail, issuing a CPLE_NotSupported error...OGR 1.10
Centroid(Geometry self) -> Geometry
int OGR_G_Centroid(OGRGeometryH hGeom, OGRGeometryH hCentroidPoint...If OGR is built without the GEOS library, this function will always fail, issuing a CPLE_NotSupported...import ogr
p = ogr.CreateGeometryFromWkt('POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 4,4 4,4 2,2 2)) ')
#