[Liblas-commits] hg: 3 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri Jul 30 20:15:50 EDT 2010
changeset fc5f201229ea in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=fc5f201229ea
summary: Removed <liblas/cstdint.hpp> and ported libLAS library to <boost/cstdint.hpp>.
changeset 586337dd4b78 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=586337dd4b78
summary: Removed <liblas/cstdint.hpp> and ported libLAS unit tests to <boost/cstdint.hpp>.
changeset f60c9acafb82 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=f60c9acafb82
summary: Removed <liblas/cstdint.hpp> and ported libLAS applications to <boost/cstdint.hpp>.
diffstat:
apps/las2las2.cpp | 8 +-
apps/las2oci.cpp | 1 -
apps/las2ogr.cpp | 2 +-
apps/las2txt.c | 4 +-
apps/lasblock.cpp | 16 +-
apps/lascommon.c | 22 +-
apps/lasindex.cpp | 4 +-
apps/lasinfo.c | 8 +-
apps/ts2las.hpp | 1 -
include/liblas/capi/liblas.h | 194 ++++++++++++-------------
include/liblas/cstdint.hpp | 173 -----------------------
include/liblas/detail/reader/header.hpp | 1 -
include/liblas/detail/reader/point.hpp | 1 -
include/liblas/detail/reader/reader.hpp | 28 +--
include/liblas/detail/utility.hpp | 28 +---
include/liblas/detail/writer/base.hpp | 21 +--
include/liblas/detail/writer/header.hpp | 13 +-
include/liblas/detail/writer/point.hpp | 12 +-
include/liblas/detail/writer/writer.hpp | 11 +-
include/liblas/guid.hpp | 26 +-
include/liblas/lasbounds.hpp | 15 +-
include/liblas/lasclassification.hpp | 53 +-----
include/liblas/lasfilter.hpp | 20 +-
include/liblas/lasheader.hpp | 28 +--
include/liblas/laspoint.hpp | 100 ++++++-------
include/liblas/lasschema.hpp | 44 ++---
include/liblas/lasspatialreference.hpp | 2 -
include/liblas/lasvariablerecord.hpp | 1 -
include/liblas/liblas.hpp | 11 +-
src/CMakeLists.txt | 1 -
src/detail/reader/header.cpp | 16 +-
src/detail/reader/point.cpp | 67 ++++----
src/detail/reader/reader.cpp | 101 ++++++-------
src/detail/writer/base.cpp | 14 +-
src/detail/writer/header.cpp | 32 ++-
src/detail/writer/point.cpp | 54 +++---
src/las_c_api.cpp | 236 ++++++++++++++++---------------
src/lasbounds.cpp | 29 +--
src/lasclassification.cpp | 43 +++++-
src/laserror.cpp | 1 -
src/lasfilter.cpp | 20 +-
src/lasheader.cpp | 11 +-
src/laspoint.cpp | 7 +-
src/lasschema.cpp | 41 ++--
src/lasspatialreference.cpp | 21 +-
src/lastransform.cpp | 24 ++-
src/lasvariablerecord.cpp | 2 +-
test/sample/read.cpp | 1 -
test/unit/common.cpp | 26 ++-
test/unit/guid_test.cpp | 18 +-
test/unit/lasclassification_test.cpp | 1 -
test/unit/lasheader_test.cpp | 10 +-
test/unit/laspoint_test.cpp | 49 +++---
test/unit/lasreader_iterator_test.cpp | 10 +-
test/unit/lasreader_test.cpp | 1 -
test/unit/lasspatialreference_test.cpp | 1 -
test/unit/lasvariablerecord_test.cpp | 17 +-
test/unit/laswriter_test.cpp | 1 -
58 files changed, 728 insertions(+), 975 deletions(-)
diffs (truncated from 4616 to 300 lines):
diff -r c92131892c45 -r f60c9acafb82 apps/las2las2.cpp
--- a/apps/las2las2.cpp Sat Jul 31 00:10:25 2010 +0100
+++ b/apps/las2las2.cpp Sat Jul 31 01:15:32 2010 +0100
@@ -16,7 +16,7 @@
#include <liblas/lasreader.hpp>
#include <liblas/laswriter.hpp>
#include <liblas/lasfilter.hpp>
-#include <liblas/cstdint.hpp>
+#include <liblas/liblas.hpp>
#include <fstream>
#include <iostream>
@@ -97,7 +97,7 @@
int rc = 0;
std::vector<std::string> tokens;
- std::vector<liblas::uint8_t> classes;
+ std::vector<boost::uint8_t> classes;
std::vector<double> bounds;
std::vector<liblas::FilterI*> filters;
@@ -220,8 +220,8 @@
//
// Translation of points cloud to features set
//
- liblas::uint32_t i = 0;
- liblas::uint32_t const size = reader.GetHeader().GetPointRecordsCount();
+ boost::uint32_t i = 0;
+ boost::uint32_t const size = reader.GetHeader().GetPointRecordsCount();
while (reader.ReadNextPoint())
{
diff -r c92131892c45 -r f60c9acafb82 apps/las2oci.cpp
--- a/apps/las2oci.cpp Sat Jul 31 00:10:25 2010 +0100
+++ b/apps/las2oci.cpp Sat Jul 31 01:15:32 2010 +0100
@@ -7,7 +7,6 @@
#include "oci_wrapper.h"
-#include <liblas/cstdint.hpp>
#include <liblas/detail/utility.hpp>
#include <liblas/laspoint.hpp>
diff -r c92131892c45 -r f60c9acafb82 apps/las2ogr.cpp
--- a/apps/las2ogr.cpp Sat Jul 31 00:10:25 2010 +0100
+++ b/apps/las2ogr.cpp Sat Jul 31 01:15:32 2010 +0100
@@ -22,7 +22,7 @@
#include <liblas/liblas.hpp>
#include <liblas/laspoint.hpp>
#include <liblas/lasreader.hpp>
-#include <liblas/cstdint.hpp>
+
//std
#include <cassert>
#include <algorithm>
diff -r c92131892c45 -r f60c9acafb82 apps/las2txt.c
--- a/apps/las2txt.c Sat Jul 31 00:10:25 2010 +0100
+++ b/apps/las2txt.c Sat Jul 31 01:15:32 2010 +0100
@@ -111,7 +111,7 @@
FILE* file_out = NULL;
int len;
- uint32_t index = 0;
+ unsigned int index = 0;
for (i = 1; i < argc; i++)
{
@@ -538,7 +538,7 @@
fprintf(file_out, "%d", LASColor_GetBlue(color));
break;
case 'M':
- fprintf(file_out, "%d", index);
+ fprintf(file_out, "%u", index);
break;
case 'p':
fprintf(file_out, "%d", LASPoint_GetPointSourceId(p));
diff -r c92131892c45 -r f60c9acafb82 apps/lasblock.cpp
--- a/apps/lasblock.cpp Sat Jul 31 00:10:25 2010 +0100
+++ b/apps/lasblock.cpp Sat Jul 31 01:15:32 2010 +0100
@@ -9,17 +9,14 @@
// (See accompanying file LICENSE.txt or copy at
// http://www.opensource.org/licenses/bsd-license.php)
//
-
-
+#include <liblas/liblas.hpp>
#include <liblas/lasreader.hpp>
#include <liblas/lasbounds.hpp>
#include "chipper.hpp"
-
-
+// std
#include <fstream>
#include <vector>
-
#ifdef _WIN32
#define compare_no_case(a,b,n) _strnicmp( (a), (b), (n) )
#else
@@ -123,14 +120,14 @@
std::cout << "Blocking " << input<< " to " << output <<std::endl;
- liblas::uint32_t num_blocks = c.GetBlockCount();
+ boost::uint32_t num_blocks = c.GetBlockCount();
std::cout << "Block count: " << num_blocks << std::endl;
- for ( liblas::uint32_t i = 0; i < num_blocks; ++i )
+ for ( boost::uint32_t i = 0; i < num_blocks; ++i )
{
const liblas::chipper::Block& b = c.GetBlock(i);
- std::vector<liblas::uint32_t> ids = b.GetIDs();
+ std::vector<boost::uint32_t> ids = b.GetIDs();
out << i << " " << ids.size() << " ";
out.setf(std::ios::dec, std::ios::floatfield);
@@ -138,7 +135,7 @@
out << b.GetXmin() << " " << b.GetYmin() << " " << b.GetXmax() << " " << b.GetYmax()<< " " ;
- for ( liblas::uint32_t pi = 0; pi < ids.size(); ++pi )
+ for ( boost::uint32_t pi = 0; pi < ids.size(); ++pi )
{
out << ids[pi] << " ";
}
@@ -147,5 +144,4 @@
out << std::endl;
}
-
}
diff -r c92131892c45 -r f60c9acafb82 apps/lascommon.c
--- a/apps/lascommon.c Sat Jul 31 00:10:25 2010 +0100
+++ b/apps/lascommon.c Sat Jul 31 01:15:32 2010 +0100
@@ -52,13 +52,11 @@
LASColorH min_color = NULL;
LASColorH max_color = NULL;
- uint8_t cls = 0;
- uint16_t red = 0;
- uint16_t green = 0;
- uint16_t blue = 0;
-
- uint16_t ptsrc = 0;
-
+ unsigned char cls = 0;
+ unsigned short red = 0;
+ unsigned short green = 0;
+ unsigned short blue = 0;
+ unsigned short ptsrc = 0;
int i = 0;
summary = (LASPointSummary*) malloc(sizeof(LASPointSummary));
@@ -366,7 +364,7 @@
fprintf(file, "\n Total Pulses: %ld\n", rgpsum);
for (i = 0; i < 5; i++) {
- if (LASHeader_GetPointRecordsByReturnCount(header, i) != (uint32_t)summary->number_of_points_by_return[i])
+ if (LASHeader_GetPointRecordsByReturnCount(header, i) != (unsigned int)summary->number_of_points_by_return[i])
{
fprintf(file, " \n Actual number of points by return \n is different from header (actual, header):\n");
for (i = 0; i < 5; i++) {
@@ -412,12 +410,12 @@
char *pszVLRUser = NULL;
char *pszVLRDescription = NULL;
- uint16_t nVLRLength = 0;
- uint16_t nVLRRecordId = 0;
+ unsigned short nVLRLength = 0;
+ unsigned short nVLRRecordId = 0;
LASVLRH pVLR = NULL;
LASSRSH pSRS = NULL;
- uint32_t nVLR = 0;
+ unsigned int nVLR = 0;
int i = 0;
#ifdef HAVE_LIBGEOTIFF
@@ -630,7 +628,7 @@
for (i = 0; i < 5; i++) {
if (LASHeader_GetPointRecordsByReturnCount(header, i) !=
- (uint8_t)summary->number_of_points_by_return[i])
+ (unsigned char)summary->number_of_points_by_return[i])
{
update_return_counts = TRUE;
break;
diff -r c92131892c45 -r f60c9acafb82 apps/lasindex.cpp
--- a/apps/lasindex.cpp Sat Jul 31 00:10:25 2010 +0100
+++ b/apps/lasindex.cpp Sat Jul 31 01:15:32 2010 +0100
@@ -1,4 +1,3 @@
-#include <liblas/cstdint.hpp>
#include <liblas/detail/utility.hpp>
#include <liblas/laswriter.hpp>
@@ -9,7 +8,6 @@
#include <liblas/lasvariablerecord.hpp>
#include <liblas/index/index.hpp>
-
#include <cstring>
#include <iterator>
#include <iterator>
@@ -63,7 +61,7 @@
index->insert(const_cast<liblas::Point&>(p), id);
}
- detail::ignore_unused_variable_warning(dimension);
+ boost::ignore_unused_variable_warning(dimension);
}
int main(int argc, char* argv[])
{
diff -r c92131892c45 -r f60c9acafb82 apps/lasinfo.c
--- a/apps/lasinfo.c Sat Jul 31 00:10:25 2010 +0100
+++ b/apps/lasinfo.c Sat Jul 31 01:15:32 2010 +0100
@@ -96,8 +96,8 @@
char *system_identifier = NULL;
char *generating_software = NULL;
- uint8_t file_creation_day = 0;
- uint8_t file_creation_year = 0;
+ unsigned char file_creation_day = 0;
+ unsigned char file_creation_year = 0;
int err = 0;
@@ -193,9 +193,9 @@
/* XXX - mloskot: Consider replacing atoi with strtol,
see http://www.iso-9899.info/wiki/Converting */
i++;
- file_creation_day = (uint8_t)atoi(argv[i]);
+ file_creation_day = (unsigned char)atoi(argv[i]);
i++;
- file_creation_year = (uint8_t)atoi(argv[i]);
+ file_creation_year = (unsigned char)atoi(argv[i]);
change_header = TRUE;
}
else if (strcmp(argv[i],"--skip_vlr") == 0 || strcmp(argv[i],"--no_vlr") == 0)
diff -r c92131892c45 -r f60c9acafb82 apps/ts2las.hpp
--- a/apps/ts2las.hpp Sat Jul 31 00:10:25 2010 +0100
+++ b/apps/ts2las.hpp Sat Jul 31 01:15:32 2010 +0100
@@ -1,6 +1,5 @@
#ifndef TS2LAS_HPP_INCLUDED
-#include <liblas/cstdint.hpp>
#include <liblas/detail/utility.hpp>
#include <liblas/laswriter.hpp>
diff -r c92131892c45 -r f60c9acafb82 include/liblas/capi/liblas.h
--- a/include/liblas/capi/liblas.h Sat Jul 31 00:10:25 2010 +0100
+++ b/include/liblas/capi/liblas.h Sat Jul 31 01:15:32 2010 +0100
@@ -42,17 +42,11 @@
#ifndef LIBLAS_H_INCLUDED
#define LIBLAS_H_INCLUDED
-
-
#define LIBLAS_C_API 1
#include "las_version.h"
#include "las_config.h"
-
-#include <liblas/cstdint.hpp>
-
-
typedef struct LASWriterHS *LASWriterH;
typedef struct LASReaderHS *LASReaderH;
typedef struct LASPointHS *LASPointH;
@@ -99,17 +93,17 @@
double t;
double x, y, z;
- uint16_t intensity;
- uint8_t cls;
- int8_t scan_angle;
- uint8_t user_data;
- uint16_t retnum;
- uint16_t numret;
- uint16_t scandir;
- uint16_t fedge;
- uint16_t red;
- uint16_t green;
- uint16_t blue;
+ unsigned short intensity;
+ unsigned char cls;
+ char scan_angle;
+ unsigned char user_data;
+ unsigned short retnum;
+ unsigned short numret;
+ unsigned short scandir;
+ unsigned short fedge;
+ unsigned short red;
+ unsigned short green;
+ unsigned short blue;
long rgpsum;
int number_of_point_records;
int number_of_points_by_return[8];
@@ -222,7 +216,7 @@
More information about the Liblas-commits
mailing list