Merge pull request #1 from monosolutions/MODE-11365

(MODE-11365) Open Street Map updates
This commit is contained in:
Sokratis Siozos-Drosos 2019-06-25 11:58:15 +02:00 committed by GitHub
commit e80c76f041
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1326 changed files with 26743 additions and 714 deletions

172
.circleci/config.yml Normal file
View file

@ -0,0 +1,172 @@
version: 2
jobs:
build-package:
working_directory: /usr/src/app
docker:
- image: monosolutions/ubuntu-nodejs
steps:
- checkout
- restore_cache:
key: node-dependencies-{{ checksum "package.json" }}
- run: npm install
- save_cache:
paths:
- node_modules
key: node-dependencies-{{ checksum "package.json" }}
- run:
name: Build Artifact
command: |
mkdir ./artifact
DEPLOYABLE="${CIRCLE_PROJECT_REPONAME}-${CIRCLE_SHA1}.tar.gz"
cp -rf configuration \
node_modules \
src \
run.sh \
package.json \
public \
docs \
publish.js \
./artifact/
pushd ./artifact
echo "Taring ${DEPLOYABLE}"
tar -zcvf $DEPLOYABLE *
popd
cp -rf ./deployment ./artifact/
mkdir -p /tmp/repo && mv artifact /tmp/repo/
- persist_to_workspace:
root: /tmp/repo
paths:
- artifact
upload-package:
environment:
ENVIRONMENT: "dev"
REGION: "eu-central-1"
working_directory: /tmp/repo
docker:
- image: monosolutions/awscli:latest
steps:
- attach_workspace:
at: /tmp/repo
- run:
name: Upload Artifact Dev
command: |
aws configure set aws_access_key_id "${AWS_DEV_ACCESS_KEY}"
aws configure set aws_secret_access_key "${AWS_DEV_SECRET_KEY}"
BUCKET="mono-deployment-${ENVIRONMENT}"
DEPLOYABLE="${CIRCLE_PROJECT_REPONAME}-${CIRCLE_SHA1}.tar.gz"
{
aws s3api create-bucket --bucket "${BUCKET}"
} || {
echo "Bucket is here"
}
aws s3 cp "/tmp/repo/artifact/${DEPLOYABLE}" "s3://${BUCKET}/tileserver-gl/${DEPLOYABLE}"
- run:
name: Upload Artifact Prod
command: |
ENVIRONMENT="prod"
aws configure set aws_access_key_id "${AWS_PROD_ACCESS_KEY}"
aws configure set aws_secret_access_key "${AWS_PROD_SECRET_KEY}"
BUCKET="mono-deployment-${ENVIRONMENT}"
DEPLOYABLE="${CIRCLE_PROJECT_REPONAME}-${CIRCLE_SHA1}.tar.gz"
{
aws s3api create-bucket --bucket "${BUCKET}"
} || {
echo "Bucket is here"
}
aws s3 cp "/tmp/repo/artifact/${DEPLOYABLE}" "s3://${BUCKET}/tileserver-gl/${DEPLOYABLE}"
- persist_to_workspace:
root: /tmp/repo
paths:
- artifact
deploy-to-dev:
docker:
- image: monosolutions/terraform:1.0.4
working_directory: /tmp/repo/artifact/deployment
environment:
REGION: "eu-central-1"
ENVIRONMENT: "dev"
steps:
- attach_workspace:
at: /tmp/repo
- run:
name: Configure deployment
command: |
aws configure set aws_access_key_id "${AWS_DEV_ACCESS_KEY}"
aws configure set aws_secret_access_key "${AWS_DEV_SECRET_KEY}"
aws configure set region "${REGION}"
ssh -T -oStrictHostKeyChecking=no git@github.com || true
mkdir ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.14.10/terragrunt_linux_amd64 -O terragrunt
chmod a+x terragrunt
mv terragrunt /bin/
- run:
name: Deploy tileserver-alb to fra dev
command: |
cd /tmp/repo/artifact/deployment/eu-central-1/dev/tileserver-alb && \
terragrunt apply --terragrunt-non-interactive -auto-approve
- run:
name: Deploy tileserver to fra dev
command: |
cd /tmp/repo/artifact/deployment/eu-central-1/dev/tileserver && \
terragrunt apply \
-var="aws_access_key=$AWS_DEV_ACCESS_KEY" \
-var="aws_secret_key=$AWS_DEV_SECRET_KEY" \
-var="repo_version=$CIRCLE_SHA1" \
--terragrunt-non-interactive -auto-approve
deploy-to-prod:
docker:
- image: monosolutions/terraform:1.0.4
working_directory: /tmp/repo/artifact/deployment
environment:
REGION: "eu-central-1"
ENVIRONMENT: "prod"
steps:
- attach_workspace:
at: /tmp/repo
- run:
name: Configure deployment
command: |
aws configure set aws_access_key_id "${AWS_PROD_ACCESS_KEY}"
aws configure set aws_secret_access_key "${AWS_PROD_SECRET_KEY}"
aws configure set region "${REGION}"
ssh -T -oStrictHostKeyChecking=no git@github.com || true
mkdir ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.14.10/terragrunt_linux_amd64 -O terragrunt
chmod a+x terragrunt
mv terragrunt /bin/
- run:
name: Deploy tileserver-alb to fra prod
command: |
cd /tmp/repo/artifact/deployment/eu-central-1/prod/tileserver-alb && \
terragrunt apply --terragrunt-non-interactive -auto-approve
- run:
name: Deploy tileserver to fra prod
command: |
cd /tmp/repo/artifact/deployment/eu-central-1/prod/tileserver && \
terragrunt apply \
-var="aws_access_key=$AWS_DEV_ACCESS_KEY" \
-var="aws_secret_key=$AWS_DEV_SECRET_KEY" \
-var="repo_version=$CIRCLE_SHA1" \
--terragrunt-non-interactive -auto-approve
workflows:
version: 2
deploy:
jobs:
- build-package
- upload-package:
requires:
- build-package
- deploy-to-dev:
requires:
- upload-package
- approve-for-live:
requires:
- deploy-to-dev
filters:
branches:
only:
- master
type: approval
- deploy-to-prod:
requires:
- approve-for-live

1
.gitignore vendored
View file

@ -4,5 +4,4 @@ test_data
data
light
plugins
config.json
*.mbtiles

35
Dockerfile_test Normal file
View file

@ -0,0 +1,35 @@
# Run tests inside docker without requiring full installation of dependencies on local machine
# Simply run "docker build -f Dockerfile_test ."
# WARNING: sometimes it fails with a core dumped exception
FROM node:6-stretch
MAINTAINER Petr Sloup <petr.sloup@klokantech.com>
RUN apt-get -qq update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install \
apt-transport-https \
curl \
unzip \
build-essential \
python \
libcairo2-dev \
libgles2-mesa-dev \
libgbm-dev \
libllvm3.9 \
libprotobuf-dev \
libxxf86vm-dev \
xvfb \
&& apt-get clean
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN wget -O test_data.zip https://github.com/klokantech/tileserver-gl/releases/download/v1.3.0/test_data.zip
RUN unzip -q test_data.zip -d test_data
ENV NODE_ENV="test"
COPY package.json .
RUN npm install
COPY / .
RUN xvfb-run --server-args="-screen 0 1024x768x24" npm test

View file

@ -2,8 +2,6 @@ It is great you want to help us making TileServer GL project better!
This is the right place only for a software bug report or a new software feature request.
NOTE: Questions about OpenMapTiles data, OpenMapTiles Server, TileHosting and other software/products do not belong here (and will not be answered)!
The usage and installation questions belongs to https://stackoverflow.com/questions/tagged/openmaptiles
A guaranteed support and consulting from the core developers via https://openmaptiles.com/support/

View file

@ -20,7 +20,7 @@ npm install -g tileserver-gl
Now download vector tiles from [OpenMapTiles](https://openmaptiles.org/downloads/).
```bash
curl -o zurich_switzerland.mbtiles https://[GET-YOUR-LINK]/extracts/zurich_switzerland.mbtiles
curl -o zurich_switzerland.mbtiles https://openmaptiles.os.zhdk.cloud.switch.ch/v3.3/extracts/zurich_switzerland.mbtiles
```
Start `tileserver-gl` with the downloaded vector tiles.
@ -46,3 +46,29 @@ On laptop you can use [Docker Kitematic](https://kitematic.com/) and search "til
## Documentation
You can read full documentation of this project at http://tileserver.readthedocs.io/.
## Offline development to fix styles
Tool and instructions: https://openmaptiles.org/docs/style/maputnik/
Run the `maputnik` executable to start a server on `localhost:8000`, open your browser and visit the address.
To inspect and make temporary changes to our styles you can load them using the live tileJSON URLs either for dev or prod.
To load the map data that we use make sure you use the live URL that points to the data OSM2Vector tileJSON.
Latest tilserver README: https://buildmedia.readthedocs.org/media/pdf/tileserver/latest/tileserver.pdf
### Updating Styles/Sprites
Updated the point label groups, grouping by rank and zoom level.
Fixed some landuse colors of class pitch (Fx #15.65/55.698642/12.572399).
Railway lines added to each style.
Updated the "image-icon" reference in the styles from {maki}-11 to {class}-11.
The name of each icon to be shown is the same as the class name.
### NOTE:
When uploading a local JSON file to the the Maputnik editor, change the source URL, the sprite and glyphs to URLs.
Fx: ["sprite": "mono"] to ["sprite": "https://maps.monomaps.com/styles/updated-mono/sprite"]

View file

@ -0,0 +1,33 @@
{
"options": {
"paths": {
"root": "mbtiles/2019-05-20_data",
"fonts": "glyphs",
"sprites": "sprites",
"mbtiles": "mbtiles",
"styles": "styles"
}
},
"styles": {
"updated-mono": {
"style": "mono.json"
},
"mono-bw": {
"style": "mono-bw.json"
},
"mono-blue-water": {
"style": "mono-blue-water.json"
},
"mono-blue": {
"style": "mono-blue.json"
},
"mono-chrome": {
"style": "mono-chrome.json"
}
},
"data": {
"osm2vectortiles": {
"mbtiles": "planet.mbtiles"
}
}
}

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,3 @@

Open Sans Bold 10240-10495

View file

@ -0,0 +1,3 @@

Open Sans Bold 10496-10751

View file

@ -0,0 +1,3 @@

Open Sans Bold 10752-11007

View file

@ -0,0 +1,3 @@

Open Sans Bold 11008-11263

View file

@ -0,0 +1,3 @@

Open Sans Bold 11264-11519

View file

@ -0,0 +1,3 @@

Open Sans Bold 11520-11775

View file

@ -0,0 +1,3 @@

Open Sans Bold 11776-12031

View file

@ -0,0 +1,3 @@

Open Sans Bold 12032-12287

View file

@ -0,0 +1,3 @@

Open Sans Bold 12288-12543

View file

@ -0,0 +1,3 @@

Open Sans Bold 12544-12799

Binary file not shown.

View file

@ -0,0 +1,3 @@

Open Sans Bold 12800-13055

View file

@ -0,0 +1,3 @@

Open Sans Bold 13056-13311

View file

@ -0,0 +1,3 @@

Open Sans Bold 13312-13567

View file

@ -0,0 +1,3 @@

Open Sans Bold 13568-13823

View file

@ -0,0 +1,3 @@

Open Sans Bold 13824-14079

View file

@ -0,0 +1,3 @@

Open Sans Bold 14080-14335

View file

@ -0,0 +1,3 @@

Open Sans Bold 14336-14591

View file

@ -0,0 +1,3 @@

Open Sans Bold 14592-14847

View file

@ -0,0 +1,3 @@

Open Sans Bold 14848-15103

View file

@ -0,0 +1,3 @@

Open Sans Bold 15104-15359

View file

@ -0,0 +1,3 @@

Open Sans Bold 1536-1791

View file

@ -0,0 +1,3 @@

Open Sans Bold 15360-15615

View file

@ -0,0 +1,3 @@

Open Sans Bold 15616-15871

View file

@ -0,0 +1,3 @@

Open Sans Bold 15872-16127

View file

@ -0,0 +1,3 @@

Open Sans Bold 16128-16383

View file

@ -0,0 +1,3 @@

Open Sans Bold 16384-16639

View file

@ -0,0 +1,3 @@

Open Sans Bold 16640-16895

View file

@ -0,0 +1,3 @@

Open Sans Bold 16896-17151

View file

@ -0,0 +1,3 @@

Open Sans Bold 17152-17407

View file

@ -0,0 +1,3 @@

Open Sans Bold 17408-17663

View file

@ -0,0 +1,3 @@

Open Sans Bold 17664-17919

View file

@ -0,0 +1,3 @@

Open Sans Bold 1792-2047

View file

@ -0,0 +1,3 @@

Open Sans Bold 17920-18175

View file

@ -0,0 +1,3 @@

Open Sans Bold 18176-18431

View file

@ -0,0 +1,3 @@

Open Sans Bold 18432-18687

View file

@ -0,0 +1,3 @@

Open Sans Bold 18688-18943

View file

@ -0,0 +1,3 @@

Open Sans Bold 18944-19199

View file

@ -0,0 +1,3 @@

Open Sans Bold 19200-19455

View file

@ -0,0 +1,3 @@

Open Sans Bold 19456-19711

View file

@ -0,0 +1,3 @@

Open Sans Bold 19712-19967

View file

@ -0,0 +1,3 @@

Open Sans Bold 19968-20223

View file

@ -0,0 +1,3 @@

Open Sans Bold 20224-20479

View file

@ -0,0 +1,3 @@

Open Sans Bold 2048-2303

View file

@ -0,0 +1,3 @@

Open Sans Bold 20480-20735

View file

@ -0,0 +1,3 @@

Open Sans Bold 20736-20991

View file

@ -0,0 +1,3 @@

Open Sans Bold 20992-21247

View file

@ -0,0 +1,3 @@

Open Sans Bold 21248-21503

View file

@ -0,0 +1,3 @@

Open Sans Bold 21504-21759

View file

@ -0,0 +1,3 @@

Open Sans Bold 21760-22015

View file

@ -0,0 +1,3 @@

Open Sans Bold 22016-22271

View file

@ -0,0 +1,3 @@

Open Sans Bold 22272-22527

View file

@ -0,0 +1,3 @@

Open Sans Bold 22528-22783

View file

@ -0,0 +1,3 @@

Open Sans Bold 22784-23039

View file

@ -0,0 +1,3 @@

Open Sans Bold 2304-2559

View file

@ -0,0 +1,3 @@

Open Sans Bold 23040-23295

View file

@ -0,0 +1,3 @@

Open Sans Bold 23296-23551

View file

@ -0,0 +1,3 @@

Open Sans Bold 23552-23807

View file

@ -0,0 +1,3 @@

Open Sans Bold 23808-24063

View file

@ -0,0 +1,3 @@

Open Sans Bold 24064-24319

View file

@ -0,0 +1,3 @@

Open Sans Bold 24320-24575

View file

@ -0,0 +1,3 @@

Open Sans Bold 24576-24831

View file

@ -0,0 +1,3 @@

Open Sans Bold 24832-25087

View file

@ -0,0 +1,3 @@

Open Sans Bold 25088-25343

View file

@ -0,0 +1,3 @@

Open Sans Bold 25344-25599

Binary file not shown.

View file

@ -0,0 +1,3 @@

Open Sans Bold 2560-2815

View file

@ -0,0 +1,3 @@

Open Sans Bold 25600-25855

View file

@ -0,0 +1,3 @@

Open Sans Bold 25856-26111

View file

@ -0,0 +1,3 @@

Open Sans Bold 26112-26367

View file

@ -0,0 +1,3 @@

Open Sans Bold 26368-26623

View file

@ -0,0 +1,3 @@

Open Sans Bold 26624-26879

View file

@ -0,0 +1,3 @@

Open Sans Bold 26880-27135

View file

@ -0,0 +1,3 @@

Open Sans Bold 27136-27391

View file

@ -0,0 +1,3 @@

Open Sans Bold 27392-27647

View file

@ -0,0 +1,3 @@

Open Sans Bold 27648-27903

View file

@ -0,0 +1,3 @@

Open Sans Bold 27904-28159

View file

@ -0,0 +1,3 @@

Open Sans Bold 2816-3071

View file

@ -0,0 +1,3 @@

Open Sans Bold 28160-28415

View file

@ -0,0 +1,3 @@

Open Sans Bold 28416-28671

View file

@ -0,0 +1,3 @@

Open Sans Bold 28672-28927

View file

@ -0,0 +1,3 @@

Open Sans Bold 28928-29183

View file

@ -0,0 +1,3 @@

Open Sans Bold 29184-29439

View file

@ -0,0 +1,3 @@

Open Sans Bold 29440-29695

View file

@ -0,0 +1,3 @@

Open Sans Bold 29696-29951

View file

@ -0,0 +1,3 @@

Open Sans Bold 29952-30207

View file

@ -0,0 +1,3 @@

Open Sans Bold 30208-30463

View file

@ -0,0 +1,3 @@

Open Sans Bold 30464-30719

View file

@ -0,0 +1,3 @@

Open Sans Bold 3072-3327

View file

@ -0,0 +1,3 @@

Open Sans Bold 30720-30975

View file

@ -0,0 +1,3 @@

Open Sans Bold 30976-31231

View file

@ -0,0 +1,3 @@

Open Sans Bold 31232-31487

Some files were not shown because too many files have changed in this diff Show more