[geos-devel] Re: TopologyException makes GEOS/JTS very difficult
to employ in my production environments...
giohappy at gmail.com
Wed Sep 29 11:16:58 EDT 2010
> Pre-empting Martin: your multipolygon is invalid.
Thanks Paul, I've learned something I didn't know... I thought that a
MP where two polygons touch on a vertice was valid.
>From SFS Specifications (par. 2.1.12):
"The Boundaries of any 2 Polygons that are elements of a MultiPolygon
may not ‘cross’ and may touch
at only a finite number of points"
JTS tells me that I have a self-intersection, but visually I only see
two vertices touchin at 1664458.5096082322,1664458.5096082322
> 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
Well, I don't have 100.000, neither my company. I will keep
TopologyExcpetions here and there :)
> 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...
>> geos-devel mailing list
>> geos-devel at lists.osgeo.org
> geos-devel mailing list
> geos-devel at lists.osgeo.org
More information about the geos-devel