Questions tagged [space-filling-curve]

24 questions
1
vote
1 answer

How to create a generator with recursion?

Algorithm from Hacker's Delight 2nd Edition Ported to python A simple Hilbert curve class. class Hilbert(): def __init__(self,order=1): self.x = -1 self.y = 0 self._step(0) …
James
  • 21
  • 1
1
vote
1 answer

Can we solve the shortest-path with a space filling curve?

I wonder if we can solve the shortest-path with a space filling curve or is there a better solution? How good would be the approximation compared to an exact solver? The graph doesn't need to satisfy the triangle inequality.
Micromega
  • 12,486
  • 7
  • 35
  • 72
0
votes
0 answers

How to find the neighbours around a Hilbert Curve cell

I have a pandas dataframe with timestamp, latitude and longitude, and I have added the Hilbert Curve index using HilbertCurve from the hilbertcurve package. My dataframe looks like this: import pandas as pd df = pd.DataFrame({'time':['2019-10-19…
0
votes
1 answer

Plotting Moore Curve in Python

I'm trying to plot a Moore curve (https://en.wikipedia.org/wiki/Moore_curve) in python. I've gotten as far as plotting a Hillbert curve, as there seems to be more resources on Hillbert vs Moore, but it's not clear to me how to edit the subsequent…
aj_black
  • 31
  • 6
0
votes
0 answers

How to calculate the Snake Index in N dimensions?

I have written the following code in c# where it calculates the Snake index of a 2-dimensional point. public static uint SnakeCurveIndex(uint bits, uint x, uint y ) { uint index = 0; //The dimension of the array uint…
0
votes
2 answers

Range search with Hilbert Curve Index

I have a hilbert curve index based on this algorithm. I take two to four values (latitude, longitude, time in unix format and an id code) and create a 1-d hilbert curve. I'm looking for a way to use this data to create a bounding box query (i.e.…
0
votes
1 answer

How to implement Hilbert Curve in JFrame

I am trying to make a project based on Hilbert Curve. I was able to use the code in Applet, but I need it to work in JFrame, because I will be needing to open more than 1 frame at once to present my project. I have the code in applet below, but I…
0
votes
2 answers

Reshape from flattened indices in Python

I have an image of size M*N whose pixels coordinates has been flattened to a 1D array according to a space-filling curve (i.e. not a classical rasterization where I could have used reshape). I thus process my 1D array (flattened image) and I then…
floflo29
  • 2,261
  • 2
  • 22
  • 45
0
votes
1 answer

When calculating Z Order, how does one implement BIGMIN and LITMAX for more than 2 dimensions?

I'm writing a UB Tree for fun using a Z Order Curve. It is currently capable of storing points in any number of dimensions and when queried it performs a naive search between two Z Indexes, filtering and discarding any false positives. I would like…
zslayton
  • 51,416
  • 9
  • 35
  • 50
1
2