[geos-devel] Geos Python bindings

Alessandro Candini candini at meeo.it
Tue Feb 21 03:01:02 EST 2012

On 02/20/2012 05:58 PM, Sandro Santilli wrote:
> On Mon, Feb 20, 2012 at 05:05:23PM +0100, Alessandro Candini wrote:
>> Hi.
>> I have compiled geos-3.3.2 with python bindings enabled.
>> So I get the following python files:
>> geos.py
>> tests/runtests.py
>> tests/example.py
>> tests/test_geometry.py
>> But in them I cannot find the MinimumDiameter object and its methods.
>> Is it missing? If I would use it through python, have I to implement
>> it from scratch?
> Did you read the README.txt ? It tells you that the GEOS python
> bindings  are unsupported and suggests you to become a maintainer
> or to use Shapely. I think the majority of people did switch to Shapely.
> Still, the MinimumDiameter is missing from the C-API, although present
> at the C++ level, so first step would be to expose it there.
> --strk;
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel

Sorry I didn't read the readme file, my fault.
I use this API: 
https://docs.djangoproject.com/en/dev/ref/contrib/gis/geos/ , created 
using ctypes starting from file /usr/lib/libgeos_c.so.1.
But as you say there is not a MinimumDiameter binding.
With nm tool (I'm on Ubuntu Linux) I've searched for an entry point into 
the shared library file, but it is missing.
It seems to miss in Shapely too 
What do you mean to expose MinimumDIameter at C-API level?
Is not easier for my specific case to reimplement MinimumDiameter in 
Python using GeoDjango and Shapely functions?

More information about the geos-devel mailing list