8 #ifndef __LIDAR_METADATA_H__
9 #define __LIDAR_METADATA_H__
15 LT_BEGIN_LIDAR_NAMESPACE
20 #define METADATA_KEY_FileSourceID "FileSourceID"
21 #define METADATA_KEY_ProjectID "ProjectID"
22 #define METADATA_KEY_SystemID "SystemID"
23 #define METADATA_KEY_GeneratingSoftware "GeneratingSoftware"
24 #define METADATA_KEY_FileCreationDate "FileCreationDate"
25 #define METADATA_KEY_PointRecordsByReturnCount "PointRecordsByReturnCount"
26 #define METADATA_KEY_PreCompressionPointCount "PreCompressionPointCount"
27 #define METADATA_KEY_LASBBox "LAS_BoundingBox"
82 bool has(
const char *key)
const;
97 void get(
size_t idx,
const char *&key,
const char *&description,
99 const void *&value,
size_t &length)
const;
114 bool get(
const char *key,
const char *&description,
116 const void *&value,
size_t &length)
const;
180 void add(
const char *key,
const char *description,
182 const void *value,
size_t length);
254 LT_END_LIDAR_NAMESPACE
MetadataDataType
Metdata data types.
@ METADATA_DATATYPE_INVALID
@ METADATA_DATATYPE_REAL_ARRAY
An array of doubles.
@ METADATA_DATATYPE_STRING
A string including the terminating null.
@ METADATA_DATATYPE_BLOB
Block of raw data.
Metadata is a container for storing metadata about the point cloud.
size_t getKeyIndex(const char *key) const
Find the index of the key-value pair with the given key.
bool get(const char *key, const char *&description, MetadataDataType &datatype, const void *&value, size_t &length) const
Get the key-value pair with a given key.
void dump(FILE *file) const
Write the metadata in a human readable format.
void get(size_t idx, const char *&key, const char *&description, MetadataDataType &datatype, const void *&value, size_t &length) const
Get the key-value pair at a given index.
void sort(void)
Sort the pairs.
const char * getKey(size_t idx) const
Get the key name for the given index.
void add(const Metadata &meta)
Add all the key-value pairs from the given Metadata object.
MetadataDataType getDataType(size_t idx) const
Get the datatype for the given index.
void remove(const char *key)
Remove the first key-value pair with key.
void write(StreamWriter &stream) const
Read metadata from a stream.
size_t getNumRecords(void) const
Get the number of key-value pairs.
const void * getValue(size_t idx) const
Get the data buffer for the given index.
size_t getValueLength(size_t idx) const
Get the data buffer length for the given index.
bool has(const char *key) const
Determine if there is a key-value pair with a given key.
void read(StreamReader &stream)
Wirte metadata to a stream.
void add(const char *key, const char *description, MetadataDataType datatype, const void *value, size_t length)
Add a key-value pair.
const char * getDescription(size_t idx) const
Get the description for the given index.
void remove(void)
Remove all key-value pairs.
void remove(size_t idx)
Remove the key-value pair at a given index.
StreamReader implements buffered reads from IO objects.
StreamWriter implements buffered writes to IO objects.