Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jts-dev] Parallel Offset!

A classic J shaped linestring.

Line from which another line is to be subtracted.
 LINESTRING (548831.667 3956474.449, 548832.593 3956429.519, 548833.519 3956408.676, 548827.498 3956391.074, 548812.213 3956381.347, 548797.854 3956385.053, 548804.338 3956402.191, 548818.697 3956406.823, 548833.519 3956408.676)

Line to subtract: 
  LINESTRING (548804.338 3956402.191, 548818.697 3956406.823, 548833.519 3956408.676)",32639);

Result is:

LINESTRING (548831.67 3956474.45, 548832.59 3956429.52, 548827.5 3956391.07, 548812.21 3956381.35, 548797.85 3956385.05)

See also attached image (result is blue).

regards
Simon

On Thu, 11 Oct 2018 15:22:00 +1100, Martin Davis <mtnclimb@xxxxxxxxx> wrote:

Example?

Although yes, if there are intersections that's going to complicate things

On Wed, Oct 10, 2018 at 7:22 PM Simon (SPDBA) Greener <simon@xxxxxxxxxxxx> wrote:
Damm,

After doing all this I realised that iterating over the points of a linestring and simply looking to see if the point is in the second line as multipoint, one looses the ordering so it is possible to remove a point that is not part of the second line (perhaps a crossing poiint).

Simon





--
Regards
Simon
--------------------------------------------------------------------------------------------------------
Spatial Advice & Solutions Architecture
Database Spatial Stored Procedure Designer

Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE FME
Awarded "2011 Oracle Spatial Excellence Award for Education and Research"
A: 39 Cliff View Drive, Allens Rivulet, 7150, Tas, Aust
W: www.spdba.com.au
E: simon@xxxxxxxxxxxx
V: +61 362 396 397
M: +61 418 396 391
GITC Supplier: T1005
Skype: sggreener
Long: 147.20515 (147° 12' 18" E)
Lat: -43.01530 (43° 00' 55" S)
GeoHash: r22em9r98wg
NAC:W80CK 7SWP3

Attachment: 2018-10-11_19-14-31.png
Description: PNG image


Back to the top