[Liblas-commits] hg: 2 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Jul 1 11:42:53 EDT 2010


changeset d57d6830721f in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=d57d6830721f
summary: make boost required

changeset 9d4d836ad06d in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=9d4d836ad06d
summary: rename liblas::PointFormat to liblas::Schema

diffstat:

 CMakeLists.txt                         |    8 +-
 include/liblas/capi/liblas.h           |   38 ++--
 include/liblas/detail/reader/point.hpp |    2 +-
 include/liblas/detail/writer/point.hpp |    2 +-
 include/liblas/lasformat.hpp           |  114 -----------------
 include/liblas/lasheader.hpp           |   10 +-
 include/liblas/lasschema.hpp           |  114 +++++++++++++++++
 python/examples/add_vlr.py             |   25 +++
 python/liblas/core.py                  |   90 ++++++------
 python/liblas/format.py                |  150 ----------------------
 python/liblas/header.py                |   62 ++++----
 python/liblas/schema.py                |  150 ++++++++++++++++++++++
 python/tests/File.txt                  |    4 +-
 python/tests/Format.txt                |   68 ----------
 python/tests/Schema.txt                |   68 ++++++++++
 src/CMakeLists.txt                     |    6 +-
 src/detail/reader/point.cpp            |    3 +-
 src/detail/writer/point.cpp            |    4 +-
 src/las_c_api.cpp                      |  110 ++++++++--------
 src/lasformat.cpp                      |  220 ---------------------------------
 src/lasheader.cpp                      |   10 +-
 src/lasschema.cpp                      |  220 +++++++++++++++++++++++++++++++++
 22 files changed, 753 insertions(+), 725 deletions(-)

diffs (truncated from 1971 to 300 lines):

diff -r 714a12f210b1 -r 9d4d836ad06d CMakeLists.txt
--- a/CMakeLists.txt	Thu Jul 01 09:24:46 2010 -0500
+++ b/CMakeLists.txt	Thu Jul 01 10:42:44 2010 -0500
@@ -149,12 +149,14 @@
 
 
 
-# Boost C++ Libraries support - optional, default=OFF
-set(WITH_BOOST FALSE CACHE BOOL "Choose if Boost C++ Libraries support should be built")
+# Boost C++ Libraries support - optional, default=ON
+set(WITH_BOOST TRUE CACHE BOOL "Choose if Boost C++ Libraries support should be built (required)")
 
 # TODO: Decide minimum required version of Boost. Is 1.38 OK? --mloskot
 if(WITH_BOOST)
-    find_package(Boost 1.35 REQUIRED iostreams)
+    message(STATUS "Searching for Boost 1.38+ - done")
+
+    find_package(Boost 1.38 REQUIRED iostreams)
 
     if(Boost_FOUND AND Boost_iostreams_FOUND)
       include_directories(${Boost_INCLUDE_DIRS})
diff -r 714a12f210b1 -r 9d4d836ad06d include/liblas/capi/liblas.h
--- a/include/liblas/capi/liblas.h	Thu Jul 01 09:24:46 2010 -0500
+++ b/include/liblas/capi/liblas.h	Thu Jul 01 10:42:44 2010 -0500
@@ -61,7 +61,7 @@
 typedef struct LASVLRHS *LASVLRH;
 typedef struct LASColorHS *LASColorH;
 typedef struct LASSRSHS *LASSRSH;
-typedef struct LASPointFormatHS *LASPointFormatH;
+typedef struct LASSchemaHS *LASSchemaH;
 
 
 /* Fake out the compiler if we don't have libgeotiff */
@@ -1128,7 +1128,7 @@
 LAS_DLL LASError LASPoint_SetColor(LASPointH hPoint, const LASColorH hColor);
 
 /** Gets the extra data stream for the LASPointH as an array of bytes.  The length of this 
- *  array should be the difference between the LASPointFormat_GetByteSize() and the 
+ *  array should be the difference between the LASSchema_GetByteSize() and the 
  *  a LASHeader_GetDataRecordLength().  Points with data larger than this (fixed) size 
  *  will be clipped upong being written into the file. You must allocate it on 
  *  the heap and you are responsible for its destruction.
@@ -1139,7 +1139,7 @@
 LAS_DLL LASError LASPoint_GetExtraData(const LASPointH hPoint, uint8_t** data, uint16_t* length);
 
 /** Sets the extra data stream for the LASPointH as an array of bytes.  The length of this 
- *  array should be the difference between the LASPointFormat_GetByteSize() and the 
+ *  array should be the difference between the LASSchema_GetByteSize() and the 
  *  a LASHeader_GetDataRecordLength().  Points with data larger than this (fixed) size 
  *  will be clipped upong being written into the file. 
  *  the VLR structure.
@@ -1183,30 +1183,30 @@
 */
 LAS_DLL void LASString_Free(char* string);
 
-LAS_DLL LASPointFormatH LASPointFormat_Create(  uint8_t version_major,
+LAS_DLL LASSchemaH LASSchema_Create(  uint8_t version_major,
                                                 uint8_t version_minor,
                                                 uint32_t size,
                                                 uint8_t bHasColor,
                                                 uint8_t bHasTime);
 
-LAS_DLL uint8_t LASPointFormat_GetVersionMinor( LASPointFormatH hFormat);
-LAS_DLL LASError LASPointFormat_SetVersionMinor( LASPointFormatH hFormat, uint8_t nMinor);
-LAS_DLL uint8_t LASPointFormat_GetMajorVersion( LASPointFormatH hFormat);
-LAS_DLL LASError LASPointFormat_SetVersionMinor( LASPointFormatH hFormat, uint8_t nMajor);
-LAS_DLL uint8_t LASPointFormat_HasColor( LASPointFormatH hFormat);
-LAS_DLL LASError LASPointFormat_SetColor( LASPointFormatH hFormat, uint8_t bColor);
-LAS_DLL uint8_t LASPointFormat_HasTime( LASPointFormatH hFormat);
-LAS_DLL LASError LASPointFormat_SetTime( LASPointFormatH hFormat, uint8_t bTime);
-LAS_DLL uint16_t LASPointFormat_GetByteSize( LASPointFormatH hFormat);
-LAS_DLL LASError LASPointFormat_SetByteSize( LASPointFormatH hFormat, uint16_t size);
-LAS_DLL uint16_t LASPointFormat_GetBaseByteSize( LASPointFormatH hFormat);
-LAS_DLL LASError LASPointFormat_SetBaseByteSize( LASPointFormatH hFormat, uint16_t size);
+LAS_DLL uint8_t LASSchema_GetVersionMinor( LASSchemaH hFormat);
+LAS_DLL LASError LASSchema_SetVersionMinor( LASSchemaH hFormat, uint8_t nMinor);
+LAS_DLL uint8_t LASSchema_GetMajorVersion( LASSchemaH hFormat);
+LAS_DLL LASError LASSchema_SetVersionMinor( LASSchemaH hFormat, uint8_t nMajor);
+LAS_DLL uint8_t LASSchema_HasColor( LASSchemaH hFormat);
+LAS_DLL LASError LASSchema_SetColor( LASSchemaH hFormat, uint8_t bColor);
+LAS_DLL uint8_t LASSchema_HasTime( LASSchemaH hFormat);
+LAS_DLL LASError LASSchema_SetTime( LASSchemaH hFormat, uint8_t bTime);
+LAS_DLL uint16_t LASSchema_GetByteSize( LASSchemaH hFormat);
+LAS_DLL LASError LASSchema_SetByteSize( LASSchemaH hFormat, uint16_t size);
+LAS_DLL uint16_t LASSchema_GetBaseByteSize( LASSchemaH hFormat);
+LAS_DLL LASError LASSchema_SetBaseByteSize( LASSchemaH hFormat, uint16_t size);
 
 
-LAS_DLL LASPointFormatH LASHeader_GetPointFormat( LASHeaderH hHeader );
-LAS_DLL LASError LASHeader_SetPointFormat( LASHeaderH hHeader, LASPointFormatH hFormat);
+LAS_DLL LASSchemaH LASHeader_GetSchema( LASHeaderH hHeader );
+LAS_DLL LASError LASHeader_SetSchema( LASHeaderH hHeader, LASSchemaH hFormat);
 
-LAS_DLL void LASPointFormat_Destroy(LASPointFormatH hFormat);
+LAS_DLL void LASSchema_Destroy(LASSchemaH hFormat);
 
 
 LAS_C_END
diff -r 714a12f210b1 -r 9d4d836ad06d include/liblas/detail/reader/point.hpp
--- a/include/liblas/detail/reader/point.hpp	Thu Jul 01 09:24:46 2010 -0500
+++ b/include/liblas/detail/reader/point.hpp	Thu Jul 01 10:42:44 2010 -0500
@@ -83,7 +83,7 @@
     const liblas::Header& m_header;
     liblas::Point m_point;
     
-    PointFormat m_format;
+    Schema m_format;
     
     void setup();
     void fill(PointRecord& record);
diff -r 714a12f210b1 -r 9d4d836ad06d include/liblas/detail/writer/point.hpp
--- a/include/liblas/detail/writer/point.hpp	Thu Jul 01 09:24:46 2010 -0500
+++ b/include/liblas/detail/writer/point.hpp	Thu Jul 01 10:42:44 2010 -0500
@@ -85,7 +85,7 @@
         
     PointRecord m_record;
     
-    PointFormat m_format;
+    Schema m_format;
     
     liblas::uint8_t* m_blanks;
     
diff -r 714a12f210b1 -r 9d4d836ad06d include/liblas/lasformat.hpp
--- a/include/liblas/lasformat.hpp	Thu Jul 01 09:24:46 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/******************************************************************************
- * $Id$
- *
- * Project:  libLAS - http://liblas.org - A BSD library for LAS format data.
- * Purpose:  LAS PointFormat implementation for C++ libLAS 
- * Author:   Howard Butler, hobu.inc at gmail.com
- *
- ******************************************************************************
- * Copyright (c) 2010, Howard Butler
- *
- * All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following 
- * conditions are met:
- * 
- *     * Redistributions of source code must retain the above copyright 
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright 
- *       notice, this list of conditions and the following disclaimer in 
- *       the documentation and/or other materials provided 
- *       with the distribution.
- *     * Neither the name of the Martin Isenburg or Iowa Department 
- *       of Natural Resources nor the names of its contributors may be 
- *       used to endorse or promote products derived from this software 
- *       without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
- * OF SUCH DAMAGE.
- ****************************************************************************/
-
-#ifndef LIBLAS_FORMAT_HPP_INCLUDED
-#define LIBLAS_FORMAT_HPP_INCLUDED
-
-#include <liblas/detail/fwd.hpp>
-#include <liblas/cstdint.hpp>
-
-// std
-#include <iosfwd>
-
-namespace liblas {  
-
-
-
-class PointFormat
-{
-public:
-
-    PointFormat( liblas::uint8_t major, 
-                    liblas::uint8_t minor, 
-                    liblas::uint16_t size);
-
-    PointFormat( liblas::uint8_t major, 
-                    liblas::uint8_t minor, 
-                    liblas::uint16_t size,
-                    bool bColor,
-                    bool bTime);
-    PointFormat& operator=(PointFormat const& rhs);
-    PointFormat(PointFormat const& other);
-    
-    ~PointFormat() {};
-
-    /// Fetch byte size
-    uint16_t GetByteSize() const;
-
-    /// Set value of the red image channel 
-    void SetByteSize(uint16_t const& value);
-
-    /// Get the base size (only accounting for Time, Color, etc )
-    uint16_t GetBaseByteSize() const;
-    
-    uint8_t GetVersionMajor() const; 
-    void SetVersionMajor(uint8_t const& value);
-    
-    uint8_t GetVersionMinor() const;
-    void SetVersionMinor(uint8_t const& value);
-
-    bool HasColor() const;
-    void Color(bool const& bColor); // updatesize(); }
-    bool HasTime() const; 
-    void Time(bool const& bTime); // {m_hasTime = bTime; updatesize(); }
-  
-protected:
-    
-    liblas::uint16_t m_size;
-    liblas::uint8_t m_versionminor;
-    liblas::uint8_t m_versionmajor;
-
-    bool m_hasColor;
-    bool m_hasTime;
-    
-    liblas::uint16_t m_base_size;
-
-private:
-    void updatesize();
-    void updatesize(liblas::uint16_t new_size);
-    liblas::uint16_t calculate_base_size();
-};
-
-
-
-} // namespace liblas
-
-#endif // LIBLAS_FORMAT_HPP_INCLUDED
diff -r 714a12f210b1 -r 9d4d836ad06d include/liblas/lasheader.hpp
--- a/include/liblas/lasheader.hpp	Thu Jul 01 09:24:46 2010 -0500
+++ b/include/liblas/lasheader.hpp	Thu Jul 01 10:42:44 2010 -0500
@@ -50,7 +50,7 @@
 #include <liblas/liblas.hpp>
 #include <liblas/lasvariablerecord.hpp>
 #include <liblas/lasspatialreference.hpp>
-#include <liblas/lasformat.hpp>
+#include <liblas/lasschema.hpp>
 #include <liblas/guid.hpp>
 
 //std
@@ -323,8 +323,8 @@
     /// Set the georeference
     void SetSRS(SpatialReference& srs);
 
-    PointFormat GetPointFormat() const;
-    void SetPointFormat(const PointFormat& format);
+    Schema GetSchema() const;
+    void SetSchema(const Schema& format);
     
 private:
     
@@ -352,7 +352,7 @@
     //
     void Init();
     void ClearGeoKeyVLRs();
-    void UpdatePointFormat();
+    void UpdateSchema();
 
     //
     // Private data members
@@ -382,7 +382,7 @@
     PointExtents m_extents;
     std::vector<VariableRecord> m_vlrs;
     SpatialReference m_srs;
-    PointFormat m_format;
+    Schema m_format;
 };
 
 } // namespace liblas
diff -r 714a12f210b1 -r 9d4d836ad06d include/liblas/lasschema.hpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/liblas/lasschema.hpp	Thu Jul 01 10:42:44 2010 -0500
@@ -0,0 +1,114 @@
+/******************************************************************************
+ * $Id$
+ *
+ * Project:  libLAS - http://liblas.org - A BSD library for LAS format data.
+ * Purpose:  LAS Schema implementation for C++ libLAS 
+ * Author:   Howard Butler, hobu.inc at gmail.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2010, Howard Butler
+ *
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following 
+ * conditions are met:


More information about the Liblas-commits mailing list