Skip to main content
Solved

Linear Referencing

  • October 7, 2013
  • 5 replies
  • 251 views

Hi All,

 

 

I have a table with a 'route_ID' and a measure value (like a event table). On the other hand I have a polyline feature classe.  The attribute 'Name' correspond to route_ID from the table. The measure values are points on the lines.

 

Now the measure values changed by a predetermined value (e.g. the point was 10 m and now the point is 10.5m). My Problem, the Polyline feature class is not defined as route form a linear referencing system. And so the table and the Polylines have no relations. I don't no where (which coordinate) my old and new points are.

 

 

Can I build a route feature class with FME? The Basisc should be my polyline Feature Class.

 

I would have assumed a route feature class, how can I creat points (with coordinates) form the table?

 

 

Thanks for your help.

 

 

Debby

Best answer by david_r

Hi,

 

 

a route feature class (in ESRI-speak) is simply a polyline table with M-values at each vertex, so yes, you can create it using FME.

 

 

To apply measures (M-values) to your polyline, use the MeasureSetter. There is also the MeasureInterpolator and the MeasureOrZValueInterpolator in the FME Store that might help if you don't have M-values for all the vertices.

 

 

You will first have to find a way to connect your M-values to each polyline, though.

 

 

If you need to set the M-values for all the vertices of the polyline features, I'd do something like this:

 

 

Measures:

 

- ListBuilder with GroupBy on the Route_ID

 

- ListSorter on the M-values (increasing)

 

 

Polylines:

 

- FeatureMerger with the features containing the measure list (Name = Route_ID)

 

- MeasureSetter, type "whole line"

 

 

Finally, add a MeasureInterpolator, if needed.

 

 

When writing the feature class, make sure that you enable "Contains measures" on the output feature format parameters.

 

 

David
View original
Did this help you find an answer to your question?

5 replies

david_r
Evangelist
  • Best Answer
  • October 7, 2013
Hi,

 

 

a route feature class (in ESRI-speak) is simply a polyline table with M-values at each vertex, so yes, you can create it using FME.

 

 

To apply measures (M-values) to your polyline, use the MeasureSetter. There is also the MeasureInterpolator and the MeasureOrZValueInterpolator in the FME Store that might help if you don't have M-values for all the vertices.

 

 

You will first have to find a way to connect your M-values to each polyline, though.

 

 

If you need to set the M-values for all the vertices of the polyline features, I'd do something like this:

 

 

Measures:

 

- ListBuilder with GroupBy on the Route_ID

 

- ListSorter on the M-values (increasing)

 

 

Polylines:

 

- FeatureMerger with the features containing the measure list (Name = Route_ID)

 

- MeasureSetter, type "whole line"

 

 

Finally, add a MeasureInterpolator, if needed.

 

 

When writing the feature class, make sure that you enable "Contains measures" on the output feature format parameters.

 

 

David

sigbono
Contributor
Forum|alt.badge.img+10
  • Contributor
  • September 6, 2023
david_r wrote:
Hi,

 

 

a route feature class (in ESRI-speak) is simply a polyline table with M-values at each vertex, so yes, you can create it using FME.

 

 

To apply measures (M-values) to your polyline, use the MeasureSetter. There is also the MeasureInterpolator and the MeasureOrZValueInterpolator in the FME Store that might help if you don't have M-values for all the vertices.

 

 

You will first have to find a way to connect your M-values to each polyline, though.

 

 

If you need to set the M-values for all the vertices of the polyline features, I'd do something like this:

 

 

Measures:

 

- ListBuilder with GroupBy on the Route_ID

 

- ListSorter on the M-values (increasing)

 

 

Polylines:

 

- FeatureMerger with the features containing the measure list (Name = Route_ID)

 

- MeasureSetter, type "whole line"

 

 

Finally, add a MeasureInterpolator, if needed.

 

 

When writing the feature class, make sure that you enable "Contains measures" on the output feature format parameters.

 

 

David

Hi @david_r​ ,

 

I know this is a decade old question but I am having difficulty in writing the M values to the shapefile.

 

I have a route with vertices at 1-meter interval. I used MeasureGenerator and is able to see the _measure values for each vertex. However, when writing to a shapefile, I get NaN for the M-value of each vertex while the M-value is totally missing when writing to a feature class in a file geodatabase.

 

Any ideas?

 

Many thanks,

Sig

 

 


david_r
Evangelist
  • September 8, 2023
sigbono wrote:

Hi @david_r​ ,

 

I know this is a decade old question but I am having difficulty in writing the M values to the shapefile.

 

I have a route with vertices at 1-meter interval. I used MeasureGenerator and is able to see the _measure values for each vertex. However, when writing to a shapefile, I get NaN for the M-value of each vertex while the M-value is totally missing when writing to a feature class in a file geodatabase.

 

Any ideas?

 

Many thanks,

Sig

 

 

Not sure about the shape file, but if you're writing to an existing FGDB feature class, make sure that it allows M values:

https://pro.arcgis.com/en/pro-app/latest/help/data/feature-classes/defining-feature-class-properties.htm#GUID-8EE6F702-D419-4624-B28E-01FF08233871

I.e. this must be enabled on the feature class (disabled in the screenshot below), otherwise M values will not be stored:

imageIf you're creating the feature class with FME, be sure to enable the option on the writer:

image


sigbono
Contributor
Forum|alt.badge.img+10
  • Contributor
  • February 12, 2024

This worked well, thanks @david_r. I was not seeing these options before since I was using an Open API writer.


david_r
Evangelist
  • February 12, 2024
sigbono wrote:

This worked well, thanks @david_r. I was not seeing these options before since I was using an Open API writer.

For what it’s worth, the API writer also supports measures, but it’s a bit more obtuse about what it expects from you to trigger this behavior.

See https://docs.safe.com/fme/html/FME-Form-Documentation/FME-ReadersWriters/filegdb/Geometry-Support-filegdb.htm

Notably, I seem to remember that you have to leave the destination measure name empty in the MeasureSetter.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings