Questions tagged [boost-geometry]

Boost.Geometry is a template C++ library, included in Boost. It contains geometry classes (such as point, linestring, polygon) and functions (such as distance, intersection, union). Boost.Geometry is Concept based and users can use their own models of e.g. point.

Boost.Geometry (aka Generic Geometry Library, GGL), part of collection of the Boost C++ Libraries, defines concepts, primitives and algorithms for solving geometry problems.

Boost.Geometry contains a dimension-agnostic, coordinate-system-agnostic and scalable kernel, based on concepts, meta-functions and tag dispatching. On top of that kernel, algorithms are built: area, length, perimeter, centroid, convex hull, intersection (clipping), within (point in polygon), distance, envelope (bounding box), simplify, transform, and much more. The library supports high precision arithmetic numbers, such as ttmath.

Boost.Geometry contains instantiable geometry classes, but library users can also use their own. Using registration macros or traits classes their geometries can be adapted to fulfill Boost.Geometry concepts.

Boost.Geometry might be used in all domains where geometry plays a role: mapping and GIS, game development, computer graphics and widgets, robotics, astronomy and more. The core is designed to be as generic as possible and support those domains. Currently, the development has been mostly GIS-oriented.

More information on the Documentation.

Download from Boost download page.

Source code is also available at GitHub.

Contact developers at the Boost.Geometry mailing list or Boost-users mailing list.

348 questions
0
votes
1 answer

Is the boost DE-9-IM struct usable

I want to use the de9im to speed up a call to point within a a polygon, where the polygon may be used many times. I know that de9im has this functionality but I can't seem to figure out how the class in boost even works…
aaronman
  • 17,266
  • 6
  • 57
  • 78
0
votes
1 answer

Boost Geometry: legacy objects adaptation

SYSTEM: CentOS-5 with gcc-4.7.2 and boost-v1.54 PROBLEM: I try to adapt legacy (custom) objects for use with boost::geometry. More specifically I want to use boost geometry transformations and I follow this guide's code. My objects are slightly…
Dimitris Dakopoulos
  • 563
  • 1
  • 4
  • 16
0
votes
1 answer

Failing to use boost::geometry::model::polygon

I'm trying to use boost::geometry::model:polygon and i just can't make it work, i also found out there something else inside : #include called polygon_2d i don't know which one i need and how to use it. i tried to…
OopsUser
  • 4,258
  • 6
  • 37
  • 59
0
votes
2 answers

Determine if point is inside boost::geometry::linear_ring accounting orientation

I want to determine if point is inside polygon with boost::geometry. I use function boost::geometry::within and type boost::geometry::linear_ring to specify contour. All work fine if I don't need to account orientation of…
sergtk
  • 9,884
  • 13
  • 69
  • 122
0
votes
2 answers

How do i find the touching length of 2 polygons in boost::geometry?

I have a number of polygons in boost::geometry and want to find the specific neighbor from one polygon who has the longest common border with the first polygon. The polygons exactly touch each other so boost::geometry::disjoint returns false, but…
RED SOFT ADAIR
  • 11,294
  • 10
  • 48
  • 83
0
votes
2 answers

Boost::geometry::intersection performance in Debug mode

I have a question about boost::geometry::intersection performance in Debug configuration. One part of my project has a lot(millions) of intersections of polygon-polygon kind. And it is very-very slow in debug comparing to release. So I need to wait…
alxand
  • 3
  • 1
0
votes
1 answer

Boost geometry: composing polygons from many points

I'm coding a physical simulation and after having done the dynamical parts I would like to use some geometric tools to analyze my system. These interesting parts are several clusters of points forming different closed loops (or polygons). The way I…
Liam
  • 553
  • 3
  • 14
0
votes
1 answer

How to extract the points of the a referring_segment in Boost library

I have polygon in Boost , I am trying to extract the segments of the polygon and then save the points that are used to create the segment . I am using Boost library in c++. How can I do that ? typedef boost::tuple point; typedef…
web2dev
  • 547
  • 9
  • 28
0
votes
2 answers

Compilation error when templating my class on coordinate type and using Boost Geometry library

I'm writing a library code on top of Boost Geometry library. My class should be templated on the coordinate type (usually int/float/double etc.). The code below (stripped down to bare minimum) doesn't compile and I get a compilation error that…
Gurthar
  • 23
  • 3
0
votes
2 answers

Find all linesegments=edges within a certain distance to a point in a graph, how to combine boost-graph with boost-geometry?

I have a set of user paths (2 dim) in a game setup that are modelled as a set of lines (arcs) and waypoints = vertices. The whole set of paths can be seen as a graph where the edges are line segments that have additional properties like length,…
spinxz
  • 381
  • 2
  • 13
0
votes
1 answer

boost geometry point setter and getter

I'm working with the boost geometry library and i have read in the documentation that i should prefer using boost::geometry::set<0>(point1, 1.0); instead of point1.set<0>(1.0); Same with the get method: bg::get<0>(point1) instead of…
Felix
  • 1,830
  • 12
  • 18
0
votes
1 answer

Intersection_inserter was not declared in this scope

I am trying to calculate the overlap area between two ellipses. I am approximating the ellipses with polygons now and I have found an example that apparently used an old version of Boost.Geometry, as per this answer. From the second answer to this…
Dima1982
  • 179
  • 2
  • 17
0
votes
1 answer

Boost geometry: point on track

I have two points A and B on a sphere (or a WGS84 ellipsoid, if using the geographic extension). These two points define a great circle. I wish to find the coordinates of a point M on that great circle, lying at a certain distance from A (going from…
Deimos
  • 1,575
  • 1
  • 13
  • 15
0
votes
2 answers

Split geometry using Boost Library

Is there any way to perform split operation on a geometry using Boost library?
0
votes
1 answer

Boost geometry intersection_inserter does not work

I am using boost geometry library C++. The code works well in the old version of Eclipse (which is installed from pythonxy). Now I install latest version of eclipse and Mingw (x86_64-w64-mingw32). the errors appear at the function…
Jun
  • 379
  • 1
  • 4
  • 12
1 2 3
23
24