[Liblas-commits] hg-main-tree: include cpl_conv.h for CPLFree
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Apr 27 11:52:58 EDT 2011
details: http://hg.libpc.orghg-main-tree/rev/8a0aa6ef9df2
changeset: 671:8a0aa6ef9df2
user: Howard Butler <hobu.inc at gmail.com>
date: Wed Apr 27 10:52:25 2011 -0500
description:
include cpl_conv.h for CPLFree
Subject: hg-main-tree: include cpl_conv.h for CPLFree
details: http://hg.libpc.orghg-main-tree/rev/ca1b505c0d71
changeset: 672:ca1b505c0d71
user: Howard Butler <hobu.inc at gmail.com>
date: Wed Apr 27 10:52:35 2011 -0500
description:
include cpl_conv.h for CPLFree
Subject: hg-main-tree: add a_srs and compressed options for OCI writer
details: http://hg.libpc.orghg-main-tree/rev/85ab89e394f0
changeset: 673:85ab89e394f0
user: Howard Butler <hobu.inc at gmail.com>
date: Wed Apr 27 10:52:52 2011 -0500
description:
add a_srs and compressed options for OCI writer
diffstat:
apps/pc2pc.cpp | 19 +++++++++++++++++--
src/drivers/las/GeotiffSupport.cpp | 3 +++
src/drivers/las/GeotiffSupport.hpp | 1 +
3 files changed, 21 insertions(+), 2 deletions(-)
diffs (78 lines):
diff -r 69428f8f8ad1 -r 85ab89e394f0 apps/pc2pc.cpp
--- a/apps/pc2pc.cpp Wed Apr 27 10:41:41 2011 -0500
+++ b/apps/pc2pc.cpp Wed Apr 27 10:52:52 2011 -0500
@@ -57,6 +57,8 @@
std::string m_inputFile;
std::string m_outputFile;
std::string m_xml;
+ std::string m_srs;
+ bool m_bCompress;
};
@@ -92,9 +94,11 @@
file_options->add_options()
("input,i", po::value<std::string>(&m_inputFile), "input file name")
("output,o", po::value<std::string>(&m_outputFile), "output file name")
+ ("output,o", po::value<std::string>(&m_outputFile), "output file name")
("native", "use native LAS classes (not liblas)")
("oracle-writer", "Read data from LAS file and write to Oracle")
- ("oracle-reader", "Read data from Oracle and write LAS file")
+ ("a_srs", po::value<std::string>(&m_srs)->default_value(""), "Assign output coordinate system")
+ ("compress", po::value<bool>(&m_bCompress)->default_value(false),"Compress output data if available")
("xml", po::value<std::string>(&m_xml)->default_value("log.xml"), "XML file to load process (OCI only right now)")
;
@@ -178,7 +182,18 @@
libpc::drivers::las::LasWriter writer(reader, *ofs);
- // writer.setPointFormat( 3);
+
+
+ if (hasOption("a_srs"))
+ {
+ libpc::SpatialReference ref;
+ ref.setFromUserInput(m_srs);
+ writer.setSpatialReference(ref);
+ }
+ if (hasOption("compress"))
+ {
+ writer.setCompressed(true);
+ }
writer.write(numPoints);
boost::property_tree::ptree output_tree;
diff -r 69428f8f8ad1 -r 85ab89e394f0 src/drivers/las/GeotiffSupport.cpp
--- a/src/drivers/las/GeotiffSupport.cpp Wed Apr 27 10:41:41 2011 -0500
+++ b/src/drivers/las/GeotiffSupport.cpp Wed Apr 27 10:52:52 2011 -0500
@@ -38,15 +38,18 @@
#ifdef LIBPC_HAVE_GDAL
#include <geo_normalize.h>
#include <ogr_spatialref.h>
+
#endif
#include <sstream>
+
#include <boost/concept_check.hpp>
LIBPC_C_START
#ifdef __geotiff_h_
+
#ifdef GEO_NORMALIZE_H_INCLUDED
char LIBPC_DLL * GTIFGetOGISDefn(GTIF*, GTIFDefn*);
#endif
diff -r 69428f8f8ad1 -r 85ab89e394f0 src/drivers/las/GeotiffSupport.hpp
--- a/src/drivers/las/GeotiffSupport.hpp Wed Apr 27 10:41:41 2011 -0500
+++ b/src/drivers/las/GeotiffSupport.hpp Wed Apr 27 10:52:52 2011 -0500
@@ -39,6 +39,7 @@
#ifdef LIBPC_HAVE_LIBGEOTIFF
#include <geo_simpletags.h>
+#include <cpl_conv.h>
#endif
#include <string>
More information about the Liblas-commits
mailing list