[Liblas-commits] r1261 - trunk/src/detail
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon May 11 12:03:44 EDT 2009
Author: hobu
Date: Mon May 11 12:03:37 2009
New Revision: 1261
URL: http://liblas.org/changeset/1261
Log:
attempt to fix #134 where we were improperly scaling before projecting
Modified:
trunk/src/detail/writer.cpp
Modified: trunk/src/detail/writer.cpp
==============================================================================
--- trunk/src/detail/writer.cpp (original)
+++ trunk/src/detail/writer.cpp Mon May 11 12:03:37 2009
@@ -87,15 +87,16 @@
void Writer::FillPointRecord(PointRecord& record, const LASPoint& point, const LASHeader& header)
{
- record.x = static_cast<int32_t>((point.GetX() - header.GetOffsetX()) / header.GetScaleX());
- record.y = static_cast<int32_t>((point.GetY() - header.GetOffsetY()) / header.GetScaleY());
- record.z = static_cast<int32_t>((point.GetZ() - header.GetOffsetZ()) / header.GetScaleZ());
if (0 != m_transform)
{
Project(record);
}
+ record.x = static_cast<int32_t>((point.GetX() - header.GetOffsetX()) / header.GetScaleX());
+ record.y = static_cast<int32_t>((point.GetY() - header.GetOffsetY()) / header.GetScaleY());
+ record.z = static_cast<int32_t>((point.GetZ() - header.GetOffsetZ()) / header.GetScaleZ());
+
LASClassification::bitset_type clsflags(point.GetClassification());
record.classification = static_cast<uint8_t>(clsflags.to_ulong());
More information about the Liblas-commits
mailing list