[geos-devel] 3.1.0rc1

Paul Ramsey pramsey at opengeo.org
Wed Jan 28 16:46:47 EST 2009


On Wed, Jan 28, 2009 at 1:15 PM, Sean Gillies <sgillies at frii.com> wrote:
> GEOS 3.1.0rc1 is dumping debugging noise from GEOSUnionCascaded, something
> we should fix.

Dumb, dumb. That's because I built it off my sandbox and had some
uncommitted noise. I'll drop rc2 off of a clean tree.

> Dane's shapefile is a bit broken, being a mix of polygons and multipolygons.
> Is that the problem?

No, the input should be built into a single multipolygon, to the
makeup of the original consituents should be submerged.

P

>
> Sean
>
> On Jan 28, 2009, at 1:45 PM, Paul Ramsey wrote:
>
>> Well, I'm seeing the same thing, with a bit more information:
>>
>> aggtest=# select geometrytype(st_union(the_geom)) from tm_world;
>> NOTICE:  TopologyException: found non-noded intersection between
>> 21.8917 -26.6689, 21.9536 -26.6644 and 21.9536 -26.6644, 21.8917
>> -26.6689 21.953 -26.6645
>> server closed the connection unexpectedly
>>        This probably means the server terminated abnormally
>>        before or while processing the request.
>> The connection to the server was lost. Attempting reset: Failed.
>> !> \q
>>
>> The crash is probably the result of bad null/exception handling on my
>> part, but the core problem is that one of the union pairs is failing.
>> Basically ST_Union(geom1, geom2) still isn't 100% robust, so if you
>> find (or create) a pairing that doesn't work, you're SOL.
>>
>> There's a hack approach to this which would probably work "better",
>> but still not 100%, and that would be to catch the exception when it
>> occurs in GEOS, and put the bad pair off to the side everything else
>> is done. Then try to union(finalresult, bad1) and union(finalresult,
>> bad2) in the hopes that the specific problem of union(bad1, bad2)
>> doesn't come up in the union with the finalresult.
>>
>> I'm going to wrap this data into a MULTIPOLYGON for Hartmut to run,
>> which should allow him to extract the bad pairing, which we can then
>> give to Martin and see if JTS also dislikes it.
>>
>> P.
>>
>> On Wed, Jan 28, 2009 at 11:54 AM, Dane Springmeyer <blake at hailmail.net>
>> wrote:
>>>
>>> Hi Paul and Hartmut,
>>>
>>> Sean wisely mentioned I should be careful in testing shapefiles with
>>> invalid
>>> polygons, which I definitely forgot to think about since I was reading in
>>> the shapefile directly.
>>>
>>> Nevertheless with both this original shapefile [1] (that does have
>>> invalid
>>> polygons) and a cleaned up version (with the buffer(0) trick) that I have
>>> posted here [2], the below script results in the "should never be
>>> reached"
>>> assertion.
>>>
>>> Perhaps the cleaned up shapefile [2] is still invalid for passing
>>> directly
>>> to the cascaded_union,  just let me know how to test further.
>>>
>>> Cheers,
>>>
>>> Dane
>>>
>>>
>>> [1] http://thematicmapping.org/downloads/TM_WORLD_BORDERS-0.3.zip
>>> [2] http://dbsgeo.com/tmp/test_world_shapefile.zip
>>>
>>>
>>> ### python ###
>>>
>>> from shapely.ops import cascaded_union
>>> from osgeo import ogr
>>> from shapely.wkb import loads
>>>
>>> ds = ogr.Open('tm_world_buffer_zero.shp')
>>> state = ds.GetLayer(0)
>>> states = []
>>> while 1:
>>>  f = state.GetNextFeature()
>>>  if f is None: break
>>>  g = f.geometry()
>>>  states.append(loads(g.ExportToWkb()))
>>>
>>> print len(states) # 246
>>>
>>> u = cascaded_union(states)
>>> [....snip...]
>>> cxx type MultiPolygon
>>> cxx type Polygon
>>> cxx type Polygon
>>> cxx type Polygon
>>> cxx type Polygon
>>> cxx type MultiPolygon
>>> cxx type MultiPolygon
>>> cxx type MultiPolygon
>>> cxx type MultiPolygon
>>> Assertion failed: (!"should never be reached"), function itemsTree, file
>>> AbstractSTRtree.cpp, line 358.
>>> Abort trap
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Jan 28, 2009, at 10:33 AM, Paul Ramsey wrote:
>>>
>>>> Dane, can you provide the shapefile? I will see if this reproduces in
>>>> PostGIS and generate a test file for Hartmut if it does.
>>>>
>>>> P.
>>>>
>>>> On Tue, Jan 27, 2009 at 9:40 PM, Dane Springmeyer <blake at hailmail.net>
>>>> wrote:
>>>>>
>>>>> Hi again,
>>>>>
>>>>> I just did a bit further testing of the new cascaded union goodness via
>>>>> Shapely. See the linked email below:
>>>>> http://lists.gispython.org/pipermail/community/2009-January/001960.html
>>>>>
>>>>> Seems that I reached where a point that 'should never be reached' ?
>>>>>
>>>>>
>>>>> http://trac.osgeo.org/geos/browser/trunk/source/index/strtree/AbstractSTRtree.cpp#L358
>>>>>
>>>>> I am new to looking at the geos code, so any pointers to help me test
>>>>> more
>>>>> would be great.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Dane
>>>>>
>>>>>
>>>>> On Jan 27, 2009, at 9:02 PM, Dane Springmeyer wrote:
>>>>>
>>>>>> Paul,
>>>>>>
>>>>>> I tested on mac 10.5 and ubuntu 8.10 and all configure;make and make
>>>>>> installs went perfectly.
>>>>>>
>>>>>> Just a few compiler warnings that I've pasted here:
>>>>>> http://dpaste.com/hold/113736/
>>>>>>
>>>>>> Dane
>>>>>>
>>>>>> On Jan 27, 2009, at 10:35 AM, Paul Ramsey wrote:
>>>>>>
>>>>>>> This is a pre-warning to PSC members to download and test the first
>>>>>>> 3.1 rc tarball:
>>>>>>>
>>>>>>> http://download.osgeo.org/geos/geos-3.1.0rc1.tar.bz2
>>>>>>>
>>>>>>> If I don't hear any howls of dismay over the next 24 hours, I will
>>>>>>> make a wider announcement for testing.
>>>>>>>
>>>>>>> Paul
>>>>>>> _______________________________________________
>>>>>>> geos-devel mailing list
>>>>>>> geos-devel at lists.osgeo.org
>>>>>>> http://lists.osgeo.org/mailman/listinfo/geos-devel
>>>>>>
>>>>>> _______________________________________________
>>>>>> geos-devel mailing list
>>>>>> geos-devel at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/geos-devel
>>>>>
>>>>> _______________________________________________
>>>>> geos-devel mailing list
>>>>> geos-devel at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/geos-devel
>>>>>
>>>> _______________________________________________
>>>> geos-devel mailing list
>>>> geos-devel at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/geos-devel
>>>
>>> _______________________________________________
>>> geos-devel mailing list
>>> geos-devel at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/geos-devel
>>>
>> _______________________________________________
>> geos-devel mailing list
>> geos-devel at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geos-devel
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>


More information about the geos-devel mailing list