Skip to content

Commit

Permalink
support legacy Web Merc Google EPSG:900913 for proj
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Sep 16, 2020
1 parent f56b35d commit 4f2f353
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: justb4/mapproxy
tags: latest,1.12.0-1
tags: latest,1.12.0-2
tag_with_ref: false
tag_with_sha: false
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ FROM debian:buster-slim
# Upgrade notes: in bullseye: use libproj19 uwsgi-plugin-python3 (i.s.o. pip3 uwsgi)
# --plugin /usr/lib/uwsgi/plugins/python3_plugin.so in uwsgi command and remove --wsgi-disable-file-wrapper
#
# Nasty fix: added Google Web Merc projection EPSG:900913 for legacy MP configs (clients use /EPSG:900913/ in URLs!)
# Upgrade notes: Debian bullseye-slim and proj.6: will need SQLite for proj.db i.s.o. /usr/share/proj/epsg!!

LABEL original_developer="Arne Schubert <[email protected]>"
LABEL contributor="Just van den Broecke <[email protected]>"

# Build ARGS
ARG TIMEZONE="Europe/Amsterdam"
ARG TZ="Europe/Amsterdam"
ARG LOCALE="en_US.UTF-8"
# Only adds 1MB and handy tools
ARG ADD_DEB_PACKAGES="curl xsltproc libxml2-utils"
Expand All @@ -33,11 +36,13 @@ ENV MAPPROXY_PROCESSES="4" \
DEBIAN_FRONTEND="noninteractive" \
DEB_BUILD_DEPS="python3-pip build-essential python3-dev python3-setuptools python3-wheel" \
DEB_PACKAGES="python3-pil python3-yaml python3-gdal libproj13 python3-lxml python3-shapely libgeos-dev uwsgi-plugin-python3 ${ADD_DEB_PACKAGES}" \
PIP_PACKAGES="uwsgi requests geojson MapProxy==${MAPPROXY_VERSION} ${ADD_PIP_PACKAGES}"
PIP_PACKAGES="uwsgi requests geojson MapProxy==${MAPPROXY_VERSION} ${ADD_PIP_PACKAGES}" \
GOOGLE_WEB_MERC_EPSG="<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs <>"

RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends -y ${DEB_BUILD_DEPS} ${DEB_PACKAGES} ${ADD_DEB_PACKAGES} \
&& echo ${GOOGLE_WEB_MERC_EPSG} >> /usr/share/proj/epsg \
&& useradd -ms /bin/bash mapproxy \
&& mkdir -p /mapproxy \
&& chown mapproxy /mapproxy \
Expand Down

0 comments on commit 4f2f353

Please sign in to comment.