Posts

Showing posts from June, 2012

Hello Java Topology Suite

Image
There is always a better way, in my case, the better way was to get rid of my crappy implementation and to let others do the work for polygon buffering. And trust me, I tried to patch my simple implementation and next I tried to use the better but still not error-proof JavaGeom one. I ended up using the fine implementation of Java Topology Suite, that worked like a charm (once I managed to understand the subtle details of how things work over there).  So now you can see how the gray color lines are an accurate offset of blue polygons in my software. It did not hurt that JTS is a pure-Java library, so my tool will be multi-platform the easy way. I learned along the process that though SWIG framework does include Java bindings for CGAL library, it does not provide full access to all library functions and, once again, polygon buffer seems to be one of the parts missing. Besides, CGAL install is platform specific (though CGAL is still a terrific library).

Along the process I have learned …