Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jts-dev] Remove line from within another line

Ok, understood now.  Can you just remove the first and last points from the output line?  

Although I can see there will be (possibly common) situations where it's not that easy to determine this.  What might have to be done is to remove the endpoints only if they are identical to an endpoint of the subtracted line.

Not too hard to code this up, I think.  It's the first time I've come across this requirement - which makes me think it perhaps won't become a core function in JTS.  

What is the real world use case?

On Wed, Oct 10, 2018 at 2:50 PM Simon (SPDBA) Greener <simon@xxxxxxxxxxxx> wrote:
Martin,

Forgot image.

I don't see what other result would be expected?

There are situations where I don't want the end points of the line to appear in the output.

Difference removes the interiors of the line but not its boundaries. 

Now I expect that this is the "correct" result from the point of view of the standard, but that is not what I want.

The yellow line in the attached image is what I am after.

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

Back to the top