[Liblas-commits] hg: remove some non-ASCII characters

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Jun 22 12:09:00 EDT 2011


details:   http://hg.liblas.orghg/rev/93051912505b
changeset: 2983:93051912505b
user:      Howard Butler <hobu.inc at gmail.com>
date:      Wed Jun 22 11:01:37 2011 -0500
description:
remove some non-ASCII characters
Subject: hg: bump version number in preparation for release

details:   http://hg.liblas.orghg/rev/04222d39290e
changeset: 2984:04222d39290e
user:      Howard Butler <hobu.inc at gmail.com>
date:      Wed Jun 22 11:08:19 2011 -0500
description:
bump version number in preparation for release
Subject: hg: bump version number in preparation for release

details:   http://hg.liblas.orghg/rev/7e4dc394b81b
changeset: 2985:7e4dc394b81b
user:      Howard Butler <hobu.inc at gmail.com>
date:      Wed Jun 22 11:08:33 2011 -0500
description:
bump version number in preparation for release
Subject: hg: add LASHeader_GetXML for #229

details:   http://hg.liblas.orghg/rev/99b847df8d21
changeset: 2986:99b847df8d21
user:      Howard Butler <hobu.inc at gmail.com>
date:      Wed Jun 22 11:08:52 2011 -0500
description:
add LASHeader_GetXML for #229

diffstat:

 CMakeLists.txt                    |   2 +-
 include/liblas/capi/las_version.h |   6 +++---
 include/liblas/capi/liblas.h      |   4 ++++
 python/liblas/core.py             |   4 ++++
 python/liblas/header.py           |   5 +++++
 python/setup.py                   |   2 +-
 python/tests/Header.txt           |   4 +++-
 src/c_api.cpp                     |  14 ++++++++++++++
 src/header.cpp                    |   2 +-
 src/schema.cpp                    |   6 +++---
 10 files changed, 39 insertions(+), 10 deletions(-)

diffs (169 lines):

diff -r 6a035fab789a -r 99b847df8d21 CMakeLists.txt
--- a/CMakeLists.txt	Wed Jun 22 10:47:01 2011 -0500
+++ b/CMakeLists.txt	Wed Jun 22 11:08:52 2011 -0500
@@ -10,7 +10,7 @@
 
 
 SET(LIBLAS_VERSION_MAJOR "1")
-SET(LIBLAS_VERSION_MINOR "6")
+SET(LIBLAS_VERSION_MINOR "7")
 SET(LIBLAS_VERSION_PATCH "0")
 set(VERSION "${LIBLAS_VERSION_MAJOR}.${LIBLAS_VERSION_MINOR}.${LIBLAS_VERSION_PATCH}")
 SET(LIBLAS_LIB_SOVERSION "2.0.0")
diff -r 6a035fab789a -r 99b847df8d21 include/liblas/capi/las_version.h
--- a/include/liblas/capi/las_version.h	Wed Jun 22 10:47:01 2011 -0500
+++ b/include/liblas/capi/las_version.h	Wed Jun 22 11:08:52 2011 -0500
@@ -44,7 +44,7 @@
 
 #ifndef LIBLAS_VERSION_MAJOR
 #define LIBLAS_VERSION_MAJOR    1
-#define LIBLAS_VERSION_MINOR    6
+#define LIBLAS_VERSION_MINOR    7
 #define LIBLAS_VERSION_REV      0
 #define LIBLAS_VERSION_BUILD    0
 #endif
@@ -54,11 +54,11 @@
 #endif
 
 #ifndef LIBLAS_RELEASE_DATE
-#define LIBLAS_RELEASE_DATE     20100201
+#define LIBLAS_RELEASE_DATE     20110623
 #endif
 
 #ifndef LIBLAS_RELEASE_NAME
-#define LIBLAS_RELEASE_NAME     "1.6.0"
+#define LIBLAS_RELEASE_NAME     "1.7.0"
 #endif
 
 #endif /* LAS_VERSION_H_INCLUDED */
diff -r 6a035fab789a -r 99b847df8d21 include/liblas/capi/liblas.h
--- a/include/liblas/capi/liblas.h	Wed Jun 22 10:47:01 2011 -0500
+++ b/include/liblas/capi/liblas.h	Wed Jun 22 11:08:52 2011 -0500
@@ -905,6 +905,10 @@
 */
 LAS_DLL LASError LASHeader_AddVLR(LASHeaderH hHeader, const LASVLRH hVLR);
 
+/** Returns an XMLized representation of the header
+ *  @param hHeader the LASHeader instance
+*/
+LAS_DLL char* LASHeader_GetXML(const LASHeaderH hHeader);
 /****************************************************************************/
 /* Writer Operations                                                        */
 /****************************************************************************/
diff -r 6a035fab789a -r 99b847df8d21 python/liblas/core.py
--- a/python/liblas/core.py	Wed Jun 22 10:47:01 2011 -0500
+++ b/python/liblas/core.py	Wed Jun 22 11:08:52 2011 -0500
@@ -556,6 +556,10 @@
 las.LASHeader_AddVLR.errcheck = check_return
 las.LASHeader_AddVLR.restype = ctypes.c_int
 
+las.LASHeader_GetXML.restype = ctypes.POINTER(ctypes.c_char)
+las.LASHeader_GetXML.argtypes = [ctypes.c_void_p]
+las.LASHeader_GetXML.errcheck = free_returned_char_p
+
 las.LASWriter_Create.restype = ctypes.c_void_p
 las.LASWriter_Create.argtypes = [ctypes.c_char_p,
                                     ctypes.c_void_p,
diff -r 6a035fab789a -r 99b847df8d21 python/liblas/header.py
--- a/python/liblas/header.py	Wed Jun 22 10:47:01 2011 -0500
+++ b/python/liblas/header.py	Wed Jun 22 11:08:52 2011 -0500
@@ -776,3 +776,8 @@
     def set_srs(self, value):
         return core.las.LASHeader_SetSRS(self.handle, value.handle)
     srs = property(get_srs, set_srs)
+
+    def get_xml(self):
+        return core.las.LASHeader_GetXML(self.handle)
+        
+    xml = property(get_xml, None, None, None)
\ No newline at end of file
diff -r 6a035fab789a -r 99b847df8d21 python/setup.py
--- a/python/setup.py	Wed Jun 22 10:47:01 2011 -0500
+++ b/python/setup.py	Wed Jun 22 11:08:52 2011 -0500
@@ -18,7 +18,7 @@
 
 import os
 
-version = '1.6.0'
+version = '1.7.0'
 
 import socket
 
diff -r 6a035fab789a -r 99b847df8d21 python/tests/Header.txt
--- a/python/tests/Header.txt	Wed Jun 22 10:47:01 2011 -0500
+++ b/python/tests/Header.txt	Wed Jun 22 11:08:52 2011 -0500
@@ -48,7 +48,7 @@
   datetime.datetime(2008, 3, 19, 0, 0)
 
   >>> h.software_id
-  'libLAS 1.6.0'
+  'libLAS 1.7.0'
   >>> h.software_id = 'hobu'
   >>> h.software_id
   'hobu'
@@ -119,3 +119,5 @@
   >>> h.data_record_length
   20
   
+  >>> h.xml
+  '<?xml version="1.0" encoding="utf-8"?>\n<filesignature>LASF</filesignature><projectdid>00000000-0000-0000-0000-000000000000</projectdid><systemid>Python</systemid><softwareid>hobuhobuhobuhobuhobuhobuhobuhob</softwareid><version>1.2</version><filesourceid>0</filesourceid><reserved>0</reserved><srs><proj4>None</proj4><prettywkt>None</prettywkt><wkt>None</wkt><compoundwkt>None</compoundwkt><prettycompoundwkt>None</prettycompoundwkt><gtiff>None</gtiff></srs><date>78/2008</date><size>227</size><dataoffset>742</dataoffset><count>42</count><dataformatid>0</dataformatid><datarecordlength>20</datarecordlength><compressed>false</compressed><returns><return><id>0</id><count>1341235</count></return><return><id>1</id><count>3412341222</count></return><return><id>2</id><count>0</count></return><return><id>3</id><count>0</count></return><return><id>4</id><count>4321</count></return></returns><scale><x>0.5</x><y>0.5</y><z>0.001</z></scale><offset><x>32</x><y>32</y><z>256</z></offset><minimum><x>33452344.2333</x><y>523442.344</y><z>-90.99299999999999</z></minimum><maximum><x>33452344.2333</x><y>523442.344</y><z>-90.99299999999999</z></maximum><schema><LASSchema><dimensions><dimension><name>X</name><description>x coordinate as a long integer.  You must use the scale and offset information of the header to determine the double value.</description><position>0</position><active>1</active><size>32</size><integer>1</integer><signed>1</signed><required>1</required><byteoffset>0</byteoffset><bitoffset>0</bitoffset><bytesize>4</bytesize></dimension><dimension><name>Y</name><description>y coordinate as a long integer.  You must use the scale and offset information of the header to determine the double value.</description><position>1</position><active>1</active><size>32</size><integer>1</integer><signed>1</signed><required>1</required><byteoffset>4</byteoffset><bitoffset>0</bitoffset><bytesize>4</bytesize></dimension><dimension><name>Z</name><description>z coordinate as a long integer.  You must use the scale and offset information of the header to determine the double value.</description><position>2</position><active>1</active><size>32</size><integer>1</integer><signed>1</signed><required>1</required><byteoffset>8</byteoffset><bitoffset>0</bitoffset><bytesize>4</bytesize></dimension><dimension><name>Intensity</name><description>The intensity value is the integer representation of the pulse return magnitude. This value is optional and system specific. However, it should always be included if available.</description><position>3</position><active>1</active><size>16</size><integer>1</integer><signed>0</signed><required>1</required><byteoffset>12</byteoffset><bitoffset>0</bitoffset><bytesize>2</bytesize></dimension><dimension><name>Return Number</name><description>Return Number: The Return Number is the pulse return number for a given output pulse. A given output laser pulse can have many returns, and they must be marked in sequence of return. The first return will have a Return Number of one, the second a Return Number of two, and so on up to five returns.</description><position>4</position><active>1</active><size>3</size><integer>1</integer><signed>0</signed><required>1</required><byteoffset>14</byteoffset><bitoffset>3</bitoffset><bytesize>1</bytesize></dimension><dimension><name>Number of Returns</name><description>Number of Returns (for this emitted pulse): The Number of Returns is the total number of returns for a given pulse. For example, a laser data point may be return two (Return Number) within a total number of five returns.</description><position>5</position><active>1</active><size>3</size><integer>1</integer><signed>0</signed><required>1</required><byteoffset>14</byteoffset><bitoffset>6</bitoffset><bytesize>1</bytesize></dimension><dimension><name>Scan Direction</name><description>The Scan Direction Flag denotes the direction at which the scanner mirror was traveling at the time of the output pulse. A bit value of 1 is a positive scan direction, and a bit value of 0 is a negative scan direction (where positive scan direction is a scan moving from the left side of the in-track direction to the right side and negative the opposite). </description><position>6</position><active>1</active><size>1</size><integer>1</integer><signed>0</signed><required>1</required><byteoffset>14</byteoffset><bitoffset>7</bitoffset><bytesize>1</bytesize></dimension><dimension><name>Flightline Edge</name><description>The Edge of Flight Line data bit has a value of 1 only when the point is at the end of a scan. It is the last point on a given scan line before it changes direction.</description><position>7</position><active>1</active><size>1</size><integer>1</integer><signed>0</signed><required>1</required><byteoffset>14</byteoffset><bitoffset>8</bitoffset><bytesize>1</bytesize></dimension><dimension><name>Classification</name><description>Classification in LAS 1.0 was essentially user defined and optional. LAS 1.1 defines a standard set of ASPRS classifications. In addition, the field is now mandatory. If a point has never been classified, this byte must be set to zero. There are no user defined classes since both point format 0 and point format 1 supply 8 bits per point for user defined operations. Note that the format for classification is a bit encoded field with the lower five bits used for class and the three high bits used for flags.</description><position>8</position><active>1</active><size>8</size><integer>0</integer><signed>0</signed><required>1</required><byteoffset>15</byteoffset><bitoffset>0</bitoffset><bytesize>1</bytesize></dimension><dimension><name>Scan Angle Rank</name><description>The Scan Angle Rank is a signed one-byte number with a valid range from -90 to +90. The Scan Angle Rank is the angle (rounded to the nearest integer in the absolute value sense) at which the laser point was output from the laser system including the roll of the aircraft. The scan angle is within 1 degree of accuracy from +90 to -90 degrees. The scan angle is an angle based on 0 degrees being nadir, and -90 degrees to the left side of the aircraft in the direction of flight.</description><position>9</position><active>1</active><size>8</size><integer>1</integer><signed>1</signed><required>1</required><byteoffset>16</byteoffset><bitoffset>0</bitoffset><bytesize>1</bytesize></dimension><dimension><name>User Data</name><description>This field may be used at the user&apos;s discretion</description><position>10</position><active>1</active><size>8</size><integer>0</integer><signed>0</signed><required>1</required><byteoffset>17</byteoffset><bitoffset>0</bitoffset><bytesize>1</bytesize></dimension><dimension><name>Point Source ID</name><description>This value indicates the file from which this point originated. Valid values for this field are 1 to 65,535 inclusive with zero being used for a special case discussed below. The numerical value corresponds to the File Source ID from which this point originated. Zero is reserved as a convenience to system implementers. A Point Source ID of zero implies that this point originated in this file. This implies that processing software should set the Point Source ID equal to the File Source ID of the file containing this point at some time during processing. </description><position>11</position><active>1</active><size>16</size><integer>1</integer><signed>0</signed><required>1</required><byteoffset>18</byteoffset><bitoffset>0</bitoffset><bytesize>2</bytesize></dimension></dimensions><version>1.0</version><liblas>1.7.0</liblas><formatid>0</formatid></LASSchema></schema>'
diff -r 6a035fab789a -r 99b847df8d21 src/c_api.cpp
--- a/src/c_api.cpp	Wed Jun 22 10:47:01 2011 -0500
+++ b/src/c_api.cpp	Wed Jun 22 11:08:52 2011 -0500
@@ -1463,6 +1463,20 @@
     return LE_None;
 }
 
+LAS_DLL char* LASHeader_GetXML(const LASHeaderH hHeader) 
+{
+    VALIDATE_LAS_POINTER1(hHeader, "LASHeader_GetXML", NULL);
+    liblas::Header* h = (liblas::Header*)hHeader->get();
+    
+    std::ostringstream oss;
+    
+    liblas::property_tree::ptree tree= h->GetPTree();
+    liblas::property_tree::write_xml(oss, tree);
+    return LASCopyString(oss.str().c_str());
+    
+}
+
+
 LAS_DLL void LASHeader_Destroy(LASHeaderH hHeader)
 {
     VALIDATE_LAS_POINTER0(hHeader, "LASHeader_Destroy");
diff -r 6a035fab789a -r 99b847df8d21 src/header.cpp
--- a/src/header.cpp	Wed Jun 22 10:47:01 2011 -0500
+++ b/src/header.cpp	Wed Jun 22 11:08:52 2011 -0500
@@ -65,7 +65,7 @@
 
 char const* const Header::FileSignature = "LASF";
 char const* const Header::SystemIdentifier = "libLAS";
-char const* const Header::SoftwareIdentifier = "libLAS 1.6.0";
+char const* const Header::SoftwareIdentifier = "libLAS 1.7.0";
 
 
 Header::Header() : m_schema(ePointFormat3)
diff -r 6a035fab789a -r 99b847df8d21 src/schema.cpp
--- a/src/schema.cpp	Wed Jun 22 10:47:01 2011 -0500
+++ b/src/schema.cpp	Wed Jun 22 11:08:52 2011 -0500
@@ -189,9 +189,9 @@
             "angle (rounded to the nearest integer in the absolute "
             "value sense) at which the laser point was output from the "
             "laser system including the roll of the aircraft. The scan "
-            "angle is within 1 degree of accuracy from +90 to –90 degrees. "
+            "angle is within 1 degree of accuracy from +90 to -90 degrees. "
             "The scan angle is an angle based on 0 degrees being nadir, "
-            "and –90 degrees to the left side of the aircraft in the "
+            "and -90 degrees to the left side of the aircraft in the "
             "direction of flight.";
     scan_angle.SetDescription(text.str());
     scan_angle.IsSigned(true);
@@ -202,7 +202,7 @@
     text.str("");
     
     Dimension user_data("User Data", 8);
-    text << "This field may be used at the user’s discretion";
+    text << "This field may be used at the user's discretion";
     user_data.SetDescription(text.str());
 
     AddDimension(user_data);


More information about the Liblas-commits mailing list