Skip to content

Commit

Permalink
Merge pull request #451 from PDAL/bpfmeta
Browse files Browse the repository at this point in the history
Fix dumping of dimensions from point context.
  • Loading branch information
abellgithub committed Sep 11, 2014
2 parents c5e8127 + 74c899b commit 9a9b33c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/pdal/PDALUtils.hpp
Expand Up @@ -95,7 +95,7 @@ inline ptree toPTree(const PointContext& ctx)
for (const auto& id : ctx.dims())
{
ptree dim;
dim.put("name", Dimension::name(id));
dim.put("name", ctx.dimName(id));
Dimension::Type::Enum t = ctx.dimType(id);
dim.put("type", Dimension::toName(Dimension::base(t)));
dim.put("size", ctx.dimSize(id));
Expand Down
7 changes: 1 addition & 6 deletions include/pdal/PointContext.hpp
Expand Up @@ -201,12 +201,7 @@ class PointContext
// @return the current size in bytes of the dimension
// with the given id.
size_t dimSize(Dimension::Id::Enum id) const
{
Dimension::Type::Enum t = Dimension::defaultType(id);
if (t == Dimension::Type::None)
t = Dimension::Type::Float;
return hasDim(id) ? dimDetail(id)->size() : Dimension::size(t);
}
{ return dimDetail(id)->size(); }

private:
Dimension::Detail *dimDetail(Dimension::Id::Enum id) const
Expand Down

0 comments on commit 9a9b33c

Please sign in to comment.