Transfer and sort values from different rows with geo-coordinates one below the other into a new column.

Hi @USCHUKN1ME

That is exactly what my proposed workflow did since the beginning. It’s just that it’s done on different data that I created since you had not provided any data at that time. If you plug your given data in my workflow, you will get the results that you wanted:
Input:

Results:
image

The 2 additional Rule Engine was to show you 2 things:

  1. How to properly achieve what you were trying to achieve with replace($Coordinate#1$,"?",substr($Coordinate#3$,0 ) )
  2. Move Coordinate#3 and Coordinate#4 to Coordinate#1 and Coordinate#2 respectively so you don’t have to split your distance calculation (Coordinate#1+2 and Coordinate#3+4)

If you don’t need to address this, you can remove the Rule Engine and the other related nodes:

And you get the same results:
image

As you can see, it can be done via only 2 nodes, the Create Collection and the Ungroup nodes.

Here’s the updated workflow with your data: Move multiple columns into 1 column.knwf (27.8 KB)

1 Like

@victor_palacios

One Question:
What is the reason that you chose MAXIUM for aggregation in the GROUPBY-Node and not, for example, FIRST ?

@bruno29a

Your solution is very good, because you can intervene here in a targeted way. The assignment (if .then …).
I will also use your solution to see which in the end is the more optimal.

In any case, I helped me a lot. :+1:

First result:

Is actually possible to connect the coordinates in Google Maps O.A. to a route?

Maximum or First is an arbitrary choice if your data allows it. I think I tried First and found an error, but if First works, feel free to use that.

@victor_palacios

With “first” it doesn´t work.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.