i got a pretty big String of lat and lon coordinates in brackets. Now i would like to remove every second bracket to reduce the length of the string.
So far i unfortunately couldnt find a solution. Example in the following:
A) → B)
A)
[53.625049437,9.983927646],[53.62505694,9.98394286], [53.625065775,9.983960775],[53.625075446,9.983980385],[53.625035645,9.98389968]
You could do in this order as follows, just using KNIME nodes :
Cell Splitter : Convert your long string into a list, splitting the string by the comma separator as delimiter. Make sure that the resulting format you chose is “List”. This should generate just one extra column.
Ungroup : Ungroup this column. The result should be as many rows as coordinates you have in your initial list.
Math : Calculate whether the row index is odd or even and create a column with this result, i.e. 0s (even) and 1s (odd).
Rule-Base Engine Splitter : Keep only ODD rows (RowId is odd).
GroupBy : Group the remaning rows using GroupBy node and aggregate using “Concatenate” with a comma separator.
If you are happy with this solution, would you mind please to validate my answer ? There is a box to check for this. It will help people to search and reach the “solved solutions” more easily