Skip to main content
Solved

Sequence of data

  • November 1, 2022
  • 24 replies
  • 66 views

fmesafe.podpora
Contributor
Forum|alt.badge.img+11

Hi. Today's second question, I'm glad that this forum exists :) I'm sending the "example" file in the attachment. I would need advice on a transformer where I could implement a sequence of individual segments. I have an idea, but I don't know how to implement it in WS. StartPoint and EndPOint is one segment. I need to determine the correct order of the segments. To get the correct order, I need to determine the first and last point - the value of the first point must meet the condition of occurrence in "startpoint" and at the same time it must occur only once ( A1 ). If I manage to determine the first segment, I need to further apply that the endpoint value of the first segment ( A2 ) is the starting value ( startpoint ) of the following segment. This way the correct sequence will be connected. Some ideas?

 

Best answer by ebygomm

I know about this error, I will address it in the future. So that's cool, do you think you could send me the edit in FMWT? Thanks a lot

Sorry, I uploaded the wrong file

This one should give you an attribute called List_of_Fixes which should give you what you need

 

Any routes that appear twice in the output have one or more missing segments

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.

24 replies

Forum|alt.badge.img+2
  • 1891 replies
  • November 1, 2022

@fmesafe.podpora​ If your data is literally A1, A2, etc. then Sorter will do it. If the data is actual coordinates then try LineCombiner followed by Chopper (assuming each segment is only two vertices).


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 1, 2022

@fmesafe.podpora​ If your data is literally A1, A2, etc. then Sorter will do it. If the data is actual coordinates then try LineCombiner followed by Chopper (assuming each segment is only two vertices).

In fact, A1, A2 are point names, the designation A1 and A2 is to simplify the example. In reality, A1 represents the WEBCA value and A2 the LISMO value, etc. (point names).


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • November 1, 2022

In fact, A1, A2 are point names, the designation A1 and A2 is to simplify the example. In reality, A1 represents the WEBCA value and A2 the LISMO value, etc. (point names).

So presuming you could have something like A1 - A3, A2-A4, A3-A2

 

I think i asked a very similar question sometime in 2019, struggling to find it though.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • November 1, 2022

If you can assign some numeric values to your start and end points you should be able to use takashi's solution here

https://community.safe.com/s/question/0D54Q000080hKzUSAU/sequence-data-based-on-from-to-values


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • November 1, 2022

So if you want to go from something like this

imageto this

imageWhere each end point is the start point of the subsequent feature, the attached workspace should do this

 


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 189 replies
  • November 3, 2022

FROM YOUR EXAMPLE :

Do you need only one row at the destination FOR A1?

I mean

FIRST POINT, ENDPOINT

A1 , A6


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

If you can assign some numeric values to your start and end points you should be able to use takashi's solution here

https://community.safe.com/s/question/0D54Q000080hKzUSAU/sequence-data-based-on-from-to-values

THank you, I will look at it


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

So if you want to go from something like this

imageto this

imageWhere each end point is the start point of the subsequent feature, the attached workspace should do this

 

Thanks a lot, this looks complicated. I will try to put in WS and see what the result is.


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

FROM YOUR EXAMPLE :

Do you need only one row at the destination FOR A1?

I mean

FIRST POINT, ENDPOINT

A1 , A6

Hi. No, I need all the points that belong to the A1 track - chronologically


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

So if you want to go from something like this

imageto this

imageWhere each end point is the start point of the subsequent feature, the attached workspace should do this

 

Hi. Tried pasting in WS but not working on output. I created the data source that I am finally working with, I'm sorry, I should have created it already in the first query. I am sending in an attachment. I am also sending the final file, this is what the output should look like - there is no resolved chronology here. Could you please look at it again? Thank you very much.


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

Hi. Tried pasting in WS but not working on output. I created the data source that I am finally working with, I'm sorry, I should have created it already in the first query. I am sending in an attachment. I am also sending the final file, this is what the output should look like - there is no resolved chronology here. Could you please look at it again? Thank you very much.

I am also attaching the output. You have to download the whole file, the whole line is not visible in the preview


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 189 replies
  • November 3, 2022

Hi , Just check if this works. or . this is what you are looking for? fmw attached.


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

Hi , Just check if this works. or . this is what you are looking for? fmw attached.

Hi. Thank you for answer. Unfortunately this doesn't work outside of the example where I only have the point name. I posted the real data in the reply above a while ago. But thanks a lot for your time, I appreciate it.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • November 3, 2022

I'm not sure i fully understand the ask, or your expected output. If you look at route A1 in your sample input, is this what you are looking to get?

image


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

So if you want to go from something like this

imageto this

imageWhere each end point is the start point of the subsequent feature, the attached workspace should do this

 

Now I thought of one more thing...the coordinates I can add to the thing, I have them deleted at the moment but they are in the data source, would that help with the problem? In the attachment. After determining the first point according to the conditions at the beginning of the query, it might be possible to define the chronology according to the coordinates - the result should be the flight path. There should not be a case where the plane flies from point A to point C and back to point B


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

The output should look like this - but it must be chronological according to the conditions in the beginning of the query. Individual segments display the correct sequence of points, but only in pairs. I need to determine the order of individual segments so that the correct chronology of points is exported from the segment. I'm sorry if I'm not being precise.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • November 3, 2022

The output should look like this - but it must be chronological according to the conditions in the beginning of the query. Individual segments display the correct sequence of points, but only in pairs. I need to determine the order of individual segments so that the correct chronology of points is exported from the segment. I'm sorry if I'm not being precise.

You will have to explain how BANKO appears second in that list for A1 when it doesn't appear to be the start point for any segment so therefore logically can only be the final end point. equally ?BRY is not the end point for any segment so could only logically be the first start point?


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

You will have to explain how BANKO appears second in that list for A1 when it doesn't appear to be the start point for any segment so therefore logically can only be the final end point. equally ?BRY is not the end point for any segment so could only logically be the first start point?

This is just an example of what the output file should look like, I wrote that the point names are not lined up correctly - that's actually what we're trying to solve. Points are correct: ?BRY ?LUREN DJL LISMO SIROD DINOX SPR SOFIK ODNUP WEBCA BANKO


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • November 3, 2022

So the original suggestion will work fine with a few amendments, you can use your start and end coordinates in the vertex creator, then instead of splitting the list back into paths, you can concatenate the end points and add the start point to get your list of fixes

imageAlthough it does look like you have some duff data in there, e.g. A6 appears to be missing a segment

image


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 189 replies
  • November 3, 2022

Oh, This is easy.

use aggregator transformer Group by ID.

concatenate the attributes(startpointDesignator) you need, while aggregating.

 


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

So the original suggestion will work fine with a few amendments, you can use your start and end coordinates in the vertex creator, then instead of splitting the list back into paths, you can concatenate the end points and add the start point to get your list of fixes

imageAlthough it does look like you have some duff data in there, e.g. A6 appears to be missing a segment

image

I know about this error, I will address it in the future. So that's cool, do you think you could send me the edit in FMWT? Thanks a lot


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

I know about this error, I will address it in the future. So that's cool, do you think you could send me the edit in FMWT? Thanks a lot

It looks like it works, that would be great. I'll think about the logic tomorrow, I'd like to understand how you arrived at this result. One last cosmetic question, how can I achieve such a modified output, see the attachment? I need data in one line under one track - the image in the attachment is just to show the data output, the points are not sequentially arranged.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • Best Answer
  • November 3, 2022

I know about this error, I will address it in the future. So that's cool, do you think you could send me the edit in FMWT? Thanks a lot

Sorry, I uploaded the wrong file

This one should give you an attribute called List_of_Fixes which should give you what you need

 

Any routes that appear twice in the output have one or more missing segments


fmesafe.podpora
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 136 replies
  • November 3, 2022

I know about this error, I will address it in the future. So that's cool, do you think you could send me the edit in FMWT? Thanks a lot

I know what the missing segments are, I can fix it. Absolutely great. Thank you very much for the advice, this has helped me a lot in my work. I appreciate your help.