Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Interleaving strings -How? Re:(2)

From: webdev:accglobal at: 22-Sep-2000 12:10

Dear Andrew, At present there is no software (at least not in my possession). It is currently "dreamware". The question is whether Rebol can do it in a scalable distributed fashion.Terra Server uses this method to store locations in their database. It is called a "Z" transform. There is no loss of information during the transform. The transform actually introduces an ordering pattern that mimics physical proximity when values are sorted sequentially. Depending upon the resolution of the numbers you will see a pattern of sequential blocks that start at 1deg. x 1deg and nest themselves at .1, .01, .001, 0001, .00001, etc. resolutions depending upon how many pairs are in the interleaved value. If all the values in the database were to have five interleaved pairs to the right of the decimal they would have an effective resolution of 5 decimal places or .00001 of 1deg which is approx. 1/10000 of 110.57km or 11.057 meters. If you have one less pair in the resolution then the interleaved value will appear at the beginning of the next higher block and so on up. Think of them as basins of attraction. Anything at that resolution and a specific value will be drawn to that position in the linear series of all values. More resolution means smaller basins of attraction within larger ones. It is basically a compression method that takes multiple dimensions and compresses them into fewer dimensions (many multiple strings become single strings within a larger string). The first transformation was from 3 to 2 dimensions. We went from a position on a sphere (3 dimensional object) to a two dimensional description in the form of lat long coordinates. The next transformation went from 2 to 1 when we performed the "Z" transform and descended to one dimension in the form of a value in a line (computer memory is linear). Tell me if this starting to look a lot like a strand of DNA. Enzymes are to DNA the same way various parsing routines are to various strings. They serve to extract information based on position and content. In summary have a three dimensional (there might be more) "organism" defined in one dimension (a string). You can in essence have any level of resolution from 110.57 km down to 1 meter or less. Objects that are large need less precision and can be stored with a shorter string. Although they have less precision they will still be located in the data file with points that are close by in the "real" world. (Numbers are short for clarity) Notice the ordering 33, 33.5689, 33.57, 33.58, 33.583, 33.584 34, 34.5, 34.56, 34.562, 35, 36, The marks illustrate the lowest resolution boundries. The ordering of points follows a regular pattern. Where there is no data (spelled no data or less granularity) the pattern just turns into a void and requires no effort to maintain. The traversal of the locations actually follows a nesting zig zag pattern somewhat like the scan lines of wall of individual monitors depicting a larger scene except if there is no data then the scan jumps to the next block which can be at any resolution. Navigation can easily be accomplished by jumping to the next level (lower resolution) by trimming the last pair of numbers from our "Z" transform value and then walking the line by specific increments. Arrays within arrays in the easiest way to visualize it. Only when we find the point of interest do we need to reverse the transformation or do a lookup to find its' actual location coordinates in traditional lat long format. That's it in a nutshell. I hope I have made this somewhat clear despite its' ad hoc nature. Gotta fly... Jim