Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM alpine:3.23

RUN apk add curl libosmium g++ make cmake zlib-dev expat-dev bzip2-dev lz4-dev

ENV DUCKDB_VERSION 1.5.1
ENV DUCKDB_VERSION 1.5.5
RUN ARCH=$(uname -m) && \
case "$ARCH" in \
x86_64) DIST="linux-amd64-musl" ;; \
Expand Down
4 changes: 3 additions & 1 deletion sql/addresses.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COPY (
WITH raw AS (
SELECT type, id, tags, ST_PointOnSurface(geometry) AS geometry
SELECT type, id, tags, version, timestamp, ST_PointOnSurface(geometry) AS geometry
FROM '{{INPUT}}'
WHERE (kind = 'node' OR kind = 'area')
AND (
Expand Down Expand Up @@ -44,6 +44,8 @@ COPY (
tags['addr:country'] AS "addr:country",
-- Full, unstructured address; not machine-readable but maybe useful
tags['addr:full'] AS "addr:full",
version,
timestamp,
{
xmin: ST_XMin(geometry)::FLOAT,
ymin: ST_YMin(geometry)::FLOAT,
Expand Down
4 changes: 3 additions & 1 deletion sql/boundaries.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COPY (
WITH raw AS (
SELECT type, id, tags, geometry
SELECT type, id, tags, version, timestamp, geometry
FROM '{{INPUT}}'
WHERE kind = 'area'
AND tags['boundary'] IN ('administrative', 'aboriginal_lands', 'maritime', 'disputed', 'place')
Expand Down Expand Up @@ -28,6 +28,8 @@ COPY (
split_multi(tags['claimed_by']) AS claimed_by,
split_multi(tags['controlled_by']) AS controlled_by,
split_multi(tags['recognized_by']) AS recognized_by,
version,
timestamp,
{
xmin: ST_XMin(geometry)::FLOAT,
ymin: ST_YMin(geometry)::FLOAT,
Expand Down
4 changes: 3 additions & 1 deletion sql/buildings.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COPY (
WITH raw AS (
SELECT type, id, tags, geometry
SELECT type, id, tags, version, timestamp, geometry
FROM '{{INPUT}}'
WHERE kind = 'area'
AND tags['building'] IS NOT NULL
Expand Down Expand Up @@ -29,6 +29,8 @@ COPY (
tags['start_date'] AS start_date,
tags['access'] AS access,
tags['wheelchair'] AS wheelchair,
version,
timestamp,
{
xmin: ST_XMin(geometry)::FLOAT,
ymin: ST_YMin(geometry)::FLOAT,
Expand Down
4 changes: 3 additions & 1 deletion sql/highways.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COPY (
WITH raw AS (
SELECT type, id, tags, geometry
SELECT type, id, tags, version, timestamp, geometry
FROM '{{INPUT}}'
WHERE tags['highway'] IS NOT NULL
AND (
Expand Down Expand Up @@ -44,6 +44,8 @@ COPY (
tags['motorcycle'] AS motorcycle,
tags['oneway'] AS oneway,
tags['toll'] AS toll,
version,
timestamp,
{
xmin: ST_XMin(geometry)::FLOAT,
ymin: ST_YMin(geometry)::FLOAT,
Expand Down
4 changes: 3 additions & 1 deletion sql/parks.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COPY (
WITH raw AS (
SELECT type, id, tags, geometry
SELECT type, id, tags, version, timestamp, geometry
FROM '{{INPUT}}'
WHERE (kind = 'node' OR kind = 'area')
AND (
Expand Down Expand Up @@ -34,6 +34,8 @@ COPY (
tags['website'] AS website,
tags['wikidata'] AS wikidata,
tags['wikipedia'] AS wikipedia,
version,
timestamp,
{
xmin: ST_XMin(geometry)::FLOAT,
ymin: ST_YMin(geometry)::FLOAT,
Expand Down
4 changes: 3 additions & 1 deletion sql/pois.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COPY (
WITH raw AS (
SELECT type, id, tags, geometry
SELECT type, id, tags, version, timestamp, geometry
FROM '{{INPUT}}'
WHERE (kind = 'node' OR kind = 'area')
AND (
Expand Down Expand Up @@ -83,6 +83,8 @@ COPY (
tags['source'] AS source,
tags['sport'] AS sport,
tags['wheelchair'] AS wheelchair,
version,
timestamp,
{
xmin: ST_XMin(geometry)::FLOAT,
ymin: ST_YMin(geometry)::FLOAT,
Expand Down
4 changes: 3 additions & 1 deletion sql/settlements.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COPY (
WITH raw AS (
SELECT type, id, tags, geometry
SELECT type, id, tags, version, timestamp, geometry
FROM '{{INPUT}}'
WHERE kind = 'node'
AND tags['place'] IN (
Expand All @@ -22,6 +22,8 @@ COPY (
tags['wikidata'] AS wikidata,
tags['wikipedia'] AS wikipedia,
TRY_CAST(tags['population'] AS UBIGINT) AS population,
version,
timestamp,
{
xmin: ST_XMin(geometry)::FLOAT,
ymin: ST_YMin(geometry)::FLOAT,
Expand Down
4 changes: 3 additions & 1 deletion sql/waterways.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COPY (
WITH raw AS (
SELECT type, id, tags, geometry
SELECT type, id, tags, version, timestamp, geometry
FROM '{{INPUT}}'
WHERE kind = 'line'
AND tags['waterway'] IN ('river', 'stream', 'canal', 'ditch', 'drain', 'flowline', 'fairway', 'link')
Expand Down Expand Up @@ -41,6 +41,8 @@ COPY (
tags['rapids'] AS rapids,
tags['rapids:name'] AS 'rapids:name',
tags['hazard'] AS hazard,
version,
timestamp,
{
xmin: ST_XMin(geometry)::FLOAT,
ymin: ST_YMin(geometry)::FLOAT,
Expand Down