Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added proj support #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

added proj support #10

wants to merge 1 commit into from

Conversation

ayl
Copy link

@ayl ayl commented Dec 26, 2021

Fixed ENV for MAPNIK_VERSION and added support for proj (default proj from Debian was too far ahead, mapnik v3.1 needs proj v5.xx)

Copy link
Member

@Joxit Joxit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thank you for your contribution 😄 I left you some comments
For the record, the issue about this change : mapnik/mapnik#4036

@@ -14,7 +14,7 @@

FROM debian:bullseye-slim

ENV MAPNIK_VERSION v3.1.0
ENV MAPNIK_VERSION=v3.1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not necessary IMO

&& ln -s /usr/local/lib/mapnik /usr/local/lib/plugins

#WORKDIR /usr/local/lib
#ENTRYPOINT ["mapnik-render"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove these two lines

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mapnik-render requires to be run where it can access the plugins in "plugins/input" This is the reason for the symlink and the workdir.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it's related to this comment #2 (comment)

Mapnik team says:

mapnik-render at this point is only designed to be used locally, from within a mapnik git clone. So it is not expected to work if installed.

So adding workarounds for these purposes is not necessary.

&& cd /root \
&& wget 'https://download.osgeo.org/proj/proj-5.2.0.tar.gz' \
&& tar -zxf proj-5.2.0.tar.gz \
&& cd proj-5.2.0 \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to replace this by

-    && cd /root \
-    && wget 'https://download.osgeo.org/proj/proj-5.2.0.tar.gz' \
-    && tar -zxf proj-5.2.0.tar.gz \
-    && cd proj-5.2.0 \
+    && mkdir proj \
+    && wget -q 'https://download.osgeo.org/proj/proj-5.2.0.tar.gz' -O - | tar -zx --strip-components=1 -C proj \
+    && cd proj \

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that your code is cleaner.

@@ -77,4 +87,8 @@ RUN apt-get update \
&& rm -r mapnik \
&& apt-get autoremove -y --purge $BUILD_DEPENDENCIES \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /usr/local/lib/mapnik /usr/lib/mapnik
&& ln -s /usr/local/lib/mapnik /usr/lib/mapnik \
&& ln -s /usr/local/lib/mapnik /usr/local/lib/plugins
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you link the mapnik folder to plugin ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is for mapnik-render to be able to access the plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants