-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[filter] Revert Morton #1786
[filter] Revert Morton #1786
Conversation
@pblottiere Can you tweak the docs to include this picture and a section about what the option does with links to LOPoCS? https://github.com/PDAL/PDAL/blob/master/doc/stages/filters.mortonorder.rst |
I'm thinking that it would be nice if the original code could be modified to fit this model: don't have a special sort for the map, but return an integer that represents the order. This would eliminate duplicate code. I could do this as a second pass, I guess. |
Also, is there some documentation that explains the math/logic of this ordering? "Revert morton" doesn't mean anything to me. I didn't find anything Googling, either. |
I think maybe the option should be called |
Perhaps it would be better to pass a function to the filter that would allow one to generate an index based on a coordinate? We could build-in the current and proposed ordering. Maybe this is a to-do. |
Done. |
I didn't want to update the original code but I may propose a commit to clean duplicate code if you want? |
Exactly. But I'm sure that @Remi-C will be happy to talk to you about it if you want more information :). |
My only concern is that Morton-ordering implies a scheme for ordering 2-D points in 1-D while preserving locality to some extent. Unless I'm mistaken, this algorithm isn't attempting to preserve locality. Perhaps this is a naming issue and nothing more. |
Hi,
This PR adds a new option for the MortonOrder filter:
revert
. If this option is true, then the indexing is made according to a revert Morton code. It allows to have a good spatialisation.For example, with a pipeline Splitter -> Revert Morton, we may successively select N representative points of a patch:
We are using this filter in LOPoCS with the pgpointcloud writer. BTW: Oslandia/lopocs#23.
Let me know what you think about it and if I have to update something.