[Liblas-commits] hg: remove LAS* prefix to c++ type names in
tutorial
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue Nov 23 15:25:52 EST 2010
changeset 1c7248d4623e in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=1c7248d4623e
summary: remove LAS* prefix to c++ type names in tutorial
diffstat:
doc/tutorial/cpp.txt | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diffs (106 lines):
diff -r f9354b8c9948 -r 1c7248d4623e doc/tutorial/cpp.txt
--- a/doc/tutorial/cpp.txt Tue Nov 23 11:46:54 2010 -0600
+++ b/doc/tutorial/cpp.txt Tue Nov 23 14:25:43 2010 -0600
@@ -37,14 +37,14 @@
.. code-block:: cpp
- liblas::LASReader reader(ifs);
+ liblas::Reader reader(ifs);
4. After the reader has been created, you can access members of the Public
Header Block
.. code-block:: cpp
- liblas::LASHeader const& header = reader.GetHeader();
+ liblas::Header const& header = reader.GetHeader();
std::cout << "Signature: " << header.GetFileSignature() << '\n';
std::cout << "Points count: " << header.GetPointRecordsCount() << '\n';
@@ -60,7 +60,7 @@
while (reader.ReadNextPoint())
{
- liblas::LASPoint const& p = reader.GetPoint();
+ liblas::Point const& p = reader.GetPoint();
std::cout << p.GetX() << ", " << p.GetY() << ", " << p.GetZ() << "\n";
}
@@ -86,12 +86,12 @@
std::ofstream ofs;
ofs.open("file.las", ios::out | ios::binary);
-3. Create instance of LASHeader class to define Public Header Block and set some values
+3. Create instance of Header class to define Public Header Block and set some values
.. code-block:: cpp
- liblas::LASHeader header;
- header.SetDataFormatId(LASHeader::ePointFormat1);
+ liblas::Header header;
+ header.SetDataFormatId(liblas::ePointFormat1);
// fill other header members
@@ -106,14 +106,14 @@
.. code-block:: cpp
- liblas::LASWriter writer(ofs, header);
+ liblas::Writer writer(ofs, header);
// here the header has been serialized to disk into the *file.las*
5. Now, you can write some point records
.. code-block:: cpp
- liblas::LASPoint point;
+ liblas::Point point;
point.SetCoordinates(10, 20, 30);
// fill other properties of point record
@@ -129,7 +129,7 @@
another, in two different ways.
--------------------------------------------------
-Using interface of LASReader and LASWriter classes
+Using interface of Reader and Writer classes
--------------------------------------------------
.. code-block:: cpp
@@ -146,8 +146,8 @@
std::ifstream ifs("input.las", ios::in | ios::binary);
std::ofstream ofs("output.las", ios::out | ios::binary);
- liblas::LASReader reader(ifs);
- liblas::LASWriter writer(ofs, reader.GetHeader());
+ liblas::Reader reader(ifs);
+ liblas::Writer writer(ofs, reader.GetHeader());
while (reader.ReadNextPoint())
{
@@ -171,10 +171,10 @@
* lasreader_iterator - (`input iterator
<http://www.sgi.com/tech/stl/InputIterator.html>`__) used to read data from
- LAS file attached to LASReader object
+ LAS file attached to Reader object
* laswriter_iterator - (`output iterator
<http://www.sgi.com/tech/stl/OutputIterator.html>`__) used to write data into
- LAS file attached to LASWriter object.
+ LAS file attached to Writer object.
.. code-block:: cpp
@@ -193,8 +193,8 @@
std::ifstream ifs("input.las", ios::in | ios::binary);
std::ofstream ofs("output.las", ios::out | ios::binary);
- LASReader reader(ifs);
- LASWriter writer(ofs, reader.GetHeader());
+ Reader reader(ifs);
+ Writer writer(ofs, reader.GetHeader());
std::copy(lasreader_iterator(reader), lasreader_iterator(),
laswriter_iterator(writer));
More information about the Liblas-commits
mailing list