[Jts-topo-suite-user] Fwd: [Lin.ear th.inking] New comment on Single-Sided Buffers in JTS.
Brought to you by:
dr_jts
From: Martin D. <mtn...@gm...> - 2010-11-19 19:42:37
|
[Copying this to the list] In fact my original goal was to develop an offset line algorithm, but it turned out to be quite tricky to implement. The single-sided buffer turned out to be easier to implement (at least in the current limited form), so that's why it got done so quickly. I'm still thinking about doing offset lines, though. GEOS has an implementation of this, which I might try copying. I think it still has limitations, though. One thing the GEOS algorithm definitely doesn't do is to create self-intersecting lines. I think I understand why you want this, but I'm not sure if it's truly possible to do this in a consistent way. More thought required! Actually, if the goal is not to obtain the offset line directly, but to use it to create labels or add symbols, a more effective and efficient technique might be to generate a sequence of offset points along the line. This will have lower requirements for appearance, which should make it faster and more feasible to code. Mind you, I haven't thought this through very hard, so there may be some reason why this won't actually work. ---------- Forwarded message ---------- From: Andrea Aime <nor...@bl...> Date: Thu, Nov 18, 2010 at 5:58 AM Subject: [Lin.ear th.inking] New comment on Single-Sided Buffers in JTS. Hey interesting! Actually, I was looking into doing something similar: offset lines. However an offset line would have to be allowed to intersect itself. Applications would be various: - apply a repeating symbol on one side of a given line (common in certain type of cartography, e.g., depicting fault lines) - label along a line with perpendicular offset Would it be hard to derive a "offset line" algorithm from your "single side buffer" one? |