Subject: [ggl] incorrect result for an intersection
From: Simonson, Lucanus J (lucanus.j.simonson)
Date: 2011-04-16 23:27:38
Arash Partow wrote:
> Simonson, Lucanus J wrote:
>>> I'm curious to know why GPC is not used as the gold standard?
>> GPC will happily accept self intersecting polygons and produce
>> garbage output without letting you know the output is bad. Also,
>> GPC is not numerically robust, nor is it even close to the optimal
>> algorithm and would be too slow to use on large inputs even if it
>> were reliable enough to handle them. GPC isn't a gold standard for
>> anything given that it falls short in three significant ways.
> It is very trivial to modified GPC to detect errors, it is also very
> trivial to modify GPC so as to templatize the number type (double) to
> something more reasonable, its also very trivial to upgrade the LMT
> process (specifically the data structures). Most implementations that
> use GPC that I've seen, make these changes. No one doing any real
> work uses GPC as-is from the site (it does require some tweaking).
Is that so? What is something more reasonable? I'm not a big believer in the idea of templating the number type of a non-robust computational geometry algorithm and substituting infinite precision or lazy exact data types. I know it can be done, I'm just not impressed with the results. Does the license they use allow such modification? Does it allow redistribution? What about relicensing? Are these academic uses of GPC?
> That said, I wouldn't be surprised if some of these dbs based
> solutions actually use GPC in some manner. :)
If fixing everything wrong with GPC is trivial than GPC itself is surely trivail. Why would someone with a commerical purpose in mind start with a for profit license encumbered source code like GPC, which is itself trivial?
Geometry list run by mateusz at loskot.net