From d256573c245df2b0d37fdb91cd915d6b0e73d8f5 Mon Sep 17 00:00:00 2001 From: Matt Jackson Date: Tue, 16 Jan 2024 10:22:52 +0000 Subject: [PATCH] append: Minor fixes. (#5741) * Minor fixes. refs: #5740 * Copyright fix refs: #5740 * update pg key --------- Co-authored-by: olearytd --- hoot-core/src/main/cpp/hoot/core/io/OgrWriter.cpp | 5 ++++- .../hoot/services/controllers/export/ExportCommand.java | 7 +++++-- scripts/schema/hootLibrary.py | 4 ++-- translations/translate.js | 6 +++--- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/hoot-core/src/main/cpp/hoot/core/io/OgrWriter.cpp b/hoot-core/src/main/cpp/hoot/core/io/OgrWriter.cpp index 19098669c5..4bc5a36325 100644 --- a/hoot-core/src/main/cpp/hoot/core/io/OgrWriter.cpp +++ b/hoot-core/src/main/cpp/hoot/core/io/OgrWriter.cpp @@ -22,7 +22,7 @@ * This will properly maintain the copyright information. Maxar * copyrights will be updated automatically. * - * @copyright Copyright (C) 2015-2023 Maxar (http://www.maxar.com/) + * @copyright Copyright (C) 2015-2024 Maxar (http://www.maxar.com/) */ #include "OgrWriter.h" @@ -654,7 +654,10 @@ void OgrWriter::_addFeature(OGRLayer* layer, const std::shared_ptr& f, // If the field DOESN'T exist in the output layer, skip it. if (poFeature->GetFieldIndex(ba.constData()) == -1) + { + LOG_DEBUG("Field " << ba.constData() << " does not exist. Skipping"); continue; + } switch (v.type()) { diff --git a/hoot-services/src/main/java/hoot/services/controllers/export/ExportCommand.java b/hoot-services/src/main/java/hoot/services/controllers/export/ExportCommand.java index cf4646ac98..233bddea37 100644 --- a/hoot-services/src/main/java/hoot/services/controllers/export/ExportCommand.java +++ b/hoot-services/src/main/java/hoot/services/controllers/export/ExportCommand.java @@ -22,7 +22,7 @@ * This will properly maintain the copyright information. Maxar * copyrights will be updated automatically. * - * @copyright Copyright (C) 2016-2023 Maxar (http://www.maxar.com/) + * @copyright Copyright (C) 2016-2024 Maxar (http://www.maxar.com/) */ package hoot.services.controllers.export; @@ -88,7 +88,6 @@ class ExportCommand extends ExternalCommand { //Appends data to a blank fgdb. The template is either stored with translation or with the "local" ones. private void appendToFGDB() { - // Split the translation string: "translations/TDSv71.js" String[] tTrans = params.getTranslation().split("/"); String templateName = tTrans[1].replace(".js",".tgz"); @@ -116,6 +115,10 @@ private void appendToFGDB() { ExternalCommand untarFileCommand = new UnTARFileCommand(exportTemplate, outputDir, this.getClass()); untarFileCommand.execute(); } + else { + params.setAppend(false); + } + } List getCommonExportHootOptions() { diff --git a/scripts/schema/hootLibrary.py b/scripts/schema/hootLibrary.py index 0a00aefe41..336c5ce2c6 100644 --- a/scripts/schema/hootLibrary.py +++ b/scripts/schema/hootLibrary.py @@ -22,7 +22,7 @@ #* This will properly maintain the copyright information. Maxar #* copyrights will be updated automatically. #* - #* @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Maxar (http://www.maxar.com/) + #* @copyright Copyright (C) 2015-2024 Maxar (http://www.maxar.com/) #*/ @@ -98,7 +98,7 @@ def printCopyright(): * This will properly maintain the copyright information. Maxar * copyrights will be updated automatically. * - * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019, 2020, 2021 2022 2023 Maxar (http://www.maxar.com/) + * @copyright Copyright (C) 2015-2024 Maxar (http://www.maxar.com/) */ //// diff --git a/translations/translate.js b/translations/translate.js index 2831c9e8e0..8233c44571 100644 --- a/translations/translate.js +++ b/translations/translate.js @@ -1559,9 +1559,9 @@ translate = { // addSingleO2sFeature - Add a single o2s feature to a schema addSingleO2sFeature: function(schema) { - schema.push({ name:'o2s_A',desc:'o2s',geom:'Area',columns:[ {name:'tag1',desc:'Tag List',type:'String'/*,length:'8192'*/}] }); - schema.push({ name:'o2s_L',desc:'o2s',geom:'Line',columns:[ {name:'tag1',desc:'Tag List',type:'String'/*,length:'8192'*/}] }); - schema.push({ name:'o2s_P',desc:'o2s',geom:'Point',columns:[ {name:'tag1',desc:'Tag List',type:'String'/*,length:'8192'*/}] }); + schema.push({ name:'o2s_A',desc:'o2s',geom:'Area',columns:[ {name:'tag1',desc:'Tag List',type:'String',length:'8192'}] }); + schema.push({ name:'o2s_L',desc:'o2s',geom:'Line',columns:[ {name:'tag1',desc:'Tag List',type:'String',length:'8192'}] }); + schema.push({ name:'o2s_P',desc:'o2s',geom:'Point',columns:[ {name:'tag1',desc:'Tag List',type:'String',length:'8192'}] }); return schema; }, // End addSingleO2sFeature