Skip to content

Remove Duplicates – GriddedDataConcatenate #172

Answered by sestras
grkal asked this question in Q&A
Discussion options

You must be logged in to vote

Hello Grigorios,

Removing duplicates is implemented by sorting all points and then removing identical subsequent points. Therefore, whenever you use keepFirst or keepLast, the concatenated points are sorted, no matter if you set sortPoints to yes or no.

You can check the code here:

if(sortPoints || (keep != KEEPALL))
{
logStatus<<"sort points"<<Log::endl;
grid.sort();
}
// =====================================================
// eliminate duplicates
// --------------------
if(keep != KEEPALL)
{
logStatus<<"eliminate duplicates"<<…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@grkal
Comment options

Answer selected by grkal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants