[geos-devel] Re: TopologyException makes GEOS/JTS very difficult to employ in my production environments...

Paul Ramsey pramsey at opengeo.org
Wed Sep 29 10:44:31 EDT 2010

Pre-empting Martin: your multipolygon is invalid.

However: yes, there are lots of people who do big geoprocessing with
PostGIS who inevitably, in sieving millions of features through the
hopper, find pairs that cause topology exceptions. Would I like that
not to happen: oh yes. Do I have the time and money to fund the
development to conclusively remove those cases? I do not. Let's
randomly say it would take 100,000 euros to put a stake through the
heart of this one and fro all and see if anyone's pain rises to that


On Wed, Sep 29, 2010 at 7:15 AM, G. Allegri <giohappy at gmail.com> wrote:
> Here are the WKB representations of a polygon and a multipolygon which
> cause a TopologyException for ST_Difference:
> Polygon: http://pastebin.com/rWAGMmME
> Multipolygon: http://pastebin.com/sik9jZk2
> 2010/9/29 G. Allegri <giohappy at gmail.com>:
>> Sorry for this strong title, but I would like to open a discussion on
>> this topic. There are already several tickets about TopologyException
>> happening in various contexts, and I now it is not an easy to solve
>> problem. We, in my company, have struggled to circumvent this frequent
>> error, and we put some (few) money to let Sandro (strk) analyze it.
>> The only solutions, at now, have been various workarounds that (not
>> deterministically) work for some cases/datasets, but fail with others.
>> Our first "meet" with this exception was due to GeomUnion operations.
>> Today we face it for ST_Difference op in PostGIS, and this time no
>> workaround is working.
>> I anticipate the critics: put the money on the table and someone could
>> invest time to solve it. Holy words, this is how foss should work. But
>> I'm not the boss of my company, and I've suggested to employ
>> PostGIS->GEOS in a big job... and now I have to solve this issue, with
>> no extra-money.
>>  If this problem cannot be solved I have to abandon PostGIS for one of
>> our production environments, and that would be a pity.
>> So, my reflection is: in a few weeks we have fighted, almost daily,
>> with this error. Are we the only ones to get stuck in it? Have others
>> found consistent,deterministic solutions?
>> I would be gratefull if you can share your experience and thoughts...
>> Giovanni
> _______________________________________________
> 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