Hi Jukka, jump developpers,
I compared OJ OffsetCurve plugin results and Spatialite results (from Jukka). and just understood why this function is not yet implemented in JTS :-( Here are two "simple" cases. In red, the original linestrings, and in green the rough offset curves as computed by JTS Light green areas represent the buffer computed by JTS with the same parameters. Right figure is the more "simple" : "inside" segments can be eliminated and both spatial lite and OJ can return a line following the buffer's boundary and keep the initial orientation. Left figure currently gives different results in OJ and in spatial lite. I did not test this particular case in spatial lite, but I thing spatial lite work segment by segment and tends to produce disconnected linestrings while OJ currently returns no result because the line is inside the buffer. ![]() Don't know yet what is the best way to solve these cases. I would recommand to simplify the input linestring. Maybe it would be useful to simplify automatically the line with a special simplifier simplifying only concave angles (depending on the offset sign) in the cases where the intersection of the perpendiculars is too far compared with offset distance. ![]() Michaël Le 14/08/2012 22:48, Rahkonen Jukka a écrit : Hi Michaël,Thanks for the test. I also get multi geometries in OJ and some weird results I have to analyze. My first impression is that SpatialLite cleans self-intersection a bit too much (getting disconnected multilinestring), and I do not clean enough in OpenJUMP (getting sometimes connected multi-linestrings...) This is difficult to adjust and get the exact result as the offset curve itself is an approximation.If am remembering that Alessandro Furieri wrote that Spatialite just calls GEOS.Sorry, I did not activate it in the default-plugin.xml. It is done in r2977 (or addI will have a try some day.As long as the linework contains only nodes of order two, I think you can merge the lines before buffering. If you need a continuous offset line and to keep original attributes, I think it's a bit more complicated but still possible.Perhaps by merging a few linetrings, computing the OffsetCurve and finally doing a split at a marked cutting vertises. For handling something like ocean coastline all linestrings could not be merged at once. Perhaps system could then do some kind of "sliding merge" and compute offsetcurve in pieces. Feels complicated. Somebody might still enjoy OffsetCurvePreserveLayerTopology function. By the way, professor Ari Jolma from Finland has done something interesting with layer algebra http://trac.osgeo.org/gdal/wiki/LayerAlgebra -Jukka Rahkonen- |
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel