Skip to content

v0.2.49..v0.2.50 changeset ConflateCommand.java

Garret Voltz edited this page Nov 6, 2019 · 1 revision
diff --git a/hoot-services/src/main/java/hoot/services/controllers/conflation/ConflateCommand.java b/hoot-services/src/main/java/hoot/services/controllers/conflation/ConflateCommand.java
index dbaf699..e0e8812 100644
--- a/hoot-services/src/main/java/hoot/services/controllers/conflation/ConflateCommand.java
+++ b/hoot-services/src/main/java/hoot/services/controllers/conflation/ConflateCommand.java
@@ -26,7 +26,6 @@
  */
 package hoot.services.controllers.conflation;
 
-import static hoot.services.HootProperties.CONFIG_OPTIONS;
 import static hoot.services.HootProperties.CONFLATION_TYPES_PATH;
 import static hoot.services.HootProperties.HOME_FOLDER;
 import static hoot.services.HootProperties.HOOTAPI_DB_URL;
@@ -64,7 +63,6 @@ class ConflateCommand extends ExternalCommand {
     private static List<String> cleaningOptions = new ArrayList<>();
 
     private static Map<String, Map<String, Object>> conflationFeatures = null;
-    private static Map<String, Map<String, String>> configOptions = null;
 
     static {
         try {
@@ -73,16 +71,10 @@ class ConflateCommand extends ExternalCommand {
             TypeReference<?> schema = new TypeReference<Map<String, Map<String, Object>>>(){};
             conflationFeatures = mapper.readValue(file, schema);
 
-            // get json of all config options...
-            schema = new TypeReference<Map<String, Map<String, String>>>(){};
-            file = FileUtils.readFileToString(new File(HOME_FOLDER, CONFIG_OPTIONS), Charset.defaultCharset());
-            configOptions = mapper.readValue(file, schema);
-
             // use default options for map cleaners list...
             cleaningOptions.addAll(Arrays.asList(configOptions.get("MapCleanerTransforms").get("default")
                 .replaceAll("hoot::","").split(";")));
 
-
         } catch (IOException e) {
             e.printStackTrace();
         }
@@ -125,7 +117,6 @@ class ConflateCommand extends ExternalCommand {
         this.conflateParams = params;
 
         List<String> options = new LinkedList<>();
-        options.add("convert.ops=hoot::DecomposeBuildingRelationsVisitor");
         options.add("writer.include.conflate.score.tags=false");
         options.add("hootapi.db.writer.overwrite.map=true");
         options.add("writer.text.status=true");
@@ -150,6 +141,11 @@ class ConflateCommand extends ExternalCommand {
             stats = "--stats";
         }
 
+        if (params.getBounds() != null) {
+            //Add TASK_BBOX as a convert.bounding.box
+            options.add("convert.bounding.box=" + params.getBounds());
+        }
+
         Map<String, Object> substitutionMap = new HashMap<>();
 
         // Detect Differential Conflation
Clone this wiki locally