This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch 745-daylight
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git


The following commit(s) were added to refs/heads/745-daylight by this push:
     new 1dd89d17 Add task to import daylight transtations
1dd89d17 is described below

commit 1dd89d17faa3f267b9c913c268628a31ca4fdbac
Author: Bertil Chapuis <[email protected]>
AuthorDate: Tue Oct 31 20:36:38 2023 +0100

    Add task to import daylight transtations
---
 .../postgres/PostgresNodeRepository.java           |   2 +-
 .../postgres/PostgresRelationRepository.java       |   2 +-
 .../postgres/PostgresWayRepository.java            |   2 +-
 .../java/org/apache/baremaps/workflow/Task.java    |   4 +-
 .../workflow/tasks/ImportDaylightTranslations.java |  84 ++
 daylight/workflow.js                               | 863 +++++++++++----------
 6 files changed, 524 insertions(+), 433 deletions(-)

diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresNodeRepository.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresNodeRepository.java
index 2b674d11..4f8a7a8c 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresNodeRepository.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresNodeRepository.java
@@ -93,7 +93,7 @@ public class PostgresNodeRepository implements NodeRepository 
{
       String tagsColumn, String longitudeColumn, String latitudeColumn, String 
geometryColumn) {
     this.dataSource = dataSource;
     this.createTable = String.format("""
-        CREATE TABLE %1$s
+        CREATE TABLE IF NOT EXISTS %1$s
         (
             %2$s int8 PRIMARY KEY,
             %3$s int,
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresRelationRepository.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresRelationRepository.java
index 47b8aada..6a69918e 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresRelationRepository.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresRelationRepository.java
@@ -94,7 +94,7 @@ public class PostgresRelationRepository implements 
RelationRepository {
       String geometryColumn) {
     this.dataSource = dataSource;
     this.createTable = String.format("""
-        CREATE TABLE %1$s (
+        CREATE TABLE IF NOT EXISTS %1$s (
           %2$s bigint PRIMARY KEY,
           %3$s int,
           %4$s int,
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresWayRepository.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresWayRepository.java
index 0d3b56f9..7f8b7978 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresWayRepository.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/postgres/PostgresWayRepository.java
@@ -95,7 +95,7 @@ public class PostgresWayRepository implements WayRepository {
       String tagsColumn, String nodesColumn, String geometryColumn) {
     this.dataSource = dataSource;
     this.createTable = String.format("""
-        CREATE TABLE %1$s (
+        CREATE TABLE IF NOT EXISTS %1$s (
           %2$s int8 PRIMARY KEY,
           %3$s int,
           %4$s int,
diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/Task.java 
b/baremaps-core/src/main/java/org/apache/baremaps/workflow/Task.java
index d60ee0cb..48737368 100644
--- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/Task.java
+++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/Task.java
@@ -48,7 +48,9 @@ import org.apache.baremaps.workflow.tasks.*;
     @JsonSubTypes.Type(value = DecompressFile.class, name = "DecompressFile"),
     @JsonSubTypes.Type(value = UpdateOpenStreetMap.class, name = 
"UpdateOpenStreetMap"),
     @JsonSubTypes.Type(value = CreateGeonamesIndex.class, name = 
"CreateGeonamesIndex"),
-    @JsonSubTypes.Type(value = CreateIplocIndex.class, name = 
"CreateIplocIndex")})
+    @JsonSubTypes.Type(value = CreateIplocIndex.class, name = 
"CreateIplocIndex"),
+    @JsonSubTypes.Type(value = ImportDaylightTranslations.class, name = 
"ImportDaylightTranslations")
+})
 public interface Task {
 
   /**
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightTranslations.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightTranslations.java
new file mode 100644
index 00000000..e5e38da6
--- /dev/null
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightTranslations.java
@@ -0,0 +1,84 @@
+package org.apache.baremaps.workflow.tasks;
+
+import org.apache.baremaps.openstreetmap.postgres.PostgresNodeRepository;
+import org.apache.baremaps.openstreetmap.postgres.PostgresRelationRepository;
+import org.apache.baremaps.openstreetmap.postgres.PostgresWayRepository;
+import org.apache.baremaps.workflow.Task;
+import org.apache.baremaps.workflow.WorkflowContext;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.stream.Collectors;
+
+public record ImportDaylightTranslations(Path file, Object database) 
implements Task {
+
+    record Group(String type, Long id, String name) {
+
+    }
+
+    record Line(String type, Long id, String name, String attributeKey, String 
attributeValue) {
+
+        public Group group() {
+            return new Group(type, id, name);
+        }
+
+        public static Line parse(String line) {
+            var parts = line.split("\t");
+            var type = parts[0];
+            var id = Long.parseLong(parts[1]);
+            var name = parts[2];
+            var key = parts[3];
+            var val = parts[4];
+            return new Line(type, id, name, key, val);
+        }
+    }
+
+    @Override
+    public void execute(WorkflowContext context) throws Exception {
+        var datasource = context.getDataSource(database);
+        var nodeRepository = new PostgresNodeRepository(datasource);
+        var wayRepository = new PostgresWayRepository(datasource);
+        var relationRepository = new PostgresRelationRepository(datasource);
+        nodeRepository.create();
+        wayRepository.create();
+        relationRepository.create();
+        try (var lines = Files.lines(file)) {
+            var entries = 
lines.map(Line::parse).collect(Collectors.groupingBy(Line::group));
+            for (var entry : entries.entrySet()) {
+                var group = entry.getKey();
+                switch (group.type()) {
+                    case "node" -> {
+                        var node = nodeRepository.get(group.id());
+                        if (node != null) {
+                            var tags = node.getTags();
+                            for (var line : entry.getValue()) {
+                                tags.put(line.attributeKey(), 
line.attributeValue());
+                            }
+                            nodeRepository.put(node);
+                        }
+                    }
+                    case "way" -> {
+                        var way = wayRepository.get(group.id());
+                        if (way != null) {
+                            var tags = way.getTags();
+                            for (var line : entry.getValue()) {
+                                tags.put(line.attributeKey(), 
line.attributeValue());
+                            }
+                            wayRepository.put(way);
+                        }
+                    }
+                    case "relation" -> {
+                        var relation = relationRepository.get(group.id());
+                        if (relation != null) {
+                            var tags = relation.getTags();
+                            for (var line : entry.getValue()) {
+                                tags.put(line.attributeKey(), 
line.attributeValue());
+                            }
+                            relationRepository.put(relation);
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/daylight/workflow.js b/daylight/workflow.js
index 780af33f..3cd7914e 100644
--- a/daylight/workflow.js
+++ b/daylight/workflow.js
@@ -14,441 +14,446 @@ import config from "./config.js";
 
 export default {
   "steps": [
-    {
-      "id": "daylight-data",
-      "needs": [],
-      "tasks": [
-        {
-          "type": "DownloadUrl",
-          "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/planet-v1.33.osm.pbf";,
-          "path": "data/data.osm.pbf"
-        },
-        {
-          "type": "ImportOsmPbf",
-          "file": "data/data.osm.pbf",
-          "database": config.database,
-          "databaseSrid": 3857,
-          "replaceExisting": true,
-        },
-      ]
-    },
-    {
-      "id": "daylight-buildings",
-      "needs": ["daylight-data"],
-      "tasks": [
-        {
-          "type": "DownloadUrl",
-          "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/ml-buildings-v1.33.osm.pbf";,
-          "path": "data/buildings.osm.pbf"
-        },
-        {
-          "type": "ImportOsmPbf",
-          "file": "data/buildings.osm.pbf",
-          "database": config.database,
-          "databaseSrid": 3857,
-          "replaceExisting": false,
-        },
-      ]
-    },
-    {
-      "id": "daylight-roads",
-      "needs": ["daylight-buildings"],
-      "tasks": [
-        {
-          "type": "DownloadUrl",
-          "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/fb-ml-roads-v1.33.osc.gz";,
-          "path": "data/roads.osc.gz"
-        },
-        {
-          "type": "ImportOsmChange",
-          "file": "data/roads.osc.gz",
-          "compression": "gzip",
-          "database": config.database,
-          "srid": 3857
-        },
-      ]
-    },
-    {
-      "id": "daylight-admin",
-      "needs": ["daylight-roads"],
-      "tasks": [
-        {
-          "type": "DownloadUrl",
-          "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/admin-v1.33.osc.gz";,
-          "path": "data/admin.osc.gz"
-        },
-        {
-          "type": "ImportOsmChange",
-          "file": "data/admin.osc.gz",
-          "compression": "gzip",
-          "database": config.database,
-          "srid": 3857
-        },
-      ]
-    },
-    {
-      "id": "daylight-coastlines",
-      "needs": ["daylight-data"],
-      "tasks": [
-        {
-          "type": "DownloadUrl",
-          "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/coastlines-v1.33.tgz";,
-          "path": "data/coastlines.tgz"
-        },
-        {
-          "type": "DecompressFile",
-          "compression": "targz",
-          "source": "data/coastlines.tgz",
-          "target": "data/coastlines"
-        },
-        {
-          "type": "ImportShapefile",
-          "file": "data/coastlines/water_polygons.shp",
-          "database": config.database,
-          "sourceSRID": 4326,
-          "targetSRID": 3857
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "./layers/coastline/prepare.sql",
-          "database": config.database,
-        },
-      ]
-    },
+    // {
+    //   "id": "daylight-data",
+    //   "needs": [],
+    //   "tasks": [
+    //     {
+    //       "type": "DownloadUrl",
+    //       "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/planet-v1.33.osm.pbf";,
+    //       "path": "data/data.osm.pbf"
+    //     },
+    //     {
+    //       "type": "ImportOsmPbf",
+    //       "file": "data/data.osm.pbf",
+    //       "database": config.database,
+    //       "databaseSrid": 3857,
+    //       "replaceExisting": true,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-buildings",
+    //   "needs": ["daylight-data"],
+    //   "tasks": [
+    //     {
+    //       "type": "DownloadUrl",
+    //       "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/ml-buildings-v1.33.osm.pbf";,
+    //       "path": "data/buildings.osm.pbf"
+    //     },
+    //     {
+    //       "type": "ImportOsmPbf",
+    //       "file": "data/buildings.osm.pbf",
+    //       "database": config.database,
+    //       "databaseSrid": 3857,
+    //       "replaceExisting": false,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-roads",
+    //   "needs": ["daylight-buildings"],
+    //   "tasks": [
+    //     {
+    //       "type": "DownloadUrl",
+    //       "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/fb-ml-roads-v1.33.osc.gz";,
+    //       "path": "data/roads.osc.gz"
+    //     },
+    //     {
+    //       "type": "ImportOsmChange",
+    //       "file": "data/roads.osc.gz",
+    //       "compression": "gzip",
+    //       "database": config.database,
+    //       "srid": 3857
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-admin",
+    //   "needs": ["daylight-roads"],
+    //   "tasks": [
+    //     {
+    //       "type": "DownloadUrl",
+    //       "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/admin-v1.33.osc.gz";,
+    //       "path": "data/admin.osc.gz"
+    //     },
+    //     {
+    //       "type": "ImportOsmChange",
+    //       "file": "data/admin.osc.gz",
+    //       "compression": "gzip",
+    //       "database": config.database,
+    //       "srid": 3857
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-coastlines",
+    //   "needs": ["daylight-data"],
+    //   "tasks": [
+    //     {
+    //       "type": "DownloadUrl",
+    //       "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/coastlines-v1.33.tgz";,
+    //       "path": "data/coastlines.tgz"
+    //     },
+    //     {
+    //       "type": "DecompressFile",
+    //       "compression": "targz",
+    //       "source": "data/coastlines.tgz",
+    //       "target": "data/coastlines"
+    //     },
+    //     {
+    //       "type": "ImportShapefile",
+    //       "file": "data/coastlines/water_polygons.shp",
+    //       "database": config.database,
+    //       "sourceSRID": 4326,
+    //       "targetSRID": 3857
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "./layers/coastline/prepare.sql",
+    //       "database": config.database,
+    //     },
+    //   ]
+    // },
     {
       "id": "daylight-preferred-localization",
       "needs": ["daylight-data"],
       "tasks": [
-        {
-          "type": "DownloadUrl",
-          "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/preferred-localization-v1.33.tsv";,
-          "path": "data/preferred-localization.tsv"
-        },
-      ]
-    },
-    {
-      "id": "daylight-important-features",
-      "needs": ["daylight-data"],
-      "tasks": [
-        {
-          "type": "DownloadUrl",
-          "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.32/important-features-v1.32.json";,
-          "path": "data/important-features.json"
-        },
-      ]
-    },
-    {
-      "id": "daylight-landcover",
-        "needs": ["daylight-data"],
-        "tasks": [
-          {
-            "type": "DownloadUrl",
-            "url": 
"https://daylight-openstreetmap.s3.us-west-2.amazonaws.com/landcover/low.shp";,
-            "path": "data/landcover/low.shp"
-          },
-          {
-            "type": "DownloadUrl",
-            "url": 
"https://daylight-openstreetmap.s3.us-west-2.amazonaws.com/landcover/low.dbf";,
-            "path": "data/landcover/low.dbf"
-          },
-          {
-            "type": "DownloadUrl",
-            "url": 
"https://daylight-openstreetmap.s3.us-west-2.amazonaws.com/landcover/low.prj";,
-            "path": "data/landcover/low.prj"
-          },
-          {
-            "type": "DownloadUrl",
-            "url": 
"https://daylight-openstreetmap.s3.us-west-2.amazonaws.com/landcover/low.shx";,
-            "path": "data/landcover/low.shx"
-          },
-          {
-            "type": "ImportShapefile",
-            "file": "data/landcover/low.shp",
+        // {
+        //   "type": "DownloadUrl",
+        //   "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.33/preferred-localization-v1.33.tsv";,
+        //   "path": "data/preferred-localization.tsv"
+        // },
+        {
+            "type": "ImportDaylightTranslations",
+            "file": "data/preferred-localization.tsv",
             "database": config.database,
-            "sourceSRID": 4326,
-            "targetSRID": 3857
-          },
-        ]
-    },
-    {
-      "id": "daylight-nodes",
-      "needs": ["daylight-admin", "daylight-coastlines", 
"daylight-preferred-localization", "daylight-important-features"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/queries/osm_nodes.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-      ]
-    },
-    {
-      "id": "daylight-ways",
-      "needs": ["daylight-admin", "daylight-coastlines", 
"daylight-preferred-localization", "daylight-important-features"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/queries/osm_ways.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-      ]
-    },
-    {
-      "id": "daylight-relations",
-      "needs": ["daylight-admin", "daylight-coastlines", 
"daylight-preferred-localization", "daylight-important-features"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/queries/osm_relations.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-      ]
-    },
-    {
-      "id": "daylight-member",
-      "needs": ["daylight-admin", "daylight-coastlines", 
"daylight-preferred-localization", "daylight-important-features"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/member/prepare.sql",
-          "database": config.database,
-        },
-      ]
-    },
-    {
-      "id": "daylight-point",
-      "needs": ["daylight-nodes"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/point/clean.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/point/simplify.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/point/index.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-      ]
-    },
-    {
-      "id": "daylight-linestring",
-      "needs": ["daylight-member"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/linestring/clean.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/linestring/prepare.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/linestring/index.sql",
-          "database": config.database,
-        },
-      ]
-    },
-    {
-      "id": "daylight-polygon",
-      "needs": ["daylight-member"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/polygon/clean.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/polygon/prepare.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/polygon/index.sql",
-          "database": config.database,
-        },
-      ]
-    },
-    {
-      "id": "daylight-highway",
-      "needs": ["daylight-linestring"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/highway/clean.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/highway/prepare.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/highway/simplify.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/highway/index.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-      ]
-    },
-    {
-      "id": "daylight-railway",
-      "needs": ["daylight-linestring"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/railway/clean.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/railway/prepare.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/railway/simplify.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/railway/index.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-      ]
-    },
-    {
-      "id": "daylight-route",
-      "needs": ["daylight-linestring"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/route/clean.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/route/prepare.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/route/simplify.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/route/index.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-      ]
-    },
-    {
-      "id": "daylight-natural",
-      "needs": ["daylight-polygon"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/natural/clean.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/natural/prepare.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/natural/simplify.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/natural/index.sql",
-          "database": config.database,
-          "parallel": true
-        },
-      ]
-    },
-    {
-      "id": "daylight-landuse",
-      "needs": ["daylight-polygon"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/landuse/clean.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/landuse/prepare.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/landuse/simplify.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/landuse/index.sql",
-          "database": config.database,
-          "parallel": true
-        },
-      ]
-    },
-    {
-      "id": "daylight-waterway",
-      "needs": ["daylight-linestring"],
-      "tasks": [
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/waterway/clean.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/waterway/prepare.sql",
-          "database": config.database,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/waterway/simplify.sql",
-          "database": config.database,
-          "parallel": true,
-        },
-        {
-          "type": "ExecuteSql",
-          "file": "../basemap/layers/waterway/index.sql",
-          "database": config.database,
-          "parallel": true
-        },
+        }
       ]
     },
+    // {
+    //   "id": "daylight-important-features",
+    //   "needs": ["daylight-data"],
+    //   "tasks": [
+    //     {
+    //       "type": "DownloadUrl",
+    //       "url": 
"https://daylight-map-distribution.s3.us-west-1.amazonaws.com/release/v1.32/important-features-v1.32.json";,
+    //       "path": "data/important-features.json"
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-landcover",
+    //     "needs": ["daylight-data"],
+    //     "tasks": [
+    //       {
+    //         "type": "DownloadUrl",
+    //         "url": 
"https://daylight-openstreetmap.s3.us-west-2.amazonaws.com/landcover/low.shp";,
+    //         "path": "data/landcover/low.shp"
+    //       },
+    //       {
+    //         "type": "DownloadUrl",
+    //         "url": 
"https://daylight-openstreetmap.s3.us-west-2.amazonaws.com/landcover/low.dbf";,
+    //         "path": "data/landcover/low.dbf"
+    //       },
+    //       {
+    //         "type": "DownloadUrl",
+    //         "url": 
"https://daylight-openstreetmap.s3.us-west-2.amazonaws.com/landcover/low.prj";,
+    //         "path": "data/landcover/low.prj"
+    //       },
+    //       {
+    //         "type": "DownloadUrl",
+    //         "url": 
"https://daylight-openstreetmap.s3.us-west-2.amazonaws.com/landcover/low.shx";,
+    //         "path": "data/landcover/low.shx"
+    //       },
+    //       {
+    //         "type": "ImportShapefile",
+    //         "file": "data/landcover/low.shp",
+    //         "database": config.database,
+    //         "sourceSRID": 4326,
+    //         "targetSRID": 3857
+    //       },
+    //     ]
+    // },
+    // {
+    //   "id": "daylight-nodes",
+    //   "needs": ["daylight-admin", "daylight-coastlines", 
"daylight-preferred-localization", "daylight-important-features"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/queries/osm_nodes.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-ways",
+    //   "needs": ["daylight-admin", "daylight-coastlines", 
"daylight-preferred-localization", "daylight-important-features"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/queries/osm_ways.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-relations",
+    //   "needs": ["daylight-admin", "daylight-coastlines", 
"daylight-preferred-localization", "daylight-important-features"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/queries/osm_relations.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-member",
+    //   "needs": ["daylight-admin", "daylight-coastlines", 
"daylight-preferred-localization", "daylight-important-features"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/member/prepare.sql",
+    //       "database": config.database,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-point",
+    //   "needs": ["daylight-nodes"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/point/clean.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/point/simplify.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/point/index.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-linestring",
+    //   "needs": ["daylight-member"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/linestring/clean.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/linestring/prepare.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/linestring/index.sql",
+    //       "database": config.database,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-polygon",
+    //   "needs": ["daylight-member"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/polygon/clean.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/polygon/prepare.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/polygon/index.sql",
+    //       "database": config.database,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-highway",
+    //   "needs": ["daylight-linestring"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/highway/clean.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/highway/prepare.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/highway/simplify.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/highway/index.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-railway",
+    //   "needs": ["daylight-linestring"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/railway/clean.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/railway/prepare.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/railway/simplify.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/railway/index.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-route",
+    //   "needs": ["daylight-linestring"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/route/clean.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/route/prepare.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/route/simplify.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/route/index.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-natural",
+    //   "needs": ["daylight-polygon"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/natural/clean.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/natural/prepare.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/natural/simplify.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/natural/index.sql",
+    //       "database": config.database,
+    //       "parallel": true
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-landuse",
+    //   "needs": ["daylight-polygon"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/landuse/clean.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/landuse/prepare.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/landuse/simplify.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/landuse/index.sql",
+    //       "database": config.database,
+    //       "parallel": true
+    //     },
+    //   ]
+    // },
+    // {
+    //   "id": "daylight-waterway",
+    //   "needs": ["daylight-linestring"],
+    //   "tasks": [
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/waterway/clean.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/waterway/prepare.sql",
+    //       "database": config.database,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/waterway/simplify.sql",
+    //       "database": config.database,
+    //       "parallel": true,
+    //     },
+    //     {
+    //       "type": "ExecuteSql",
+    //       "file": "../basemap/layers/waterway/index.sql",
+    //       "database": config.database,
+    //       "parallel": true
+    //     },
+    //   ]
+    // },
   ]
 }


Reply via email to