Skip to main content
Hi All,

 

    I'm trying my hand with Linear Referencing. I get the general concept but haven't used it before. I've done some reading around but can't seem to find what the solution to what to me seems a fairly obvious use-case.

 

    

 

    I have two input shapefiles. One contains regular lines, the other regular points. There can be many points to a line; each point has an ID number associating it with a specific line.

 

    The points are all "on" their line (although some fail an INTERSECT test; I suspect floating point rounding errors).

 

    

 

    I want to turn this into an LRS dataset. How do I do this?

 

    Suggestions welcome.

 

    Thanks,

 

    Jonathan
You can use Topologybuilder to create one using mentioned inputata, use groupby "ID" (though if they are on their expected lines that might not be needed).

 

Maybe use a neighbourfinder to correct or refer the positions of those not on the line first.

Hi Gio,

 

Thanks for your answer, but I'm not clear how that helps. I've not used the TopologyBuilder before, and doing so now, the result isn't any sort of LRS. I can get a similar output with PointOnLineOverlayer (plus it lets me use a tolerance), but am stuck on where to go from there.

 

 

I suspect NeighbourFinder won't help with the position problem - that's the transformer I used to place them "on" the line in the first place!

 

Thanks,

Jonathan


Well with topologybuilder you build topology between the linenetwork and points.

 

Topologybuilder adds usefull attributes for network (wich pointonareaoverlayer will not do..)

 

 

Then u create "from_to" sets, use Shortestpathfinder, NetworkOrientor,  NetworkConstCalculations etc.-transformers etc.

 

 

Is that not what you wanted to do?

Hi Gio,

 

I don't think that's what I want I'm afraid; that's network stuff. What I want is a simple Linear Referenced line.

 

I can place the points on the line easily enough, the lines don't need to be network aware (I already have that information if I need it anyway), instead I want simply to turn the line into an actual LRS dataset. This continues to elude me.

 

Thanks,

Joanthan


I see,

 

 

You want MeasureSetters,MeasureGenerator, MeasureExtractors.. also Pathsplitter and builder. There are aalso some customs in store for this.

 

 

Hi Jonathan

 

 

This is a common task i'm often doing.

 

 

If the lines normal lines without any set measures, the LRS along the line for a adjacent point can be given by the following:

 

 

1. read in points shp

 

2. read in line shp

 

3. neighborfinder where point is base and line is candidate, set group to be "ID number associating it with a specific line"

 

4. the matched port will give u details about each point and how it matches the line (candidate XY distance angle and so on).

 

5. from the matched port; add a feature merger and connect the points to requestor and connect the lines as supplier, set fetaure merge type to geometry

 

6. from the merged port; add LengthToPointCalculator where u specifu _closest_candidate_x&_y

 

7. now u got all u need to create the LRS

 

 

 

 

will the above solve your problem?

 

 

 

andre

 


Hi

 

 

The suggestion from @andre is pretty good. You have a couple of options, though, depending on your input data. If you have exactly one point per vertex on the lines, an alternative could be to use a ListBuilder on your points with a Group By on the route identifier, then merge the lists onto the lines using a FeatureMerger. You can then use the MeasureSetter to apply the list measures onto the line vertices.

 

 

If you're thinking more in the lines of the CalibrateRoutes-toolbox in ArcGIS, you will unfortunately have to implement it yourself, as there is nothing like it in FME (currently).

 

 

Let us know if you need a starting point.

 

 

David

Reply