Boost logo

Geometry :

Subject: [ggl] incorrect result for an intersection
From: Barend Gehrels (barend)
Date: 2011-04-16 20:00:25

On 17-4-2011 1:13, 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).
> That said, I wouldn't be surprised if some of these dbs based
> solutions actually use GPC in some manner. :)

PostGIS uses GEOS, so no, it does not use GPC.
About SQL Server Spatial, I cannot look inside but I'm quite sure they
do not use GPC for their boolean operations (because much faster).

Regards, Barend

Geometry list run by mateusz at