| 329 | } |
| 330 | |
| 331 | MetadataNode PointLayout::toMetadata() const |
| 332 | { |
| 333 | |
| 334 | MetadataNode root("schema"); |
| 335 | |
| 336 | for (const auto& id : dims()) |
| 337 | { |
| 338 | MetadataNode dim("dimensions"); |
| 339 | dim.add("name", dimName(id)); |
| 340 | Dimension::Type t = dimType(id); |
| 341 | dim.add("type", Dimension::toName(Dimension::base(t))); |
| 342 | dim.add("size", dimSize(id)); |
| 343 | root.addList(dim); |
| 344 | } |
| 345 | |
| 346 | return root; |
| 347 | } |
| 348 | |
| 349 | void PointLayout::setAllowedDims(StringList dimNames) |
| 350 | { |