Constructing an offset point from a line is straightforward. Use LengthIndexedLine.extractPoint(index, offset) - for your example, this would look like: extractPoint(0.25, 10)

Currently there's no way to compute an offset linestring. This would be a nice feature to have, alright. There's some complexity involved in implementing it for the general case, which is one reason I haven't tackled this yet.

Jeff Adams wrote:
My apologies if this has already been discussed, but I couldn't find a way to search the archive.

I need to construct, at a minimum, a single point offset to one side (right or left) of an input line, given a % distance along the line (I.E. 25% from the start point, 10 feet offset to the left).

It would also work for my purposes to construct an entire matching line offset to the right or left, which might be a more generically useful thing to do.

Is there a way to do this using JTS (well, technically I'm using NTS)? The closest thing I could find was the OffsetCurveBuilder, but that produces points offset around all sides. I can hack up the source code to just do what I want, but it seems like this is something that might/should be possible using the normal interfaces?

Thanks,
Jeff
------------------------------------------------------------------------

_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to