Skip to main content
Question

Linear Referencing two regular shapefiles

  • February 4, 2015
  • 7 replies
  • 35 views

Forum|alt.badge.img
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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 4, 2015
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.

Forum|alt.badge.img
  • Author
  • February 4, 2015

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


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 4, 2015
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?

Forum|alt.badge.img
  • Author
  • February 5, 2015

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


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 5, 2015
I see,

 

 

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

 

 

Forum|alt.badge.img
  • November 4, 2015

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

 


david_r
Celebrity
  • November 4, 2015
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