19

I've been recently hired by a GIS company to rewrite their old geomatics libraries. So I'm currently looking for a good computational geometry library. I've seen CGAL, which is amazing, but my boss wants something free.

So I'm now checking Boost.Geometry. This library seems great, but it also seems that it is changing pretty fast. A lot of things are not implemented yet, and a lot of issues are discussed on the mailing list.

Hence my question : is Boost.Geometry mature enough so I can build something on it ? Or is the design still going to evolve ?

Thanks

manlio
  • 16,658
  • 13
  • 67
  • 107
undu
  • 2,001
  • 2
  • 17
  • 27
  • I think that the *design* it's fairly stable when a library get accepted in boost. isn't this true? – CapelliC Mar 27 '12 at 15:07
  • @chac Yes one might think so. But from what I've seen it looks like the authors of this lib think things could be better. At least that's what I understand, maybe I'm wrong. That is why I ask this question. – undu Mar 27 '12 at 15:37
  • In `free` you mean `free as in beer`? CGAL is GPL and thus very `free as in freedom` ;) – pmr Mar 29 '12 at 13:58
  • 2
    @pmr I've seen the GPL licence, but for industrial research use, you have to pay a commercial licence of 5000€ (6635 US $) per year. And this is not free :p (I'm not a native english speaker. Doesn't free also mean "costs no money" ? ) – undu Mar 29 '12 at 14:49
  • @undu It can mean both. Thus the beer/freedom distinction. http://www.gnu.org/philosophy/free-sw.html – pmr Mar 29 '12 at 14:53
  • @pmr ok I get the "free beer" joke now ! ^^ – undu Mar 29 '12 at 15:00

2 Answers2

12

Depending on your needs, you could look at GEOS, which is used by PostGIS for its geometry operations, among others, and is more mature than boost::geometry. However, it is hard to extend, which you will have to do yourself if you want support for more than Simple Features.

Where boost::geometry shines, in my opinion, is its ability to adapt to existing (legacy) libraries, which means that you should be able to keep some of your employer's data structures (or any other existing geometric library), and build upon them with boost::geometry.

Boost::geometry is gaining maturity and extended features pretty fast, but I don't think the design has changed much since last year (when it was accepted into boost). I would ask on the mailing list -- the authors are very active and helpful.

meastp
  • 662
  • 1
  • 7
  • 15
  • thanks for clarification. I've seen GEOS and, as you say, it looks hard to extend. But I'll see what I can do :) – undu Mar 29 '12 at 14:54
  • 1
    If one wants to use a feature that boost::geometry supports with an existing (legacy) geometry library, e.g. read/write WKT-strings or r-tree index, one can just adapt the legacy objects to boost::geometry, instead of needing to create intermediary objects (which is exactly what you have to do with other libraries, such as GEOS, and this costs a lot of memory, and possibly cpu). If you are not bound by legacy objects, this isn't that much of an issue. – meastp Mar 30 '12 at 10:14
0

It depends on your needs.

Boost is one of the most efficient, performant and mature c++ libraries, but when it comes to geometries geos is the best, i tried both of them in a 3D data optimization project.

Boost-Geometry Pros : -Performant -Well designed API

Geos Pros : -Accurate -Mature