You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@baremaps.apache.org by bc...@apache.org on 2023/02/06 00:17:49 UTC
[incubator-baremaps] branch 575-bridges created (now 9b25e1fe)
This is an automated email from the ASF dual-hosted git repository.
bchapuis pushed a change to branch 575-bridges
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
at 9b25e1fe Style bridges in basemap
This branch includes the following new commits:
new 9b25e1fe Style bridges in basemap
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-baremaps] 01/01: Style bridges in basemap
Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bchapuis pushed a commit to branch 575-bridges
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
commit 9b25e1fe0b7b745df8782484f1da09aae9380eed
Author: Bertil Chapuis <bc...@gmail.com>
AuthorDate: Mon Feb 6 01:17:36 2023 +0100
Style bridges in basemap
---
basemap/README.md | 6 +-
basemap/layers/man_made/bridge.js | 18 ++++
basemap/style.js | 2 +
basemap/workflow.js | 210 +++++++++++++++++++-------------------
4 files changed, 128 insertions(+), 108 deletions(-)
diff --git a/basemap/README.md b/basemap/README.md
index b0c22c6a..f05422be 100644
--- a/basemap/README.md
+++ b/basemap/README.md
@@ -23,7 +23,7 @@ jdbc:postgresql://localhost:5432/baremaps?user=baremaps&password=baremaps
Assuming that the necessary requirements have been installed, the database can be populated with the following command.
```
-baremaps workflow execute --file workflow.json
+baremaps workflow execute --file workflow.js
```
The development server can be started with the following command.
@@ -31,8 +31,8 @@ The development server can be started with the following command.
```
baremaps map dev --log-level DEBUG \
--database 'jdbc:postgresql://localhost:5432/baremaps?user=baremaps&password=baremaps' \
- --tileset 'tileset.json' \
- --style 'style.json'
+ --tileset 'tileset.js' \
+ --style 'style.js'
```
## Editing the tileset
diff --git a/basemap/layers/man_made/bridge.js b/basemap/layers/man_made/bridge.js
new file mode 100644
index 00000000..b5c6e9f5
--- /dev/null
+++ b/basemap/layers/man_made/bridge.js
@@ -0,0 +1,18 @@
+export default {
+ id: 'man_made_bridge',
+ type: 'fill',
+ source: 'baremaps',
+ 'source-layer': 'man_made',
+ layout: {
+ visibility: 'visible',
+ },
+ directives: [
+ {
+ filter: ['==', ['get', 'man_made'], 'bridge'],
+ 'fill-color': 'rgb(184, 184, 184)',
+ },
+ ],
+ paint: {
+ 'fill-antialias': true,
+ },
+}
diff --git a/basemap/style.js b/basemap/style.js
index 1da672cb..438b2d6a 100644
--- a/basemap/style.js
+++ b/basemap/style.js
@@ -32,6 +32,7 @@ import ocean_background from './layers/ocean/background.js';
import route_line from "./layers/route/style.js"
import building_shape from "./layers/building/shape.js";
import building_number from "./layers/building/number.js";
+import man_made_bridge from "./layers/man_made/bridge.js";
import man_made_pier_line from "./layers/man_made/pier_line.js";
import man_made_pier_label from "./layers/man_made/pier_label.js";
import waterway_line from "./layers/waterway/line.js"
@@ -68,6 +69,7 @@ export default {
layer(waterway_line),
layer(waterway_tunnel_casing),
layer(waterway_tunnel_line),
+ layer(man_made_bridge),
layer(amenity_fountain),
layer(highway_tunnel_outline),
layer(highway_tunnel_line),
diff --git a/basemap/workflow.js b/basemap/workflow.js
index cb2a11b8..62d9c6e7 100644
--- a/basemap/workflow.js
+++ b/basemap/workflow.js
@@ -2,111 +2,111 @@ import config from "./config.js";
export default {
"steps": [
- {
- "id": "natural-earth",
- "needs": [],
- "tasks": [
- {
- "type": "DownloadUrl",
- "url": "https://naciscdn.org/naturalearth/packages/natural_earth_vector.gpkg.zip",
- "path": "data/natural_earth_vector.gpkg.zip"
- },
- {
- "type": "UnzipFile",
- "file": "data/natural_earth_vector.gpkg.zip",
- "directory": "data/natural_earth_vector"
- },
- {
- "type": "ImportGeoPackage",
- "file": "data/natural_earth_vector/packages/natural_earth_vector.gpkg",
- "database": config.database,
- "sourceSRID": 4326,
- "targetSRID": 3857
- },
- {
- "type": "ExecuteSql",
- "file": "queries/ne_index.sql",
- "database": config.database,
- "parallel": true,
- }
- ]
- },
- {
- "id": "water-polygons",
- "needs": [],
- "tasks": [
- {
- "type": "DownloadUrl",
- "url": "https://osmdata.openstreetmap.de/download/water-polygons-split-3857.zip",
- "path": "data/water-polygons-split-3857.zip"
- },
- {
- "type": "UnzipFile",
- "file": "data/water-polygons-split-3857.zip",
- "directory": "data"
- },
- {
- "type": "ImportShapefile",
- "file": "data/water-polygons-split-3857/water_polygons.shp",
- "database": config.database,
- "sourceSRID": 3857,
- "targetSRID": 3857
- },
- {
- "type": "ExecuteSql",
- "file": "queries/osm_water_index.sql",
- "database": "jdbc:postgresql://localhost:5432/baremaps?&user=baremaps&password=baremaps"
- }
- ]
- },
- {
- "id": "simplified-water-polygons",
- "needs": [],
- "tasks": [
- {
- "type": "DownloadUrl",
- "url": "https://osmdata.openstreetmap.de/download/simplified-water-polygons-split-3857.zip",
- "path": "data/simplified-water-polygons-split-3857.zip"
- },
- {
- "type": "UnzipFile",
- "file": "data/simplified-water-polygons-split-3857.zip",
- "directory": "data"
- },
- {
- "type": "ImportShapefile",
- "file": "data/simplified-water-polygons-split-3857/simplified_water_polygons.shp",
- "database": config.database,
- "sourceSRID": 3857,
- "targetSRID": 3857
- },
- {
- "type": "ExecuteSql",
- "file": "queries/osm_simplified_water_index.sql",
- "database": config.database,
- },
- ]
- },
- {
- "id": "openstreetmap-data",
- "needs": [],
- "tasks": [
- {
- "type": "DownloadUrl",
- "url": "https://download.geofabrik.de/europe/switzerland-latest.osm.pbf",
- "path": "data/data.osm.pbf"
- },
- {
- "type": "ImportOpenStreetMap",
- "file": "data/data.osm.pbf",
- "database": config.database,
- "databaseSrid": 3857
- },
- ]
- },
+ // {
+ // "id": "natural-earth",
+ // "needs": [],
+ // "tasks": [
+ // {
+ // "type": "DownloadUrl",
+ // "url": "https://naciscdn.org/naturalearth/packages/natural_earth_vector.gpkg.zip",
+ // "path": "data/natural_earth_vector.gpkg.zip"
+ // },
+ // {
+ // "type": "UnzipFile",
+ // "file": "data/natural_earth_vector.gpkg.zip",
+ // "directory": "data/natural_earth_vector"
+ // },
+ // {
+ // "type": "ImportGeoPackage",
+ // "file": "data/natural_earth_vector/packages/natural_earth_vector.gpkg",
+ // "database": config.database,
+ // "sourceSRID": 4326,
+ // "targetSRID": 3857
+ // },
+ // {
+ // "type": "ExecuteSql",
+ // "file": "queries/ne_index.sql",
+ // "database": config.database,
+ // "parallel": true,
+ // }
+ // ]
+ // },
+ // {
+ // "id": "water-polygons",
+ // "needs": [],
+ // "tasks": [
+ // {
+ // "type": "DownloadUrl",
+ // "url": "https://osmdata.openstreetmap.de/download/water-polygons-split-3857.zip",
+ // "path": "data/water-polygons-split-3857.zip"
+ // },
+ // {
+ // "type": "UnzipFile",
+ // "file": "data/water-polygons-split-3857.zip",
+ // "directory": "data"
+ // },
+ // {
+ // "type": "ImportShapefile",
+ // "file": "data/water-polygons-split-3857/water_polygons.shp",
+ // "database": config.database,
+ // "sourceSRID": 3857,
+ // "targetSRID": 3857
+ // },
+ // {
+ // "type": "ExecuteSql",
+ // "file": "queries/osm_water_index.sql",
+ // "database": "jdbc:postgresql://localhost:5432/baremaps?&user=baremaps&password=baremaps"
+ // }
+ // ]
+ // },
+ // {
+ // "id": "simplified-water-polygons",
+ // "needs": [],
+ // "tasks": [
+ // {
+ // "type": "DownloadUrl",
+ // "url": "https://osmdata.openstreetmap.de/download/simplified-water-polygons-split-3857.zip",
+ // "path": "data/simplified-water-polygons-split-3857.zip"
+ // },
+ // {
+ // "type": "UnzipFile",
+ // "file": "data/simplified-water-polygons-split-3857.zip",
+ // "directory": "data"
+ // },
+ // {
+ // "type": "ImportShapefile",
+ // "file": "data/simplified-water-polygons-split-3857/simplified_water_polygons.shp",
+ // "database": config.database,
+ // "sourceSRID": 3857,
+ // "targetSRID": 3857
+ // },
+ // {
+ // "type": "ExecuteSql",
+ // "file": "queries/osm_simplified_water_index.sql",
+ // "database": config.database,
+ // },
+ // ]
+ // },
+ // {
+ // "id": "openstreetmap-data",
+ // "needs": [],
+ // "tasks": [
+ // {
+ // "type": "DownloadUrl",
+ // "url": "https://download.geofabrik.de/europe/switzerland-latest.osm.pbf",
+ // "path": "data/data.osm.pbf"
+ // },
+ // {
+ // "type": "ImportOpenStreetMap",
+ // "file": "data/data.osm.pbf",
+ // "database": config.database,
+ // "databaseSrid": 3857
+ // },
+ // ]
+ // },
{
"id": "openstreetmap-nodes",
- "needs": ["openstreetmap-data"],
+ "needs": [],
"tasks": [
{
"type": "ExecuteSql",
@@ -132,7 +132,7 @@ export default {
},
{
"id": "openstreetmap-ways",
- "needs": ["openstreetmap-data"],
+ "needs": [],
"tasks": [
{
"type": "ExecuteSql",
@@ -158,7 +158,7 @@ export default {
},
{
"id": "openstreetmap-relations",
- "needs": ["openstreetmap-data"],
+ "needs": [],
"tasks": [
{
"type": "ExecuteSql",