[Liblas-commits] r1011 - in trunk/src: . detail
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue Feb 10 23:33:54 EST 2009
Author: hobu
Date: Tue Feb 10 23:33:54 2009
New Revision: 1011
URL: http://liblas.org/changeset/1011
Log:
actually support writing 1.2 now that coding is done
Modified:
trunk/src/detail/writer.cpp
trunk/src/detail/writer12.cpp
trunk/src/laswriter.cpp
Modified: trunk/src/detail/writer.cpp
==============================================================================
--- trunk/src/detail/writer.cpp (original)
+++ trunk/src/detail/writer.cpp Tue Feb 10 23:33:54 2009
@@ -42,6 +42,7 @@
#include <liblas/detail/writer.hpp>
#include <liblas/detail/writer10.hpp>
#include <liblas/detail/writer11.hpp>
+#include <liblas/detail/writer12.hpp>
#include <liblas/lasheader.hpp>
#include <liblas/laspoint.hpp>
// std
@@ -91,6 +92,10 @@
{
return new v11::WriterImpl(ofs);
}
+ if (1 == major && 2 == minor)
+ {
+ return new v12::WriterImpl(ofs);
+ }
else if (2 == major && 0 == minor)
{
// TODO: LAS 2.0 read/write support
Modified: trunk/src/detail/writer12.cpp
==============================================================================
--- trunk/src/detail/writer12.cpp (original)
+++ trunk/src/detail/writer12.cpp Tue Feb 10 23:33:54 2009
@@ -127,7 +127,7 @@
// 9. Version minor
n1 = header.GetVersionMinor();
- assert(1 == n1);
+ assert(2 == n1);
detail::write_n(m_ofs, n1, sizeof(n1));
// 10. System ID
Modified: trunk/src/laswriter.cpp
==============================================================================
--- trunk/src/laswriter.cpp (original)
+++ trunk/src/laswriter.cpp Tue Feb 10 23:33:54 2009
@@ -81,23 +81,7 @@
return false;
}
- // TODO: Move composition of point record deep into writer implementation
- // m_record.x = static_cast<uint32_t>((point.GetX() - m_header.GetOffsetX()) / m_header.GetScaleX());
- // m_record.y = static_cast<uint32_t>((point.GetY() - m_header.GetOffsetY()) / m_header.GetScaleY());
- // m_record.z = static_cast<uint32_t>((point.GetZ() - m_header.GetOffsetZ()) / m_header.GetScaleZ());
- // m_record.intensity = point.GetIntensity();
- // m_record.flags = point.GetScanFlags();
- // m_record.classification = point.GetClassification();
- // m_record.scan_angle_rank = point.GetScanAngleRank();
- // // For LAS 1.0 - File Marker; for LAS 1.1 - User Data.
- // m_record.user_data = point.GetUserData();
- // // For LAS 1.0 - User Bit Field; for LAS 1.1 - Point Source ID.
- // m_record.point_source_id = point.GetPointSourceID();
- //
- // if (m_header.GetDataFormatId() == LASHeader::ePointFormat0)
- m_pimpl->WritePointRecord(point, m_header);
- // else
- // m_pimpl->WritePointRecord(m_record, point.GetTime());
+ m_pimpl->WritePointRecord(point, m_header);
return true;
}
More information about the Liblas-commits
mailing list