42 #ifndef LIBLAS_SCHEMA_HPP_INCLUDED 43 #define LIBLAS_SCHEMA_HPP_INCLUDED 46 #include <liblas/external/property_tree/ptree.hpp> 52 #include <boost/any.hpp> 53 #include <boost/shared_ptr.hpp> 54 #include <boost/foreach.hpp> 55 #include <boost/array.hpp> 56 #include <boost/optional.hpp> 58 #include <boost/multi_index_container.hpp> 59 #include <boost/multi_index/member.hpp> 60 #include <boost/multi_index/ordered_index.hpp> 61 #include <boost/multi_index/hashed_index.hpp> 62 #include <boost/multi_index/sequenced_index.hpp> 63 #include <boost/multi_index/mem_fun.hpp> 64 #include <boost/multi_index/random_access_index.hpp> 72 #include <boost/unordered_map.hpp> 83 typedef boost::multi_index::multi_index_container<
85 boost::multi_index::indexed_by<
87 boost::multi_index::ordered_unique<boost::multi_index::tag<position>, boost::multi_index::identity<Dimension> >,
90 boost::multi_index::random_access<boost::multi_index::tag<index> >,
92 boost::multi_index::hashed_unique<boost::multi_index::tag<name>, boost::multi_index::const_mem_fun<Dimension,std::string const&,&Dimension::GetName> >
108 Schema(std::vector<VariableRecord>
const& vlrs);
119 std::size_t GetByteSize()
const;
121 std::size_t GetBitSize()
const;
122 void CalculateSizes();
125 std::size_t GetBaseByteSize()
const;
130 void AddDimension(Dimension
const& dim);
131 boost::optional< Dimension const& > GetDimension(std::string
const& n)
const;
132 boost::optional< Dimension const& > GetDimension(index_by_index::size_type t)
const;
135 void RemoveDimension(Dimension
const& dim);
137 void SetDimension(Dimension
const& dim);
139 std::vector<std::string> GetDimensionNames()
const;
141 liblas::property_tree::ptree GetPTree()
const;
146 bool IsCustom()
const;
161 void add_record0_dimensions();
167 IndexMap LoadDimensions(liblas::property_tree::ptree tree);
181 #endif // LIBLAS_SCHEMA_HPP_INCLUDED std::size_t m_base_bit_size
Definition: schema.hpp:154
bool sort_dimensions(Dimension i, Dimension j)
Definition: schema.hpp:171
IndexMap const & GetDimensions() const
Definition: schema.hpp:140
Representation of variable-length record data.
Definition: variablerecord.hpp:59
#define LAS_DLL
Definition: export.hpp:58
std::ostream & operator<<(std::ostream &os, Classification const &cls)
The output stream operator is based on std::bitset<N>::operator<<.
Definition: classification.hpp:247
PointFormatName GetDataFormatId() const
Definition: schema.hpp:127
PointFormatName m_data_format_id
Definition: schema.hpp:151
uint16_t GetSchemaVersion() const
Definition: schema.hpp:143
void SetSchemaVersion(uint16_t v)
Definition: schema.hpp:144
IndexMap::index< position >::type index_by_position
Definition: schema.hpp:97
Definition: schema.hpp:79
IndexMap::index< index >::type index_by_index
Definition: schema.hpp:98
bool operator!=(const Schema &other) const
Definition: schema.hpp:112
bool operator==(Classification const &lhs, Classification const &rhs)
Equal-to operator implemented in terms of Classification::equal.
Definition: classification.hpp:226
Namespace grouping all elements of libLAS public interface.
Definition: bounds.hpp:60
PointFormatName
Versions of point record format.
Definition: version.hpp:89
uint32_t m_nextpos
Definition: schema.hpp:152
uint16_t m_schemaversion
Definition: schema.hpp:155
IndexMap::index< name >::type index_by_name
Definition: schema.hpp:96
Definition: schema.hpp:78
std::vector< Dimension > DimensionArray
Definition: schema.hpp:76
Definition: schema.hpp:80
std::size_t m_bit_size
Definition: schema.hpp:153
boost::multi_index::multi_index_container< Dimension, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< position >, boost::multi_index::identity< Dimension > >, boost::multi_index::random_access< boost::multi_index::tag< index > >, boost::multi_index::hashed_unique< boost::multi_index::tag< name >, boost::multi_index::const_mem_fun< Dimension, std::string const &,&Dimension::GetName > > >> IndexMap
Definition: schema.hpp:94
Schema definition.
Definition: schema.hpp:102
Dimension definition.
Definition: dimension.hpp:73
~Schema()
Definition: schema.hpp:116