Skip to content

Commit

Permalink
fix: use 2.24.0 tippecanoe
Browse files Browse the repository at this point in the history
  • Loading branch information
JinIgarashi committed Mar 17, 2024
1 parent 3b43cea commit c972fa6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Start from ubuntu
FROM node:20 AS tippecanoe-builder

ENV TIPPECANOE_VERSION=2.24.0

RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install \
Expand All @@ -9,7 +11,7 @@ RUN apt-get update \
zlib1g-dev \
git

RUN git clone https://github.com/felt/tippecanoe.git
RUN git clone https://github.com/felt/tippecanoe.git -b $TIPPECANOE_VERSION
WORKDIR tippecanoe
RUN make

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
nodejs:
image: watergis/vt:v0.0.1
# image: ghcr.io/watergis/vt-boilerplate:v1.2.1
build: .
environment:
- db_user=$db_user
Expand Down
7 changes: 6 additions & 1 deletion src/postgis2mbtiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class postgis2mbtiles {
if (fs.existsSync(mbtiles)) {
fs.unlinkSync(mbtiles);
}

execSync(`tippecanoe -v`);

const cmd = `
tippecanoe \
--no-feature-limit \
Expand All @@ -32,7 +35,9 @@ class postgis2mbtiles {
--attribution="${this.config.attribution}" \
-o ${mbtiles} ${geojsonfiles.join(' ')}`;

execSync(cmd).toString();
console.log(cmd)

execSync(cmd);

geojsonfiles.forEach((f) => {
fs.unlinkSync(f);
Expand Down

0 comments on commit c972fa6

Please sign in to comment.