[geometry] [polygon] What's the relationship?

Could someone please explain the relationship, if any, betweeen these two libraries? They seem to cover similar domains. Do they interoperate? Is one better than the other for certain kinds of problems? Was Boost.Polygon once called the Geometry Template Library, as suggested by the BoostCon 2009 slides? Boy, that's confusing. Lastly, could we get these libraries' documentation to mention one another and explain the information I'm asking for? Thanks in advance for answering. -- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost

Could someone please explain the relationship, if any, betweeen these two libraries? They seem to cover similar domains. Do they interoperate? Is one better than the other for certain kinds of problems?
This was discussed quite a lot during both reviews. The discussion became quite heated at times and I don't want to fan those flames again. I've been participating in the Geometry mailing list and the two libraries have been peacefully coexisting. I would say that the main difference between the two is a different philosophy towards numerical robustness. Polygon achieves 100% numerical robustess by requiring integer coordinates of the input geometry and applying higher precision arithmetic if necessary and snap rounding. Boost.Geometry generally assumes floating point input coordinates, though there has been quite a few bug fixes delivered recently by Geometry to support integer coordinates. Geometry ignores the rounding of both integer and floating point coordinates, which means that it is possible for it to produce an output that it cannot consume as an input because it does not ensure as a postcondition something that it requires as a precondition. Rounding with integer coordinates is a much bigger issue than with floating point because the error introduced tends to be relatively larger. Initially the Geometry requirements for models of its concepts were not compatible with the data types defined in Polygon, but I understand that to have been changed. The two libraries should interoperate syntactically if the appropriate adaptors are provides, however, the difference between requirements on the coordinate data type is more fundamental. What I've observed about the usage of each library is the users generally want one geometry library or the other but don't want both. Users tend to pick the library that best suites their application requirements. For example, GIS users clearly prefer Geometry while EDA users tend to prefer Polygon. So far no one has seemed particularly confused and I haven't heard any complaints. After Geometry was accepted it was suggested that work on Polygon should cease and the two libraries merged eventually. That isn't really feasible. The existing users of the Polygon API would not want to port their code to the Geometry API and the Geometry algorithms would not satisfy their requirements. We are about to release the Voronoi diagram extension to Polygon as well as a new line segment_concept. Voronoi was designed to allow the core algorithm to be independent of the rest of the library, both to satisfy Google users, who restrict template metaprograming and to make it easily compatible with Boost.Geometry, though the integer input requirement is still there if we are to ensure bounded numerical error. I'm currently working on straight skeleton, which will be coupled both to Voronoi diagram internals for bounded error arithmetic and to the concepts based Polygon interface for line segments. It will also require integer input coordinates. The bottom line is that because Polygon algorithms require integer input coordinates they are not suitable for inclusion in Geometry because it would be very confusing that some algorithms can only be called with integer geometry types while others should only be called with floating point types in the same library. Polygon could benefit from the spatial query tree data structure being developed as a part of Geometry, but I don't think most current users would welcome cross dependencies being formed between the two libraries. My straight skeleton implementation is coming along well. Both vornoi diagram and straight skeleton are very difficult to make numerically robust and I don't expect Geometry to support them with floating point coordinates any time soon. While the two libraries do have substantial overlap, they differ in philosophy and are growing in different directions.
Was Boost.Polygon once called the Geometry Template Library, as suggested by the BoostCon 2009 slides? Boy, that's confusing.
Yes, people felt the name was too general so I changed it to Polygon. Later the name of Barend's library was changed to Geometry.
Lastly, could we get these libraries' documentation to mention one another and explain the information I'm asking for?
I'm reluctant to make statement's about Geometry in my documentation that the Geometry authors might take issue with or that might fall out of date as changes to Geometry are made. While the status is peaceful coexistence and (I believe) mutual respect, we still disagree on technical matters and I don't want to raise tensions. We will be updating the documentation for the release of Voronoi. I'd be happy to include a statement that summarizes the answers to your questions that we can all agree on. Regards, Luke

On 16.09.2012 23:02, Luke Simonson wrote:
Could someone please explain the relationship, if any, betweeen these two libraries? They seem to cover similar domains. Do they interoperate? Is one better than the other for certain kinds of problems?
This was discussed quite a lot during both reviews. The discussion became quite heated at times and I don't want to fan those flames again. I've been participating in the Geometry mailing list and the two libraries have been peacefully coexisting.
[...] Thank you for your explanations. Anyway, is boost.polygon orphaned? Following https://svn.boost.org/trac/boost/query?status=%21closed&component=polygon there are several *new* open bug reports older than 20 months.

Hi Olaf, I didn't know about that bug list. I've just checked the bug list entries and most of the compilation problems where fixed, while I was working on the Voronoi. The library is going to be seriously updated in boost 1.52 (the changes are already merged with the release branch). Andrii ______________________________**_________________ Unsubscribe & other changes: http://lists.boost.org/** mailman/listinfo.cgi/boost<http://lists.boost.org/mailman/listinfo.cgi/boost>

On Mon, Sep 17, 2012 at 10:29 AM, Olaf Peter <ope-devel@gmx.de> wrote:
Thank you for your explanations. Anyway, is boost.polygon orphaned? Following https://svn.boost.org/trac/boost/query?status=%21closed&component=polygon there are several *new* open bug reports older than 20 months.
No, it is not. Trac does not email me when a ticket is opened or the status of a ticket is changed. I have no idea someone has submitted a bug unless they post on the user or dev forumn. When that happens I reply typically within one day. Several of the bugs on record were resolved a long time ago, but I never updated the ticket. I probably haven't looked at the trac in 20 months. I've been doing the job of a half dozen people at work during that time so I never thought to look for more work in the trac with no one prodding me. Andrii and I will clean up the old tickets for Polygon before the 1.52 release. One of the tickets on resizing requires that I complete the straight skeleton implementation I'm currently working on to address properly. Thanks, Luke

On 18 September 2012 01:30, Luke Simonson <simoluk@gmail.com> wrote:
No, it is not. Trac does not email me when a ticket is opened or the status of a ticket is changed.
It should do. Try logging in to Trac, and clicking on 'Preferences' at the top right to see if your email is correctly set. Otherwise ask trac administrators to look into it. If you're too busy to deal with tickets, and someone else is willing to help, maybe you could ask the trac administrators to change the owner in trac? You'd still be listed as the maintainer on the main site and in libs/maintainers.txt.
participants (5)
-
Andrii Sydorchuk
-
Daniel James
-
Dave Abrahams
-
Luke Simonson
-
Olaf Peter