[Liblas-commits] hg: fix up binding ordering in the case where we
set a boundary ...
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Apr 4 10:35:49 EDT 2011
details: http://hg.liblas.orghg/rev/d7dcf2c53220
changeset: 2913:d7dcf2c53220
user: Howard Butler <hobu.inc at gmail.com>
date: Mon Apr 04 09:35:03 2011 -0500
description:
fix up binding ordering in the case where we set a boundary but not a header blob
Subject: hg: fix #221, remove arbitrary limits on SetCreationDOY and SetCreationYear
details: http://hg.liblas.orghg/rev/9ee1a064acb6
changeset: 2914:9ee1a064acb6
user: Howard Butler <hobu.inc at gmail.com>
date: Mon Apr 04 09:35:37 2011 -0500
description:
fix #221, remove arbitrary limits on SetCreationDOY and SetCreationYear
diffstat:
apps/las2oci.cpp | 11 ++++++++---
src/header.cpp | 7 -------
2 files changed, 8 insertions(+), 10 deletions(-)
diffs (52 lines):
diff -r b046bca41932 -r 9ee1a064acb6 apps/las2oci.cpp
--- a/apps/las2oci.cpp Wed Mar 30 14:09:18 2011 -0500
+++ b/apps/las2oci.cpp Mon Apr 04 09:35:37 2011 -0500
@@ -414,16 +414,21 @@
columns << cloudColumnName_u;
values << "pc";
}
-
+
+ int nPos = 1; // Bind column position
if (!header_blob_column_u.empty()){
columns << "," << header_blob_column_u;
- values <<", :2";
+ values <<", :" << nPos++;
}
if (!boundary_column_u.empty()){
columns << "," << boundary_column_u;
- values <<", SDO_GEOMETRY(:3, :4)";
+ nPos++;
+ values <<", SDO_GEOMETRY(:"<<nPos;
+ nPos++;
+ values <<", :"<<nPos<<")";
}
+
ostringstream s_srid;
diff -r b046bca41932 -r 9ee1a064acb6 src/header.cpp
--- a/src/header.cpp Wed Mar 30 14:09:18 2011 -0500
+++ b/src/header.cpp Mon Apr 04 09:35:37 2011 -0500
@@ -323,9 +323,6 @@
void Header::SetCreationDOY(uint16_t v)
{
- if (v > 366)
- throw std::out_of_range("day of year out of range");
-
m_createDOY = v;
}
@@ -336,10 +333,6 @@
void Header::SetCreationYear(uint16_t v)
{
- // mloskot: I've taken these values arbitrarily
- if (v > 9999)
- throw std::out_of_range("year out of range");
-
m_createYear = v;
}
More information about the Liblas-commits
mailing list