Skip to main content
Solved

Sorter is not working correctly in 2018.1?

  • August 29, 2019
  • 9 replies
  • 45 views

nicholas
Contributor
Forum|alt.badge.img+14

Hello all,

I am running FME(R) 2018.1.2.1 (20190319 - Build 18592 - WIN64)

I have a dataset of points (along a road) and I want to use the LineBuilder to create lines.

Each point has a ROAD_SECTION_ID (character field) which uniquely identifies the road.

Each point also has a TDIST (numeric field) which is the distance along the road.

I am trying to sort the points appropriately before they go into the LineBuilder. They should be sorted firstly by ROAD_SECTION_ID and secondly by TDIST.

However, the result of the sort is wrong. The features are sorted firstly in ascending order of TDIST, then in descending order of ROAD_SECTION_ID

I have reversed the order in the Sorter, but there is no difference

The outcome is that the LineBuilder does not work like it should

Best answer by nicholas

@danatsafe asked if my Reader was an ESRI file geodatabase, which it was.

I switched my raw data to a different format and my problem was solved.

@danatsafe also recommended I upgrade, but that is not a good solution for me (My workplace is using 2018.1 currently)

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.

9 replies

itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • 1442 replies
  • August 29, 2019

You might want to try the NaturalSorter transformer from the Hub. It offers the possibility to set a group -by which in your case is the ROAD_SECTIO_ID


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • August 29, 2019

@Nicholas

 

Sorting seems ok.

But u expect it to sort with the keys compounded.

In such cases I create a compound sort key.In this case csk is concatenation of the attributes.

 

You can also sort by tdist, aggregate by road_section_id and deaggregate.

Or counter by road_section_id and then use this counter as first sortkey (rather than road_section_id;

you would be replacing a string by a number)


Forum|alt.badge.img
  • 104 replies
  • August 29, 2019

Just to get some more info, what happens if you only sort on ROAD_SECTION_ID ascending? Do you get the expected result below?

10M

 

10M

 

10M

 

10M

 

10N

 

10N

 

10N

 

10N

nicholas
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • 116 replies
  • August 30, 2019

Just to get some more info, what happens if you only sort on ROAD_SECTION_ID ascending? Do you get the expected result below?

10M

 

10M

 

10M

 

10M

 

10N

 

10N

 

10N

 

10N

Yes, I I sort only on ROAD_SECTION_ID (Alphabetic, Ascending) then I do get the expected result as you describe.

Also, if I sort only on TDIST (Numeric, Ascending) then I get a proper result

0

0

0.01

0.01

0.02

0.02

and so on

My problem is when I attempt to sort on two attributes (first by ROAD_SECTION_ID, then by TDIST)


fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • August 30, 2019

Hi @nicholas Are you reading from a geodatabase? If so then this problem with the Sorter was just recently fixed. Please try the latest 2019.2 beta from https://www.safe.com/support/support-resources/fme-downloads/beta/


nicholas
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • 116 replies
  • August 30, 2019

Hi @nicholas Are you reading from a geodatabase? If so then this problem with the Sorter was just recently fixed. Please try the latest 2019.2 beta from https://www.safe.com/support/support-resources/fme-downloads/beta/

Yes, I am reading from a file geodatabase.

I cannot upgrade to 2019.2 I need to maintain version parity with my workplace's FME server.

I will instead experiment with saving my dataset in a different format. Maybe a CSV or oracle database?


fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • August 30, 2019

Yes, I am reading from a file geodatabase.

I cannot upgrade to 2019.2 I need to maintain version parity with my workplace's FME server.

I will instead experiment with saving my dataset in a different format. Maybe a CSV or oracle database?

CSV will work. Let me know if you have trouble with an Oracle database.


nicholas
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • 116 replies
  • August 30, 2019

CSV will work. Let me know if you have trouble with an Oracle database.

CSV did work :-)


nicholas
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • 116 replies
  • Best Answer
  • August 30, 2019

@danatsafe asked if my Reader was an ESRI file geodatabase, which it was.

I switched my raw data to a different format and my problem was solved.

@danatsafe also recommended I upgrade, but that is not a good solution for me (My workplace is using 2018.1 currently)