Questions tagged [boost-polygon]

The Boost.Polygon library provides algorithms focused on manipulating planar polygon geometry data.

The BOOST Polygon library uses C++-Concepts inspired template programming to provide generic library functions overloaded on concept type. There are currently thirteen concepts in the Polygon library type system. A concept object in the Polygon library is just an empty struct similar to a tag that would be used for tag dispatching.

The Boost.Polygon library provides algorithms focused on manipulating planar polygon geometry data. Specific algorithms provided are the polygon set operations (intersection, union, difference, disjoint-union) and related algorithms such as polygon connectivity graph extraction, offsetting and map-overlay. An example of the disjoint-union (XOR) of figure a and figure b is shown below in figure c. These so-called Boolean algorithms are of significant interest in GIS (Geospatial Information Systems), VLSI CAD as well all other fields of CAD, and many more application areas, and providing them is the primary focus of this library. The Boost.Polygon library is not intended to cover all of computational geometry in its scope, and provides a set of capabilities for working with coordinates, points, intervals and rectangles that are needed to support implementing and interacting with polygon data structures and algorithms.

More Reference Documentation can be found here

55 questions
0
votes
1 answer

boost::polygon::area returns 0

I am seeing strange result from boost::polygon::area. I posted this issue on the Boost GitHub page, but looking for suggestions form the wider SO community. The code below report 0 area for the given polygon. Any suggestions how to work around…
David R.
  • 855
  • 8
  • 17
0
votes
0 answers

use boost::polygon with boost::multiprecision

I'm trying to use boost::polygon with boost::multiprecision to calculate polygon differences but no matter how i try to combine the two, i'm always getting compiler errors like assigning to 'long double' from incompatible type…
jesses
  • 559
  • 3
  • 15
0
votes
0 answers

Triangulating a point set using boost::polygon::voronoi results in overlapping triangles

I'm triangulating a set of 2d points using boost::polygon::voronoi and the code below (found under this question) boost::polygon::voronoi_diagram vd{}; boost::polygon::construct_voronoi(vertices.begin(), vertices.end(), &vd); for…
Viktor Sehr
  • 12,825
  • 5
  • 58
  • 90
0
votes
0 answers

problem with polygon_90_data and vertices

I create a boost polygon with 5 vertices, but when I display the vertices or #include . . . void displayPolygon(boost::polygon::polygon_90_data const& polygon, std::string name) { std::cout << std::endl <<…
0
votes
2 answers

Errors compiling Boost segment_utils.hpp

I would like to use the intersect_segments method of the Boost segment utils, which can be found here: http://www.boost.org/doc/libs/1_59_0/libs/polygon/doc/gtl_segment_concept.htm I also have followed and implemented the code that maps the Point…
Stijn
  • 33
  • 5
0
votes
0 answers

set is not member of boost::PolygonSet

I am trying to overload & operator for PolygonSet but end with following error. I can understand boost::PolygonSet does not have set function but can anyone provide me input to fix this issue. I have tried view_as but did not success. The code: …
user765443
  • 1,856
  • 7
  • 31
  • 56
0
votes
0 answers

Boost/Voronoi - Can't create voronoi_diagram in class, can in function

I'm trying to put this: boost::polygon::voronoi_diagram<> diagram; ... in my class, but I get this error: error C2248: 'boost::polygon::voronoi_diagram::operator =' : cannot access private member declared in class…
George R
  • 3,784
  • 3
  • 34
  • 38
0
votes
2 answers

extract nonconvex hull from result of minkowski sum using boost

http://postimg.org/image/sgl1q3vf5/ http://postimg.org/image/787d8ogy9/ As the pics shown above, I tried to calculate the minkowski sum of a polyline and a circle and the resulting shape covers the area of the polygon Im trying to generate. I use…
david lin
  • 39
  • 6
0
votes
1 answer

Derivative of a polygon

I am studying boost polygon library, however I can not understand how each vertexes are generated, image: http://imm.io/LlIM what is the rules for derivative of a polygon? the original paper…
-1
votes
1 answer

Why is boost multipolygon is rotated upside down?

I have the obtained the WKT string of a boost multipolygon which is constructed by union of boost polygons in a vector called vectorPolygons std::vector vectorPolygons; After adding data in vectorPolygons below code…
Test
  • 564
  • 3
  • 12
1 2 3
4