Skip to main content

Hello.

I have a large road network with some basic attributes like ROAD NAME, ROAD TYPE, LENGTH. Each road has been segmented but these segments are wrong for the new schema. I have successfully (mostly!) joined these line segments in preparation for creating the new segments with new attributes/values.

What I really need help on is: how to segment these roads individually based on the To/From distance values I have in an excel file, which is the basis of the new schema for whole road network. Whole bunch of new attributes and their values here too.

I've read up on the SNIPPER and MEASURE SETTER but unsure of how to proceed. Should I be SCHEMA MAPPING or ATTRIBUTE CREATING first prior to creating segments? I would have thought I would need the segments to be made first so the road segments could be matched to the schema where the segment length values are coming from?

Assuming you now have one road linear per ROAD NAME which matches a Road Name in the excel file, I would use a Joiner to attach the To/From distance values. The exact setup of the joiner will depend on the schema of your excel file, ie do you have one row per road, one row per to/from, is the name of the road a section header, or part of the segment row, etc.

 

 

After that you can use the Snipper based on the to-from values. Depending on how the excel is set up, this may require looping or exploding a list.

Thanks JDH!!

The schema of the excel file is such that there is a unique ID column, followed by the ROAD NAME column and then a column each for the TO/FROM values.

So, the road name appears in a row as many times as there is segments in a given road

Would this schema setup work? There's also a unique SEGMENT column to further differentiate the segments per road

I figure this is what you mean by the exploding or looping?

Thanks P


Thanks JDH!!

The schema of the excel file is such that there is a unique ID column, followed by the ROAD NAME column and then a column each for the TO/FROM values.

So, the road name appears in a row as many times as there is segments in a given road

Would this schema setup work? There's also a unique SEGMENT column to further differentiate the segments per road

I figure this is what you mean by the exploding or looping?

Thanks P

If the road network files also have the UniqueID column, then you would use that as the join attribute in the Joiner.

 

 

If the From/To columns are all just named From/To, then they will be imported into FME as From, From00, From01.

 

 

With manipulation you could turn that into a list

 

_segment{0}.Name

 

_segment{0}.From

 

_segment{0}.To

 

_segment{1}.Name

 

_segment{1}.From

 

_segment{1}.To

and explode the list

Then send each copy to the snipper setting the snipper Starting and Ending locations appropriately.


Thanks JDH!!

The schema of the excel file is such that there is a unique ID column, followed by the ROAD NAME column and then a column each for the TO/FROM values.

So, the road name appears in a row as many times as there is segments in a given road

Would this schema setup work? There's also a unique SEGMENT column to further differentiate the segments per road

I figure this is what you mean by the exploding or looping?

Thanks P

Further to this, I have successfully joined unique continuous
polylines to the schema and segmented, so that each segment of each road
has the relevant asset information attached.

My problem now is those roads that are;

Not continuous - Road is broken by a park etc but both sections of road have the same road name.

I've separated these roads from the main workflow using Neighbourfinder grouped by Road Name, inserted a Measuregenerator and then Aggregator, before sending to the Joiner to attach all the segments attributes and TO/FROM values, but of course the Snipper does not accept aggregated features.

Q. Any ideas on a workaround for this?

 


Reply