Skip to content

Commit

Permalink
Merge pull request #6571 from camptocamp/doc-tiles
Browse files Browse the repository at this point in the history
Fix the documentation to generate the tiles
  • Loading branch information
sbrunner committed Jun 24, 2020
2 parents 33412f6 + fa52a48 commit 95288f4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
20 changes: 13 additions & 7 deletions doc/integrator/objectstorage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ Create the vrt file for a raster layer:

.. prompt:: bash

docker-compose exec geoportal ${'\\'}
gdalbuildvrt /vsis3/<bucket>/<folder>/index.vrt \
$(list4vrt <bucket> <folder>/)
docker-compose exec geoportal bash -c ${'\\'}
'gdalbuildvrt /vsis3/<bucket>/<folder>/index.vrt \
$(list4vrt <bucket> <folder>/ .tif)'


MapServer
---------
Expand All @@ -55,10 +56,15 @@ Create the shape index file for a raster layer:

.. prompt:: bash

gdaltindex mapserver/index.shp \
`aws --endpoint-url https://sos-ch-dk-2.exo.io/ --region ch-dk-2 \
s3 ls s3://<bucket>/<folder>/ | grep tif | awk '{print "/vsis3/<bucket>/<folder>/"$4}'`

docker-compose exec geoportal bash -c \
'gdaltindex index.shp $(\
aws --endpoint-url http://${AWS_S3_ENDPOINT} --region ${AWS_DEFAULT_REGION} \
s3 ls s3://<bucket>/<folder>/ | grep tif$ | \
awk '"'"'{print "/vsis3/<bucket>/<folder>/"$4}'"'"'
)'
docker cp <docker_compose_project_name>_geoportal_1:/app/index.shp mapserver/
docker cp <docker_compose_project_name>_geoportal_1:/app/index.shx mapserver/
docker cp <docker_compose_project_name>_geoportal_1:/app/index.dbf mapserver/

Add the following config in the ``mapserver/mapserver.map.tmpl`` file:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ services:
- C2C_DEBUG_VIEW_ENABLED=TRUE
- C2C_SECRET
- LOG_TYPE
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION
- AWS_S3_ENDPOINT

alembic:
image: ${DOCKER_BASE}-geoportal:${DOCKER_TAG}
Expand Down

0 comments on commit 95288f4

Please sign in to comment.