Hi,

The error message reports that one of your input geometries was  
invalid, meaning that it is self-intersecting or otherwise "invalid"  
to the GEOS algorithms. I'm pretty sure that GEOS (and Shapely) will  
not return an invalid geometry, and if it did it would be a bug.

Sean

On Aug 30, 2009, at 3:20 AM, zhongshq wrote:

>
> I use MultiPolygon to execute polygons boolean operation in Python  
> by Shapely
> 1.0.12.
>
> multipolygon1 = MultiPolygon(....)
> multipolygon2 = MultiPolygon(....)
>
> multipolygon3 = multipolygon1.intersection(multipolygon2)
>
> python return the following information:
>
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File
> "/export/eda/edatools/linux/tools/lib/python2.6/site-packages/ 
> Shapely-1.0.12-py2.6.egg/shapely/topology.py",
> line 24, in __call__
>    "The operation '%s' produced a null geometry. Likely cause is  
> invalidity
> of the geometry %s" % (self.fn.__name__, repr(context))
> shapely.geos.TopologicalError: The operation 'GEOSIntersection'  
> produced a
> null geometry. Likely cause is invalidity of the geometry
> <shapely.geometry.multipolygon.MultiPolygon object at 0x10d6c050>
>
> I guess in the operation (intersection), it generated invalid  
> polygon, so it
> can't finish the operation. But before executing the operation, how  
> can I
> know it will generate illegal polygon?
>
> Thanks
>
> -- 
> View this message in context: 
> http://www.nabble.com/issue-of-MultiPolygon-operation-in-Shapely-1.0.12-tp25167247p25167247.html
> Sent from the PrimaGIS mailing list archive at Nabble.com.
>
> _______________________________________________
> Community mailing list
> [email protected]
> http://lists.gispython.org/mailman/listinfo/community

--
Sean

_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to