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

Can one convert both linestrings to multipoints, do the difference and then convert the result back to a linestring?

Real world use case? One line is a survey traverse with observations at the ends of another linear object.
The survey traverse + observerd linear object is treated as a single linearring for the purpose of adjustment (cf Bowditch).
Then the linear object is extracted by removal of the traverse and the end "tie lines".

I tend to see OGC etc standards are being the products of theoretical minds, while the necessary base for geoprocessing, one could say that their perspective is only one part of the reality. Then you have the situation where they do things that are highly reactionary, following rather than leading.

regards
Simon
On Thu, 11 Oct 2018 08:56:58 +1100, Martin Davis <mtnclimb@xxxxxxxxx> wrote:

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



--
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