libmorton icon indicating copy to clipboard operation
libmorton copied to clipboard

Morton Offsets

Open IJzerbaard opened this issue 5 years ago • 6 comments

It is possible to quickly (that is, without going through a decode-modify-encode pipeline) compute neighbours of a Morton-encoded coordinate. The technique is mentioned on wikipedia.

That could be useful to add, though I realise the description of this library only mentions encoding and decoding.

IJzerbaard avatar May 13 '20 09:05 IJzerbaard

I've been thinking about this, and as you say, it would take the library away from purely encoding/decoding.

Then again, it is useful.

Do a PR if you want to :)

Forceflow avatar May 14 '20 14:05 Forceflow

I think I might add this to a seperate header, morton_ops.h A good thing for the todo list!

Forceflow avatar May 19 '20 01:05 Forceflow

This is indeed very useful; did this get done later? :-) We have some 20+ year old code that uses incremental indexing extensively and it is very inexpensive even in scalar processing mode.

tonyskjellum avatar Jun 01 '23 17:06 tonyskjellum

It's still on the todo list - feel free to write it and make a PR :p

Forceflow avatar Jun 02 '23 00:06 Forceflow

We will start working on that.

tonyskjellum avatar Jun 02 '23 19:06 tonyskjellum