Skip to content

clip_roi vs. filter keep_xy #544

Answered by Jean-Romain
wiesehahn asked this question in Q&A
Discussion options

You must be logged in to vote

There is a lot to say here.

First of all you cannot expect the second query to be faster than the first one for the simple reason that internally, lidR already does what is the best and the most efficient. So in the best case you can only be as fast as lidR.

Ok, now the question is, why is it slow as hell?

clip() analyses the bounding box of the query and removes all the files that are not overlapped by the bounding box. In your case it corresponds to maybe one or two files only I guess. Let say two files. The clip() query is consequently performed in 2 files only. You performed the query in 50000 files!

But the collection is spatially indexed! It should be fast?!?

This is correct. Bu…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@wiesehahn
Comment options

@Jean-Romain
Comment options

Comment options

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

Answer selected by wiesehahn
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