Question

Extract line segment between two points

  • 22 January 2016
  • 4 replies
  • 11 views

Badge

Hi All

I have a spreadsheet with a start and end point for various road sections, and I'm trying to extract the road segments between the start and end points from another spatial data sets containing the road geometry.

SECTIONFROM LATFROM LONGTO LATTO LONGA-33.942151.158-33.935151.143B-33.927151.159-33.940151.146---------------

For example, for road


4 replies

Userlevel 2
Badge +12

Did you have a look at the ShortestPathFinder transformer. You will need to create a line using start- and endpoint, but you can use the 2DPointConnector to do that.

Badge

Duplicate?

https://knowledge.safe.com/questions/22456/extract-line-segments-between-two-points.html#answer-22459

Badge +3

neighbourfinder to get _closest vertex for the start and ends. (as the points don't seem to coincide with the lines)

Then a snipper using the _closest x and y's.

..just one of multiple way's to do it

Badge

neighbourfinder to get _closest vertex for the start and ends. (as the points don't seem to coincide with the lines)

Then a snipper using the _closest x and y's.

..just one of multiple way's to do it

But then you would need 2 LengthToPointCalculator using the closestBasex/y for each of the 2 points along the line. Effectively you need a"from / to"distance for your snipper.

Reply