attributeStorageInfo

May 26, 2021 ยท View on GitHub

The attributeStorageInfo object describes the structure of the binary attribute data resource of a layer, which is the same for every node in the layer. The following examples show how different attribute types are represented as a binary buffer.

Examples of attribute resources

String

FieldTypeDescription
String countUINT32Number of strings in the buffer.
Total number of bytesUINT32Total number of bytes for all the stings, including NULL terminating character.
String sizeUINT32[n]Size of each string in bytes.
String databyte[m]String values. All strings are UTF8 encoded and NULL terminated.

A string object contains the following: { "Bratislava", "Berlin", "Wien", <empty>, "" }

524117501Bratislava\0Berlin\0Wien\0\0

Double

FieldTypeDescription
CountUINT32Number of values in the buffer.
Padding*bytes[4]Padding to preserve 8 byte alignement for double values.
valueDouble [count]Double values.

Representing double values 2.5, 44.67,0.5 .

3-2.544.670.5

Short Integer

FieldTypeDescription
CountUINT32Number of values in the buffer.
valueUINT16 [count]16 bit integer values.

Integer values of 3,10,7.

33107

cmn::3DSceneLayer, psl::3DSceneLayer, psl::3DSceneLayer

Properties

PropertyTypeDescription
keystringThe unique field identifier key.
namestringThe name of the field.
headerheaderValue[]Declares the headers of the binary attribute data.
orderingstring[]
Possible values for each array string:
  • attributeByteCounts: Should only be present when working with string data types.
  • attributeValues: Should always be present.
  • ObjectIds
attributeValuesvalueRepresents the description for value encoding. For example: scalar or vector encoding.
attributeByteCountsvalueFor string types only. Represents the byte count of the string, including the null character.
objectIdsvalueStores the object-id values of each feature within the node.

Note: properties in bold are required

Examples

Example: attributeStorageInfo for 3d object scene layer

 {
  "key": "f_2",
  "name": "Family",
  "header": [
    {
      "property": "count",
      "valueType": "UInt32"
    },
    {
      "property": "attributeValuesByteCount",
      "valueType": "UInt32"
    }
  ],
  "ordering": [
    "attributeByteCounts",
    "attributeValues"
  ],
  "attributeByteCounts": {
    "valueType": "UInt32",
    "valuesPerElement": 1
  },
  "attributeValues": {
    "valueType": "String",
    "encoding": "UTF-8",
    "valuesPerElement": 1
  }
}