Autor Thema: How Feature Name Serialization Works  (Gelesen 3974 mal)

Offline gregory

  • Insight Map Creator
  • *
  • Beiträge: 854
How Feature Name Serialization Works
« am: 25 Juni 2014, 14:15:35 »
Serialization is the encoding of values into a string or a series of bytes in such a way that it could be converted back into it's original values.  Feature names are never deserialized but the term fits just the same.

The idea of feature name serialization is that you take any attribute (ex: bold) and serialize it with a bit value in a maximum number of bits.  Bold would be encoded as either a 0 or a 1 in 1 bit of the string.
 
Some attributes like text and elevation are not serialized in entirety.  They are only serialized based on whether the attribute they are going into is being used or not.
 
The serialization becomes complex when you don't know how many entries are going in to the solution.  When you select a major or minor category (free form), the categories are collected and each assigned an index based on when they were hit.  Then the category is serialized based on it's index and the total number of categories collected.  The possible number of categories is infinite so serializing it any other way is impractical.

As the Insight Map Creator becomes more dynamic, more and more variables get converted into free form variables.
 
With free form variables, the order that these are hit will decide the how the feature is serialized which is why combining AT5.xml files doesn't really work because the feature names will be different on each run if the free form variables are not hit in the exact same order.