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,
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
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:
If you're creating the feature class with FME, be sure to enable the option on the writer:
This worked well, thanks @david_r. I was not seeing these options before since I was using an Open API writer.
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.