[Liblas-commits] hg-main-tree: more oci reader scaffolding
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Mar 28 13:57:33 EDT 2011
details: http://hg.libpc.orghg-main-tree/rev/3bbf7cfb2d83
changeset: 479:3bbf7cfb2d83
user: Howard Butler <hobu.inc at gmail.com>
date: Mon Mar 28 12:57:26 2011 -0500
description:
more oci reader scaffolding
diffstat:
include/libpc/drivers/oci/Reader.hpp | 4 ++++
src/drivers/oci/Reader.cpp | 32 ++++++++++++++++++++++++++++++++
src/drivers/oci/Writer.cpp | 4 +++-
src/drivers/oci/common.cpp | 2 ++
4 files changed, 41 insertions(+), 1 deletions(-)
diffs (109 lines):
diff -r d21db9f1cdc2 -r 3bbf7cfb2d83 include/libpc/drivers/oci/Reader.hpp
--- a/include/libpc/drivers/oci/Reader.hpp Mon Mar 28 12:03:53 2011 -0500
+++ b/include/libpc/drivers/oci/Reader.hpp Mon Mar 28 12:57:26 2011 -0500
@@ -38,6 +38,7 @@
#include <libpc/libpc.hpp>
#include <libpc/Stage.hpp>
+#include <libpc/drivers/oci/Common.hpp>
namespace libpc { namespace driver { namespace oci {
@@ -72,8 +73,11 @@
Reader(const Reader&); // not implemented
//
+ void Debug();
Options& m_options;
+ Connection m_connection;
+ bool m_verbose;
};
}}} // namespace libpc::driver::oci
diff -r d21db9f1cdc2 -r 3bbf7cfb2d83 src/drivers/oci/Reader.cpp
--- a/src/drivers/oci/Reader.cpp Mon Mar 28 12:03:53 2011 -0500
+++ b/src/drivers/oci/Reader.cpp Mon Mar 28 12:57:26 2011 -0500
@@ -37,6 +37,7 @@
#include <libpc/exceptions.hpp>
+#include <iostream>
namespace libpc { namespace driver { namespace oci {
@@ -44,10 +45,41 @@
Reader::Reader(Options& options)
: libpc::Stage()
, m_options(options)
+ , m_verbose(false)
{
+
}
+void Reader::Debug()
+{
+ bool debug = m_options.IsDebug();
+
+ if (debug)
+ {
+ m_verbose = true;
+ }
+
+ CPLPopErrorHandler();
+
+ if (debug)
+ {
+ const char* gdal_debug = Utils::getenv("CPL_DEBUG");
+ if (gdal_debug == 0)
+ {
+ Utils::putenv("CPL_DEBUG=ON");
+ }
+
+ const char* gdal_debug2 = getenv("CPL_DEBUG");
+ std::cout << "Setting GDAL debug handler CPL_DEBUG=" << gdal_debug2 << std::endl;
+ CPLPushErrorHandler(OCIGDALDebugErrorHandler);
+
+ }
+ else
+ {
+ CPLPushErrorHandler(OCIGDALErrorHandler);
+ }
+}
const std::string& Reader::getName() const
{
diff -r d21db9f1cdc2 -r 3bbf7cfb2d83 src/drivers/oci/Writer.cpp
--- a/src/drivers/oci/Writer.cpp Mon Mar 28 12:03:53 2011 -0500
+++ b/src/drivers/oci/Writer.cpp Mon Mar 28 12:57:26 2011 -0500
@@ -47,7 +47,6 @@
Writer::Writer(Stage& prevStage, Options& options)
: libpc::Writer(prevStage)
, m_stage(prevStage)
- // , m_chipper(m_stage, options.GetPTree().get<boost::uint32_t>("capacity") )
, m_options(options)
, m_verbose(false)
{
@@ -439,6 +438,9 @@
std::string base_table_aux_columns = to_upper(tree.get<std::string>("base_table_aux_columns"));
std::string base_table_aux_values = to_upper(tree.get<std::string>("base_table_aux_values"));
std::string header_blob_column_name = to_upper(tree.get<std::string>("header_blob_column_name"));
+ std::string base_table_boundary_column = to_upper(tree.get<std::string>("base_table_boundary_column"));
+ std::string base_table_boundary_wkt = to_upper(tree.get<std::string>("base_table_boundary_wkt"));
+
boost::uint32_t srid = tree.get<boost::uint32_t>("srid");
boost::uint32_t precision = tree.get<boost::uint32_t>("precision");
boost::uint32_t capacity = tree.get<boost::uint32_t>("capacity");
diff -r d21db9f1cdc2 -r 3bbf7cfb2d83 src/drivers/oci/common.cpp
--- a/src/drivers/oci/common.cpp Mon Mar 28 12:03:53 2011 -0500
+++ b/src/drivers/oci/common.cpp Mon Mar 28 12:57:26 2011 -0500
@@ -66,6 +66,8 @@
m_tree.put("header_blob_column_name", std::string("header"));
m_tree.put("base_table_aux_columns", std::string(""));
m_tree.put("base_table_aux_values", std::string(""));
+ m_tree.put("base_table_boundary_column", std::string(""));
+ m_tree.put("base_table_boundary_wkt", std::string(""));
m_tree.put("pre_block_sql", std::string(""));
m_tree.put("pre_sql", std::string(""));
m_tree.put("post_block_sql", std::string(""));
More information about the Liblas-commits
mailing list