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

Use predefined shp2img command for debugging #4937

Merged
merged 2 commits into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions doc/developer/build_release.rst.mako
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ Before doing a release you should merge all the previous branch on this one:

.. prompt:: bash

./docker-run alembic \
--config=geoportal/tests/functional/alembic.ini \
./docker-run alembic ${'\\'}
--config=geoportal/tests/functional/alembic.ini ${'\\'}
--name=main heads
./docker-run alembic \
--config=geoportal/tests/functional/alembic.ini \
./docker-run alembic ${'\\'}
--config=geoportal/tests/functional/alembic.ini ${'\\'}
--name=static heads

If yes create the merge with:

.. prompt:: bash

./docker-run alembic \
--config=geoportal/tests/functional/alembic.ini --name=[main|static] \
merge --message="Merge <src> and <dst> branches" \
./docker-run alembic ${'\\'}
--config=geoportal/tests/functional/alembic.ini --name=[main|static] ${'\\'}
merge --message="Merge <src> and <dst> branches" ${'\\'}
<rev 1> <rev 2>

Remove the import and replace the core of the method by ``pass`` in the generated file.
Expand Down
6 changes: 3 additions & 3 deletions doc/developer/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ Sometimes, more information can be obtained by using this command:

.. prompt:: bash

docker-compose exec mapserver shp2img -m <mapfile> -o test.png -e <minx> <miny> <maxx> <maxy> \
-s <sizex> <sizey> -l <layers>
docker-compose exec mapserver shp2img -m /etc/mapserver/mapserver.map -o /tmp/test.png ${'\\'}
-e 500000 100000 700000 300000 -s 1000 1000 [-l <layers>]

You may also activate MapServer's debug mode and set the environment variable ``MS_DEBUGLEVEL``
of the MapServer container ``MS_DEBUGLEVEL`` to ``5`` (most verbose level, default is 0).
of the MapServer container ``DEBUG`` to ``5`` (most verbose level, default is 0).

`More information <https://mapserver.org/optimization/debugging.html?highlight=debug#debug-levels>`_

Expand Down
14 changes: 7 additions & 7 deletions doc/integrator/fulltext_search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ If you do want to create the table manually, you can use the following SQL comma

.. code:: sql

CREATE TABLE <schema_name>.tsearch ( \
id SERIAL PRIMARY KEY, \
layer_name TEXT, \
label TEXT, \
public BOOLEAN DEFAULT 't', \
params TEXT, \
role_id INTEGER REFERENCES <schema_name>.role, \
CREATE TABLE <schema_name>.tsearch (
id SERIAL PRIMARY KEY,
layer_name TEXT,
label TEXT,
public BOOLEAN DEFAULT 't',
params TEXT,
role_id INTEGER REFERENCES <schema_name>.role,
ts TSVECTOR);
SELECT AddGeometryColumn('<schema_name>', 'tsearch', 'the_geom', <srid>, 'GEOMETRY', 2);
CREATE INDEX tsearch_ts_idx ON <schema_name>.tsearch USING gin(ts);
Expand Down
8 changes: 4 additions & 4 deletions doc/integrator/ngeo_new_interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ If you want a new mobile interface, get the default files as follows:

.. prompt:: bash

cp CONST_create_template/geoportal/<package>_geoportal/static-ngeo/js/apps/mobile.html.ejs \
cp CONST_create_template/geoportal/<package>_geoportal/static-ngeo/js/apps/mobile.html.ejs ${'\\'}
geoportal/<package>_geoportal/static-ngeo/js/apps/<interface>.html.ejs
cp CONST_create_template/geoportal/<package>_geoportal/static-ngeo/js/apps/Controllermobile.js \
cp CONST_create_template/geoportal/<package>_geoportal/static-ngeo/js/apps/Controllermobile.js ${'\\'}
geoportal/<package>_geoportal/static-ngeo/js/apps/Controller<interface>.js

If you want a new desktop interface, get the default files as follows:

.. prompt:: bash

cp CONST_create_template/geoportal/<package>_geoportal/static-ngeo/js/apps/desktop.html.ejs \
cp CONST_create_template/geoportal/<package>_geoportal/static-ngeo/js/apps/desktop.html.ejs ${'\\'}
geoportal/<package>_geoportal/static-ngeo/js/apps/<interface>.html.ejs
cp CONST_create_template/geoportal/<package>_geoportal/static-ngeo/js/apps/Controllerdesktop.js \
cp CONST_create_template/geoportal/<package>_geoportal/static-ngeo/js/apps/Controllerdesktop.js ${'\\'}
geoportal/<package>_geoportal/static-ngeo/js/apps/Controller<interface>.js

Edit interface files
Expand Down
13 changes: 8 additions & 5 deletions doc/integrator/objectstorage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ Use the aws client to list the files:

.. prompt:: bash

aws --endpoint-url https://sos-ch-dk-2.exo.io/ --region ch-dk-2 s3 ls s3://<bucket>/<folder>
aws --endpoint-url https://sos-ch-dk-2.exo.io/ --region ch-dk-2 s3 ls ${'\\'}
s3://<bucket>/<folder>


Create the vrt file for a raster layer:

.. prompt:: bash

gdalbuildvrt `aws --endpoint-url https://sos-ch-dk-2.exo.io/ --region ch-dk-2 s3 ls \
s3://<bucket>/<folder>/*.geotiff|awk '{print $4}'` s3://<bucket>/<folder>/index.vrt
gdalbuildvrt `aws --endpoint-url https://sos-ch-dk-2.exo.io/ ${'\\'}
--region ch-dk-2 s3 ls s3://<bucket>/<folder>/*.geotiff ${'\\'}
|awk '{print $4}'` s3://<bucket>/<folder>/index.vrt


MapServer
Expand All @@ -47,8 +49,9 @@ 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>/*.geotiff|awk '{print $4}'`
gdaltindex mapserver/index.shp ${'\\'}
`aws --endpoint-url https://sos-ch-dk-2.exo.io/ --region ch-dk-2 ${'\\'}
s3 ls s3://<bucket>/<folder>/*.geotiff|awk '{print $4}'`


Add the following config in the ``mapserver/mapserver.map.tmpl`` file:
Expand Down
10 changes: 6 additions & 4 deletions doc/integrator/upgrade_application.rst.mako
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,15 @@ For example, for converting french texts, in non docker context, the script can
.. prompt:: bash

docker-compose up -d
./docker-compose-run l10nv1tov2 fr geoportal/<package>_geoportal/static/js/Proj/Lang/fr.js ${'\\'}
geoportal/<package>_geoportal/locale/fr/LC_MESSAGES/geoportal-client.po
./docker-compose-run l10nv1tov2 fr ${'\\'}
geoportal/<package>_geoportal/static/js/Proj/Lang/fr.js ${'\\'}
geoportal/<package>_geoportal/locale/fr/LC_MESSAGES/geoportal-client.po


In a non docker project, the script can be used as follows:

.. prompt:: bash

.build/venv/bin/l10nv1tov2 fr geoportal/<package>_geoportal/static/js/Proj/Lang/fr.js \
geoportal/locale/fr/LC_MESSAGES/geoportal-client.po
.build/venv/bin/l10nv1tov2 fr ${'\\'}
geoportal/<package>_geoportal/static/js/Proj/Lang/fr.js ${'\\'}
geoportal/locale/fr/LC_MESSAGES/geoportal-client.po