Question

distance of points along a line


hey all,

 

 

i think i got a simple question for you guys,

 

i have a single line in a DWG that represents the centre of a road, 

 

i also some point features that we have surveyed, which are offset from the line (not direcly on the line)

 

 

my question is how can i measure of the distance from the start of the line untill each point feature?

 

i have tried using AnchoredSnapper to "snap" the points to the line but then i can`t mearure the distance,

 

 

any help would be great

 

many thanks in advance!

4 replies

Badge +3
Hi,

 

 

First you need to relate the group of points to the line if you have not done so yet. The points would get ie the line_ID as an attribute.

 

If you need the distance to point on the line. You can use snapper (wich you did) or neighbourfinder with insert vertex.

 

 

The you can use several methods to aquire the distance to start point.

 

 

1. you can use aggregator.

 

2. you can use topologybuilding.

 

3. measures transformers.

 

4. simply merging all points to startpoint. Using a FeatureMErge with requestor=suplier=1. Extract coordinates and use Pythagoras to calculate distance.

 

5. you can also use a neighbourfinder, with the startpoint of the line as candidate (extract sartpoint with coordextractor=0) and points as Bases, grouped by Line_ID (wich the points laso should have).

 

Distance is then a outputattirubte of the neighbourfinder.

 

6. listbuilders, and again expressionevaluator to go Phytagoras. Agina grouped by line_ID etc.

 

 

If you need the distance to point on the line. You can use snapper or neighbourfinder with insert vertex.

 

Then use snipper to snip lengths startpoint to point1, startpoint to point2 etc.

 

This can be done iteratively or using a cloner.

 

These snipping techniques are described in this forum in several cases (search for iterative snipper)

 

(maybe it is a transformer(option) in fme2015 yet? im still on 2014version..)

 

 

 
Userlevel 2
Badge +17
Hi,

 

 

If you are using FME 2015.1, you can use  PointOnLineOverlayer and MeasureGenerator/Extractor to do that.

 

Add measure dimension to the line by a MeasureGenerator.

 

Send the points and the line to a PointOnLineOverlayer. In FME 2015.1, the measure will be transfered from the line to intersected points.

 

You can then extract the measure value of each point as an attribute value using a MeasureExtractor.

 

 

Takashi
Badge
Hi,

 

 

1.Extrator the points coordinate.

 

2.FeatureMerger to attach the coords to the line feature(use list).

 

3.ListExploder the line's list attribute.

 

4.LengthToPointCalculator.
Badge +5
Just a follow up question: what if my line is a polyline with multi parts and I want to measure based on junction points along the line starting from a single source point feature. All parts flow away from the source already.

Reply