GEOSVoronoiDiagram is not published in the Shapely API. However, it is available in the newer GEOS libraries. I'm trying to use it with
func = getattr(geos._lgeos, 'GEOSVoronoiDiagram_r')
attr = ftools.partial(func, geos.lgeos.geos_handle)
attr.__name__ = func.__name__
setattr(geos.lgeos, 'GEOSVoronoiDiagram', attr)
geos.lgeos.GEOSVoronoiDiagram.restype = c_void_p
geos.lgeos.GEOSVoronoiDiagram.argtypes = [c_void_p, c_void_p, c_double, c_int]
gc = geom_factory(
geos.lgeos.GEOSVoronoiDiagram(
geom._geom,
env._geom,
tolerance,
int(edges)
)
)
g for g in gc.geoms]
Which is copied from relevant code in Shapely, but that gives the error
ctypes.ArgumentError: argument 4: <type 'exceptions.TypeError'>: Don't know how to convert parameter 4
What am I missing?