Closed Shtirlic81 closed 4 years ago
key - Unique identifier of the key name - name of the field
Using the example you would parse the attribute buffer in the following way:
The header is 8 bytes: count - The first 4 bytes are the count of the objects within the buffer attributeValuesByteCount - 4 bytes. For string types. The total number of bytes, of all strings
ordering - Following the header, the order of the arrays: attributeByteCounts - There’s an array of the byte counts of the strings, including the null character. attributeValues - Finally, there’s an array containing the actual string values, in utf- 8 encoding.
Note on attributeByteCounts: For string types, all strings are null terminated. A null string is a string of size 0. An empty string is a string of size one, only containing the null character.
There’s is a similar question about the attribute buffer. https://github.com/Esri/i3s-spec/issues/48#issuecomment-526565116
We will update the example to make this clearer. Thanks for your feedback.
Ok, Thanks
In the desciption of the attributeByteCounts it says: "For string types only. Represents the byte count of the string, including the null character."
But the example given is not representing it and confusing.
{ "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 } }