title: Points, Lines, and Polygons on Spheres with C/C++
body: <p>My application is to represent shapes on the Earth's (using a sphere is sufficient) surface. Those can be points, lines, and polygons. Coordinates should be defined by using degrees or radians (just like geographic coordinates).  </p>
  
  <p>A line segment between two points on the surface of sphere should lie on its <a href="http://en.wikipedia.org/wiki/Great_circle" rel="nofollow noreferrer">great circle</a>. Polygons should consist of a collection of the such lines. Furthermore, I would like to perform <a href="http://en.wikipedia.org/wiki/Set_%28mathematics%29#Basic_operations" rel="nofollow noreferrer">Set - Basic Operations</a> like intersection, union, difference, complement on the shapes mentioned. These operations only need to output collections of points.</p>
  
  <p>I tried to figure that out using CGAL's <a href="http://doc.cgal.org/latest/Circular_kernel_3/index.html" rel="nofollow noreferrer">3D Spherical Geometry Kernel</a> and <a href="http://doc.cgal.org/latest/Nef_S2/index.html" rel="nofollow noreferrer">2D Boolean Operations on Nef Polygons Embedded on the Sphere</a>.  Actually, I already had problems with putting a line on the sphere. Additionally CGAL works in the Euclidean Space, which still leaves me with the geometric operations necessary, to work with great circles placed on the sphere.</p>
  
  <p>My question is, if you can assist me in realizing the functionality mentioned in CGAL or if you can recommend another library for C/C++ that does that. Thank you very much!</p>