[Liblas-commits] hg: new LASzip location -- default to OSGeo4W
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue Jan 11 14:48:22 EST 2011
details: http://hg.liblas.orghg/rev/2040bbe3eb04
changeset: 2729:2040bbe3eb04
user: Howard Butler <hobu.inc at gmail.com>
date: Tue Jan 11 13:47:10 2011 -0600
description:
new LASzip location -- default to OSGeo4W
Subject: hg: thanks for wasting my afternoon windows macro hell -- we should now compile with windows.h in the way now though
details: http://hg.liblas.orghg/rev/ebb180b1401d
changeset: 2730:ebb180b1401d
user: Howard Butler <hobu.inc at gmail.com>
date: Tue Jan 11 13:47:52 2011 -0600
description:
thanks for wasting my afternoon windows macro hell -- we should now compile with windows.h in the way now though
Subject: hg: merge
details: http://hg.liblas.orghg/rev/73efc4f893d9
changeset: 2731:73efc4f893d9
user: Howard Butler <hobu.inc at gmail.com>
date: Tue Jan 11 13:48:01 2011 -0600
description:
merge
diffstat:
apps/las2las.cpp | 51 +---------
apps/las2oci.cpp | 44 ++++----
apps/las2ogr.cpp | 2 +-
apps/lasblock.cpp | 2 +-
apps/lasindex_test.cpp | 60 +++++-----
apps/laskernel.cpp | 34 +++---
hobu-config.bat | 4 +-
include/liblas/bounds.hpp | 26 ++--
include/liblas/classification.hpp | 8 +
include/liblas/factory.hpp | 9 +
include/liblas/index.hpp | 42 ++++----
include/liblas/utility.hpp | 8 +-
src/detail/index/indexoutput.cpp | 22 ++--
src/factory.cpp | 39 +++++++
src/header.cpp | 16 +-
src/index.cpp | 22 ++--
src/point.cpp | 9 +-
src/transform.cpp | 24 ++--
src/utility.cpp | 196 +++++++++++++++++++-------------------
test/unit/common.hpp | 24 ++--
20 files changed, 330 insertions(+), 312 deletions(-)
diffs (truncated from 1451 to 300 lines):
diff -r d2d8c52cdfcf -r 73efc4f893d9 apps/las2las.cpp
--- a/apps/las2las.cpp Tue Jan 11 11:19:16 2011 -0600
+++ b/apps/las2las.cpp Tue Jan 11 13:48:01 2011 -0600
@@ -16,14 +16,6 @@
#include <boost/foreach.hpp>
#include <boost/shared_ptr.hpp>
-//#define USE_BOOST_IO
-#ifdef USE_BOOST_IO
-#include <ostream>
-#include <boost/iostreams/device/file.hpp>
-#include <boost/iostreams/stream.hpp>
-#include <boost/iostreams/stream_buffer.hpp>
-#endif
-
namespace po = boost::program_options;
using namespace liblas;
@@ -33,44 +25,11 @@
typedef boost::shared_ptr<liblas::CoordinateSummary> SummaryPtr;
-static std::ostream* FileCreate(std::string const& filename)
-{
-#ifdef USE_BOOST_IO
- namespace io = boost::iostreams;
- io::stream<io::file_sink>* ofs = new io::stream<io::file_sink>();
- ofs->open(filename.c_str(), std::ios::out | std::ios::binary);
- if (ofs->is_open() == false) return NULL;
- return ofs;
-#else
- std::ofstream* ofs = new std::ofstream();
- ofs->open(filename.c_str(), std::ios::out | std::ios::binary);
- if (ofs->is_open() == false) return NULL;
- return ofs;
-#endif
-}
-
-static std::istream* FileOpen(std::string const& filename)
-{
-#ifdef USE_BOOST_IO
- namespace io = boost::iostreams;
- io::stream<io::file_source>* ifs = new io::stream<io::file_source>();
- ifs->open(filename.c_str(), std::ios::in | std::ios::binary);
- if (ifs->is_open() == false) return NULL;
- return ifs;
-#else
- std::ifstream* ifs = new std::ifstream();
- ifs->open(filename.c_str(), std::ios::in | std::ios::binary);
- if (ifs->is_open() == false) return NULL;
- return ifs;
-#endif
-}
-
-
WriterPtr start_writer( std::ostream*& ofs,
std::string const& output,
liblas::Header const& header)
{
- ofs = FileCreate(output);
+ ofs = WriterFactory::FileCreate(output);
if (!ofs)
{
std::ostringstream oss;
@@ -80,7 +39,6 @@
WriterPtr writer( new liblas::Writer(*ofs, header));
return writer;
-
}
bool process( std::istream& ifs,
@@ -93,9 +51,6 @@
bool verbose,
bool min_offset)
{
-
-
-
liblas::ReaderFactory f;
liblas::Reader reader = f.CreateWithStream(ifs);
SummaryPtr summary(new::liblas::CoordinateSummary);
@@ -336,7 +291,7 @@
if (verbose)
std::cout << "Opening " << input << " to fetch Header" << std::endl;
- std::istream* ifs = FileOpen(input);
+ std::istream* ifs = ReaderFactory::FileOpen(input);
if (!ifs)
{
std::cerr << "Cannot open " << input << " for read. Exiting..." << std::endl;
@@ -410,7 +365,7 @@
break;
}
- std::istream* ifs = FileOpen(input);
+ std::istream* ifs = ReaderFactory::FileOpen(input);
if (!ifs)
{
std::cerr << "Cannot open " << input << " for read. Exiting..." << std::endl;
diff -r d2d8c52cdfcf -r 73efc4f893d9 apps/las2oci.cpp
--- a/apps/las2oci.cpp Tue Jan 11 11:19:16 2011 -0600
+++ b/apps/las2oci.cpp Tue Jan 11 13:48:01 2011 -0600
@@ -78,15 +78,15 @@
liblas::Bounds<double> const& extent)
{
- statement->AddElement(ordinates, extent.min(0));
- statement->AddElement(ordinates, extent.min(1));
+ statement->AddElement(ordinates, (extent.min)(0));
+ statement->AddElement(ordinates, (extent.min)(1));
if (extent.dimension() > 2)
- statement->AddElement(ordinates, extent.min(2));
+ statement->AddElement(ordinates, (extent.min)(2));
- statement->AddElement(ordinates, extent.max(0));
- statement->AddElement(ordinates, extent.max(1));
+ statement->AddElement(ordinates, (extent.max)(0));
+ statement->AddElement(ordinates, (extent.max)(1));
if (extent.dimension() > 2)
- statement->AddElement(ordinates, extent.max(2));
+ statement->AddElement(ordinates, (extent.max)(2));
}
@@ -332,9 +332,9 @@
liblas::Bounds<double> e = *query->bounds.get();
if (IsGeographic(connection, srid)) {
- e.min(0,-180.0); e.max(0,180.0);
- e.min(1,-90.0); e.max(1,90.0);
- e.min(2,0.0); e.max(2,20000.0);
+ (e.min)(0,-180.0); (e.max)(0,180.0);
+ (e.min)(1,-90.0); (e.max)(1,90.0);
+ (e.min)(2,0.0); (e.max)(2,20000.0);
tolerance = 0.000000005;
}
@@ -348,12 +348,12 @@
oss << "INSERT INTO user_sdo_geom_metadata VALUES ('" << tableName <<
"','blk_extent', MDSYS.SDO_DIM_ARRAY(";
- oss << "MDSYS.SDO_DIM_ELEMENT('X', " << e.min(0) << "," << e.max(0) <<"," << tolerance << "),"
- "MDSYS.SDO_DIM_ELEMENT('Y', " << e.min(1) << "," << e.max(1) <<"," << tolerance << ")";
+ oss << "MDSYS.SDO_DIM_ELEMENT('X', " << (e.min)(0) << "," << (e.max)(0) <<"," << tolerance << "),"
+ "MDSYS.SDO_DIM_ELEMENT('Y', " << (e.min)(1) << "," << (e.max)(1) <<"," << tolerance << ")";
if (bUse3d) {
oss << ",";
- oss <<"MDSYS.SDO_DIM_ELEMENT('Z', "<< e.min(2) << "," << e.max(2) << "," << tolerance << ")";
+ oss <<"MDSYS.SDO_DIM_ELEMENT('Z', "<< (e.min)(2) << "," << (e.max)(2) << "," << tolerance << ")";
}
oss << ")," << s_srid.str() << ")";
@@ -467,16 +467,16 @@
" mdsys.sdo_elem_info_array"<< s_eleminfo.str() <<",\n"
" mdsys.sdo_ordinate_array(\n";
- s_geom << e.min(0) << "," << e.min(1) << ",";
+ s_geom << (e.min)(0) << "," << (e.min)(1) << ",";
if (bUse3d) {
- s_geom << e.min(2) << ",";
+ s_geom << (e.min)(2) << ",";
}
- s_geom << e.max(0) << "," << e.max(1);
+ s_geom << (e.max)(0) << "," << (e.max)(1);
if (bUse3d) {
- s_geom << "," << e.max(2);
+ s_geom << "," << (e.max)(2);
}
s_geom << "))";
@@ -952,42 +952,42 @@
if (vm.count("xmin"))
{
double xmin = vm["xmin"].as< double >();
- global_extent.min(0, xmin);
+ (global_extent.min)(0, xmin);
if (verbose)
std::cout << "Setting xmin to: " << xmin << std::endl;
}
if (vm.count("ymin"))
{
double ymin = vm["ymin"].as< double >();
- global_extent.min(1, ymin);
+ (global_extent.min)(1, ymin);
if (verbose)
std::cout << "Setting ymin to: " << ymin << std::endl;
}
if (vm.count("zmin"))
{
double zmin = vm["zmin"].as< double >();
- global_extent.min(2, zmin);
+ (global_extent.min)(2, zmin);
if (verbose)
std::cout << "Setting zmin to: " << zmin << std::endl;
}
if (vm.count("xmax"))
{
double xmax = vm["xmax"].as< double >();
- global_extent.max(0, xmax);
+ (global_extent.max)(0, xmax);
if (verbose)
std::cout << "Setting xmax to: " << xmax << std::endl;
}
if (vm.count("ymax"))
{
double ymax = vm["ymax"].as< double >();
- global_extent.max(1, ymax);
+ (global_extent.max)(1, ymax);
if (verbose)
std::cout << "Setting ymax to: " << ymax << std::endl;
}
if (vm.count("zmax"))
{
double zmax = vm["zmax"].as< double >();
- global_extent.max(2, zmax);
+ (global_extent.max)(2, zmax);
if (verbose)
std::cout << "Setting zmax to: " << zmax << std::endl;
}
diff -r d2d8c52cdfcf -r 73efc4f893d9 apps/las2ogr.cpp
--- a/apps/las2ogr.cpp Tue Jan 11 11:19:16 2011 -0600
+++ b/apps/las2ogr.cpp Tue Jan 11 13:48:01 2011 -0600
@@ -94,7 +94,7 @@
static int lastTick = -1;
int tick = static_cast<int>(complete * 40.0);
- tick = (std::min)(40, std::max(0, tick));
+ tick = (std::min)(40, (std::max)(0, tick));
// Have we started a new progress run?
if (tick < lastTick && lastTick >= 39)
diff -r d2d8c52cdfcf -r 73efc4f893d9 apps/lasblock.cpp
--- a/apps/lasblock.cpp Tue Jan 11 11:19:16 2011 -0600
+++ b/apps/lasblock.cpp Tue Jan 11 13:48:01 2011 -0600
@@ -166,7 +166,7 @@
out.setf(std::ios::fixed,std::ios::floatfield);
out.precision(precision);
liblas::Bounds<double> const& bnd = b.GetBounds();
- out << bnd.min(0) << " " << bnd.min(1) << " " << bnd.max(0) << " " << bnd.max(1) << " " ;
+ out << (bnd.min)(0) << " " << (bnd.min)(1) << " " << (bnd.max)(0) << " " << (bnd.max)(1) << " " ;
for ( boost::uint32_t pi = 0; pi < ids.size(); ++pi )
{
diff -r d2d8c52cdfcf -r 73efc4f893d9 apps/lasindex_test.cpp
--- a/apps/lasindex_test.cpp Tue Jan 11 11:19:16 2011 -0600
+++ b/apps/lasindex_test.cpp Tue Jan 11 13:48:01 2011 -0600
@@ -631,60 +631,60 @@
{
CovgStr = "middle half of all 3 axes";
filterBounds = Bounds<double>
- (indexBounds.min(0) + .25 * RangeX,
- indexBounds.min(1) + .25 * RangeY,
- indexBounds.min(2) + .25 * RangeZ,
- indexBounds.max(0) - .25 * RangeX,
- indexBounds.max(1) - .25 * RangeY,
- indexBounds.max(2) - .25 * RangeZ);
+ ((indexBounds.min)(0) + .25 * RangeX,
+ (indexBounds.min)(1) + .25 * RangeY,
+ (indexBounds.min)(2) + .25 * RangeZ,
+ (indexBounds.max)(0) - .25 * RangeX,
+ (indexBounds.max)(1) - .25 * RangeY,
+ (indexBounds.max)(2) - .25 * RangeZ);
break;
} // 1
case 2:
{
CovgStr = "upper left, all Z range";
filterBounds = Bounds<double>
- (indexBounds.min(0),
- indexBounds.min(1) + .5 * RangeY,
- indexBounds.min(2),
- indexBounds.min(0) + .5 * RangeX,
- indexBounds.max(1),
- indexBounds.max(2));
+ ((indexBounds.min)(0),
+ (indexBounds.min)(1) + .5 * RangeY,
+ (indexBounds.min)(2),
+ (indexBounds.min)(0) + .5 * RangeX,
+ (indexBounds.max)(1),
+ (indexBounds.max)(2));
break;
} // 2
case 3:
{
CovgStr = "upper right, all Z range";
filterBounds = Bounds<double>
- (indexBounds.min(0) + .5 * RangeX,
- indexBounds.min(1) + .5 * RangeY,
- indexBounds.min(2),
- indexBounds.max(0),
- indexBounds.max(1),
- indexBounds.max(2));
+ ((indexBounds.min)(0) + .5 * RangeX,
+ (indexBounds.min)(1) + .5 * RangeY,
+ (indexBounds.min)(2),
More information about the Liblas-commits
mailing list