-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.47..v0.2.48 changeset DataConverter.cpp
Garret Voltz edited this page Sep 27, 2019
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/DataConverter.cpp b/hoot-core/src/main/cpp/hoot/core/io/DataConverter.cpp
index fade53a..eced310 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/DataConverter.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/io/DataConverter.cpp
@@ -186,6 +186,11 @@ void DataConverter::setConfiguration(const Settings& conf)
LOG_VARD(_convertOps);
}
+void DataConverter::convert(const QString& input, const QString& output)
+{
+ convert(QStringList(input), output);
+}
+
void DataConverter::convert(const QStringList& inputs, const QString& output)
{
_validateInput(inputs, output);
@@ -339,7 +344,8 @@ void DataConverter::_transToOgrMT(const QString& input, const QString& output)
std::vector<ScriptToOgrSchemaTranslator::TranslatedFeature>>> transFeaturesQ;
bool finishedTranslating = false;
- // Read all elements; TODO: We should figure out a way to make this not-memory bound in the future
+ // Read all elements
+ // TODO: We should figure out a way to make this not-memory bound in the future
_fillElementCache(input, pElementCache, elementQ);
LOG_DEBUG("Element Cache Filled");
@@ -396,6 +402,9 @@ void DataConverter::_convertToOgr(const QString& input, const QString& output)
LOG_VARD(OsmMapReaderFactory::hasElementInputStream(input));
if (OsmMapReaderFactory::hasElementInputStream(input) &&
// multithreaded code doesn't support conversion ops. could it?
+ // TODO: if we have a single convert op that is a SchemaTranslationOp or
+ // SchemaTranslationVisitor should we pop it off and then run multithreaded with that
+ // translation?...seems like we should
_convertOps.size() == 0 &&
// multithreaded code doesn't support a bounds...not sure if it could be made to at some point
!ConfigUtils::boundsOptionEnabled())
@@ -736,7 +745,7 @@ void DataConverter::_convert(const QStringList& inputs, const QString& output)
if (isStreamable)
{
- //Shape file output currently isn't streamable, so we know we won't see export cols here. If
+ //Shape file output currently isn't streamable, so we know we won't see export cols here. If
//it is ever made streamable, then we'd have to refactor this.
assert(!_shapeFileColumnsSpecified());