On Jan 21, 2010, at 5:35 PM, Patrick Hartling wrote: > Howard Butler wrote: >> On Jan 21, 2010, at 9:30 AM, Patrick Hartling wrote: >> >>> We have run into a strange problem with the is_empty property on >>> Shapely >>> goemetry objects failing on Linux. We are using r1485 from the >>> Shapely 1.2 >>> branch with GEOS 3.1.1 and Python 2.6.2 on 64-bit Ubuntu Linux >>> 9.04. The >>> code below demonstrates the problem: >>> >>> import shapely.geometry >>> assert shapely.geometry.Point(1,1).is_empty == False >> >> What about this? Maybe the chaining is causing the reference to go >> bad. >> >> p = shapely.geometry.Point(1,1) >> p.is_empty > > The result is the same in that case: is_empty still returns False. > > -Patrick
An "empty" geometry is an odd beast. Not quite the same as None, it's a reflection of whether the geometry has coordinates or a sequence of coordinates. A Point with x and y values set is definitely not empty. The following is correct: >>> from shapely.geometry import Point >>> p = Point(0, 0) >>> p.is_empty False Thanks for trying the code, Patrick. I'm going to try to make a second alpha release of 1.2 tonight or tomorrow and will notify this list. Cheers, -- Sean _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
