Compare commits
No commits in common. "main" and "smartphone_adaptation" have entirely different histories.
main
...
smartphone
@ -1,2 +1 @@
|
|||||||
vendor/GeoNature-citizen/frontend/node_modules
|
vendor/GeoNature-citizen/frontend/node_modules
|
||||||
node_modules/
|
|
@ -1,4 +1,5 @@
|
|||||||
FROM python:3.8-slim-buster
|
FROM debian:buster-slim
|
||||||
|
# todo utiliser image python3 ?
|
||||||
|
|
||||||
## install dependencies
|
## install dependencies
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
@ -20,7 +21,8 @@ RUN echo "appuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
|||||||
COPY vendor/GeoNature-citizen/ /home/appuser/citizen/
|
COPY vendor/GeoNature-citizen/ /home/appuser/citizen/
|
||||||
|
|
||||||
# patches
|
# patches
|
||||||
COPY patches/back/default_config.toml /home/appuser/citizen/config/config.toml
|
COPY patches/back/requirements.txt /home/appuser/citizen/backend/requirements.txt
|
||||||
|
COPY patches/back/default_config.toml /home/appuser/citizen/config/default_config.toml
|
||||||
COPY patches/settings.ini /home/appuser/citizen/config/settings.ini
|
COPY patches/settings.ini /home/appuser/citizen/config/settings.ini
|
||||||
COPY patches/back/wsgi.py /home/appuser/citizen/backend/wsgi.py
|
COPY patches/back/wsgi.py /home/appuser/citizen/backend/wsgi.py
|
||||||
COPY patches/back/server.py /home/appuser/citizen/backend/server.py
|
COPY patches/back/server.py /home/appuser/citizen/backend/server.py
|
||||||
@ -31,8 +33,6 @@ USER appuser
|
|||||||
|
|
||||||
WORKDIR /home/appuser/citizen/backend/
|
WORKDIR /home/appuser/citizen/backend/
|
||||||
|
|
||||||
RUN mkdir /home/appuser/citizen/media/
|
|
||||||
|
|
||||||
ENV VIRTUAL_ENV=/home/appuser/citizen/backend/venv2/
|
ENV VIRTUAL_ENV=/home/appuser/citizen/backend/venv2/
|
||||||
RUN python3 -m venv $VIRTUAL_ENV
|
RUN python3 -m venv $VIRTUAL_ENV
|
||||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
|
@ -4,7 +4,7 @@ FROM debian:buster-slim
|
|||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get upgrade -y && \
|
apt-get upgrade -y && \
|
||||||
apt-get install -y sudo vim nano locales unzip && \
|
apt-get install -y sudo vim nano locales unzip && \
|
||||||
apt-get install -y python-dev python-pip libpq-dev libgeos-dev python3 python3-pip unzip libffi-dev && \
|
apt-get install -y python-dev python-pip libpq-dev libgeos-dev python3 python3-pip unzip && \
|
||||||
apt-get install -y python3-venv git npm wget postgresql-client && \
|
apt-get install -y python3-venv git npm wget postgresql-client && \
|
||||||
localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8 && \
|
localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8 && \
|
||||||
apt-get clean
|
apt-get clean
|
||||||
@ -39,12 +39,8 @@ RUN /bin/bash create_sys_dir.sh
|
|||||||
|
|
||||||
|
|
||||||
# Install dependencies:
|
# Install dependencies:
|
||||||
RUN pip install --upgrade pip setuptools wheel
|
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
RUN cp static/app/constants.js.sample static/app/constants.js
|
|
||||||
RUN cd static && npm install
|
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
CMD ["python", "server.py ", "runserver"]
|
CMD ["python", "server.py ", "runserver"]
|
104
README
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
TODO FUSION entre README & README.md
|
||||||
|
|
||||||
|
# gl-geonature
|
||||||
|
|
||||||
|
L'instance Geonature-Citizen de Champs-Libres.
|
||||||
|
|
||||||
|
# Installation développeur (docker-compose )
|
||||||
|
|
||||||
|
## Multiple containers
|
||||||
|
|
||||||
|
Get the code (using git-submodule) for : citizen & taxhub.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git submodule update --init --recursive
|
||||||
|
```
|
||||||
|
|
||||||
|
### DB init
|
||||||
|
|
||||||
|
Creation of the table `referentielsdb` that will be used for storing data.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker-compose up -d db
|
||||||
|
$ docker-compose exec db createdb -U postgres referentielsdb
|
||||||
|
$ docker-compose exec db psql -U postgres -d referentielsdb -c "CREATE SCHEMA taxonomie"
|
||||||
|
$ docker-compose exec db psql -d -U postgres -d referentielsdb -c "CREATE EXTENSION postgis"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Taxhub
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker-compose run taxhub bash install_db.sh
|
||||||
|
$ docker-compose up -d taxhub
|
||||||
|
```
|
||||||
|
|
||||||
|
#### CREATION / Compiation du JS de Taxhub
|
||||||
|
|
||||||
|
##### Mise à jour de nppm.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker-compose exec -u root taxhub bash
|
||||||
|
taxhub $ npm install npm@latest -g # mise à jour de npm
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Compilation du code
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker-compose exec taxhub bash
|
||||||
|
taxhub $ cd static
|
||||||
|
taxhub $ cp app/constants.js.sample app/constants.js
|
||||||
|
taxhub $ npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Citizen-front
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker-compose run --rm citizen-front npm install
|
||||||
|
$ docker-compose run --rm citizen-front npm run build:i18n-ssr
|
||||||
|
$ docker-compose up -d citizen-front
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Citizen-back
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose up -d citizen-front
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Apache
|
||||||
|
|
||||||
|
Redigie de 8080 vers autres services :
|
||||||
|
- 4000 (citizen-front)
|
||||||
|
- 5002 (citizen-back)
|
||||||
|
- 5000 (taxon)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Single container (depreciated)
|
||||||
|
|
||||||
|
### Creation DB (pour single container)
|
||||||
|
|
||||||
|
docker-compose exec db createdb -U postgres citizen
|
||||||
|
docker-compose exec db psql -U postgres -d citizen -c "CREATE SCHEMA taxonomie"
|
||||||
|
ref_geo
|
||||||
|
|
||||||
|
docker-compose exec db psql -d -U postgres -d citizen -c "CREATE EXTENSION postgis"
|
||||||
|
|
||||||
|
|
||||||
|
$ git submodule update --init --recursive
|
||||||
|
$ docker-compose up -d
|
||||||
|
$ docker-compose exec citizen install/install_app.sh
|
||||||
|
|
||||||
|
note: les credentials pour accéder au backend se trouvent dans /home/appuser/citizen/config
|
||||||
|
|
||||||
|
### Remise en route du service
|
||||||
|
|
||||||
|
$ docker-compose up -d
|
||||||
|
$ docker-compose exec citizen sh install/restart.sh
|
||||||
|
|
||||||
|
# Documentation :
|
||||||
|
|
||||||
|
$ make doc
|
106
README.md
@ -31,12 +31,10 @@ $ docker-compose exec db psql -d -U postgres -d referentielsdb -c "CREATE EXTENS
|
|||||||
|
|
||||||
### Build the other containers
|
### Build the other containers
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker-compose up
|
$ docker-compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
At this stage, you still have to install Taxhub and compile the front to see the app running!
|
|
||||||
|
|
||||||
### Compile the front
|
### Compile the front
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -44,21 +42,6 @@ $ docker-compose run --rm citizen-front npm install
|
|||||||
$ docker-compose run --rm citizen-front npm run build:i18n-ssr
|
$ docker-compose run --rm citizen-front npm run build:i18n-ssr
|
||||||
```
|
```
|
||||||
|
|
||||||
### Taxhub installation
|
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-compose run taxhub bash install_db.sh
|
|
||||||
$ docker-compose up -d taxhub
|
|
||||||
```
|
|
||||||
|
|
||||||
### nginx
|
|
||||||
|
|
||||||
Redirige de 8080 vers autres services :
|
|
||||||
|
|
||||||
- 4000 (citizen-front)
|
|
||||||
- 5002 (citizen-back)
|
|
||||||
- 5000 (taxon)
|
|
||||||
|
|
||||||
### Starting
|
### Starting
|
||||||
For starting the application again, you may start the db container first
|
For starting the application again, you may start the db container first
|
||||||
|
|
||||||
@ -67,55 +50,58 @@ $ docker-compose up -d db
|
|||||||
$ docker-compose up
|
$ docker-compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
### Post-installation
|
|
||||||
|
|
||||||
1) Create a user account through the application and/or in the admin
|
## Misc.
|
||||||
2) Create a project, a "zone géographique", a form, a "type de site", a program (see https://gitea.champs-libres.be/champs-libres/biommap/wiki/Gestion-des-programmes)
|
### Taxhub
|
||||||
|
|
||||||
## Development
|
```
|
||||||
|
$ docker-compose run taxhub bash install_db.sh
|
||||||
### Inspect db
|
$ docker-compose up -d taxhub
|
||||||
|
|
||||||
There is a pgweb container that allows to inspect the db, at <http://localhost:8081/>. Use the following credentials to connect:
|
|
||||||
|
|
||||||
* host: db
|
|
||||||
* un: postgres
|
|
||||||
* pw: postgres
|
|
||||||
* dbname: referentielsdb
|
|
||||||
* port: 5432
|
|
||||||
* SSL mode: disable
|
|
||||||
|
|
||||||
### Front-end development
|
|
||||||
|
|
||||||
In order to interactively edit the js code, the frontend folder is mounted into the frontend container. To interactively develop the frontend code and watch the results, enter the running frontend container and launch `ng serve` with the following arguments (see <http://imaginativethinking.ca/heck-get-connection-reset-peer-containerizing-angular-4-application/> for why the host argument is required):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose exec citizen-front bash
|
|
||||||
root@9c0fea7720a0:/home/appuser/citizen/frontend# npm run ng serve -- --host 0.0.0.0 --port 4200 --configuration=fr --poll 2000 --sourceMap=false
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The app must be looked at **http://localhost:4200/**.
|
#### CREATION / Compiation du JS de Taxhub
|
||||||
|
|
||||||
But note that for persistently-built frontend files, you must run:
|
##### Mise à jour de nppm.
|
||||||
|
|
||||||
```bash
|
```
|
||||||
docker-compose exec citizen-front bash
|
$ docker-compose exec -u root taxhub bash
|
||||||
root@9c0fea7720a0:/home/appuser/citizen/frontend# npm run build:i18n-ssr
|
taxhub $ npm install npm@latest -g # mise à jour de npm
|
||||||
```
|
```
|
||||||
|
|
||||||
or `npm run build:fr` for speeding up.
|
#### Compilation du code
|
||||||
|
|
||||||
|
|
||||||
### Back-end development
|
|
||||||
|
|
||||||
When developing the app and serving it with `docker-compose up`, the changes should be automatically loaded (meaning, the app is watching the changes) (Note that this is not the case anymore). However, it is more practical to change the command of the backend container from `command: bash start_gunicorn.sh` to `command: python wsgi.py` in order to have some logs.
|
|
||||||
|
|
||||||
You can access a flask shell terminal with the following:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose exec citizen-back bash
|
|
||||||
appuser@5d4fc6b169b2:~/citizen/backend$ flask shell
|
|
||||||
```
|
```
|
||||||
|
$ docker-compose exec taxhub bash
|
||||||
|
taxhub $ cd static
|
||||||
|
taxhub $ cp app/constants.js.sample app/constants.js
|
||||||
|
taxhub $ npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Citizen-front
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker-compose run --rm citizen-front npm install
|
||||||
|
$ docker-compose run --rm citizen-front npm run build:i18n-ssr
|
||||||
|
$ docker-compose up -d citizen-front
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Citizen-back
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose up -d citizen-front
|
||||||
|
```
|
||||||
|
|
||||||
|
### Apache
|
||||||
|
|
||||||
|
Redirige de 8080 vers autres services :
|
||||||
|
- 4000 (citizen-front)
|
||||||
|
- 5002 (citizen-back)
|
||||||
|
- 5000 (taxon)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Deploiement sur un serveur distant
|
## Deploiement sur un serveur distant
|
||||||
|
|
||||||
@ -151,10 +137,6 @@ docker-compose up -d db
|
|||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
### Troubleshooting
|
|
||||||
|
|
||||||
Attention, lorsqu'on envoie des images sur le serveur (avec `docker push`), celles-ci peuvent être très volumineuses! Il faut vérifier la capacité du serveur (avec `df`), inspecter les images existantes (`docker image ls`) et supprimer les anciennes images (`docker rmi ...`).
|
|
||||||
|
|
||||||
# Single-container instructions (deprecated)
|
# Single-container instructions (deprecated)
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -188,7 +170,7 @@ $ docker-compose run --rm citizen-front npm run build:i18n-ssr
|
|||||||
$ docker-compose up -d citizen-front
|
$ docker-compose up -d citizen-front
|
||||||
```
|
```
|
||||||
|
|
||||||
$ docker-compose exec citizen-front bash
|
$ docker-compose exec citizen bash
|
||||||
appuser@ab136184159a:~/citizen/$ cd frontend
|
appuser@ab136184159a:~/citizen/$ cd frontend
|
||||||
appuser@ab136184159a:~/citizen/frontend$ npm run ng build -- --configuration=fr --prod
|
appuser@ab136184159a:~/citizen/frontend$ npm run ng build -- --configuration=fr --prod
|
||||||
```
|
```
|
||||||
|
2
apache/Dockerfile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
FROM httpd:2.4
|
||||||
|
COPY ./httpd-citizen.conf /usr/local/apache2/conf/httpd.conf
|
574
apache/httpd-citizen.conf
Normal file
@ -0,0 +1,574 @@
|
|||||||
|
#
|
||||||
|
# This is the main Apache HTTP server configuration file. It contains the
|
||||||
|
# configuration directives that give the server its instructions.
|
||||||
|
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
|
||||||
|
# In particular, see
|
||||||
|
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
|
||||||
|
# for a discussion of each configuration directive.
|
||||||
|
#
|
||||||
|
# Do NOT simply read the instructions in here without understanding
|
||||||
|
# what they do. They're here only as hints or reminders. If you are unsure
|
||||||
|
# consult the online docs. You have been warned.
|
||||||
|
#
|
||||||
|
# Configuration and logfile names: If the filenames you specify for many
|
||||||
|
# of the server's control files begin with "/" (or "drive:/" for Win32), the
|
||||||
|
# server will use that explicit path. If the filenames do *not* begin
|
||||||
|
# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
|
||||||
|
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
|
||||||
|
# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
|
||||||
|
# will be interpreted as '/logs/access_log'.
|
||||||
|
|
||||||
|
#
|
||||||
|
# ServerRoot: The top of the directory tree under which the server's
|
||||||
|
# configuration, error, and log files are kept.
|
||||||
|
#
|
||||||
|
# Do not add a slash at the end of the directory path. If you point
|
||||||
|
# ServerRoot at a non-local disk, be sure to specify a local disk on the
|
||||||
|
# Mutex directive, if file-based mutexes are used. If you wish to share the
|
||||||
|
# same ServerRoot for multiple httpd daemons, you will need to change at
|
||||||
|
# least PidFile.
|
||||||
|
#
|
||||||
|
ServerRoot "/usr/local/apache2"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Mutex: Allows you to set the mutex mechanism and mutex file directory
|
||||||
|
# for individual mutexes, or change the global defaults
|
||||||
|
#
|
||||||
|
# Uncomment and change the directory if mutexes are file-based and the default
|
||||||
|
# mutex file directory is not on a local disk or is not appropriate for some
|
||||||
|
# other reason.
|
||||||
|
#
|
||||||
|
# Mutex default:logs
|
||||||
|
|
||||||
|
#
|
||||||
|
# Listen: Allows you to bind Apache to specific IP addresses and/or
|
||||||
|
# ports, instead of the default. See also the <VirtualHost>
|
||||||
|
# directive.
|
||||||
|
#
|
||||||
|
# Change this to Listen on specific IP addresses as shown below to
|
||||||
|
# prevent Apache from glomming onto all bound IP addresses.
|
||||||
|
#
|
||||||
|
#Listen 12.34.56.78:80
|
||||||
|
Listen 80
|
||||||
|
|
||||||
|
#
|
||||||
|
# Dynamic Shared Object (DSO) Support
|
||||||
|
#
|
||||||
|
# To be able to use the functionality of a module which was built as a DSO you
|
||||||
|
# have to place corresponding `LoadModule' lines at this location so the
|
||||||
|
# directives contained in it are actually available _before_ they are used.
|
||||||
|
# Statically compiled modules (those listed by `httpd -l') do not need
|
||||||
|
# to be loaded here.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# LoadModule foo_module modules/mod_foo.so
|
||||||
|
#
|
||||||
|
LoadModule mpm_event_module modules/mod_mpm_event.so
|
||||||
|
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
|
||||||
|
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
|
||||||
|
LoadModule authn_file_module modules/mod_authn_file.so
|
||||||
|
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
|
||||||
|
#LoadModule authn_anon_module modules/mod_authn_anon.so
|
||||||
|
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
|
||||||
|
#LoadModule authn_socache_module modules/mod_authn_socache.so
|
||||||
|
LoadModule authn_core_module modules/mod_authn_core.so
|
||||||
|
LoadModule authz_host_module modules/mod_authz_host.so
|
||||||
|
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
|
||||||
|
LoadModule authz_user_module modules/mod_authz_user.so
|
||||||
|
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
|
||||||
|
#LoadModule authz_owner_module modules/mod_authz_owner.so
|
||||||
|
#LoadModule authz_dbd_module modules/mod_authz_dbd.so
|
||||||
|
LoadModule authz_core_module modules/mod_authz_core.so
|
||||||
|
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
|
||||||
|
#LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so
|
||||||
|
LoadModule access_compat_module modules/mod_access_compat.so
|
||||||
|
LoadModule auth_basic_module modules/mod_auth_basic.so
|
||||||
|
#LoadModule auth_form_module modules/mod_auth_form.so
|
||||||
|
#LoadModule auth_digest_module modules/mod_auth_digest.so
|
||||||
|
#LoadModule allowmethods_module modules/mod_allowmethods.so
|
||||||
|
#LoadModule isapi_module modules/mod_isapi.so
|
||||||
|
#LoadModule file_cache_module modules/mod_file_cache.so
|
||||||
|
#LoadModule cache_module modules/mod_cache.so
|
||||||
|
#LoadModule cache_disk_module modules/mod_cache_disk.so
|
||||||
|
#LoadModule cache_socache_module modules/mod_cache_socache.so
|
||||||
|
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
|
||||||
|
#LoadModule socache_dbm_module modules/mod_socache_dbm.so
|
||||||
|
#LoadModule socache_memcache_module modules/mod_socache_memcache.so
|
||||||
|
#LoadModule socache_redis_module modules/mod_socache_redis.so
|
||||||
|
#LoadModule watchdog_module modules/mod_watchdog.so
|
||||||
|
#LoadModule macro_module modules/mod_macro.so
|
||||||
|
#LoadModule dbd_module modules/mod_dbd.so
|
||||||
|
#LoadModule bucketeer_module modules/mod_bucketeer.so
|
||||||
|
#LoadModule dumpio_module modules/mod_dumpio.so
|
||||||
|
#LoadModule echo_module modules/mod_echo.so
|
||||||
|
#LoadModule example_hooks_module modules/mod_example_hooks.so
|
||||||
|
#LoadModule case_filter_module modules/mod_case_filter.so
|
||||||
|
#LoadModule case_filter_in_module modules/mod_case_filter_in.so
|
||||||
|
#LoadModule example_ipc_module modules/mod_example_ipc.so
|
||||||
|
#LoadModule buffer_module modules/mod_buffer.so
|
||||||
|
#LoadModule data_module modules/mod_data.so
|
||||||
|
#LoadModule ratelimit_module modules/mod_ratelimit.so
|
||||||
|
LoadModule reqtimeout_module modules/mod_reqtimeout.so
|
||||||
|
#LoadModule ext_filter_module modules/mod_ext_filter.so
|
||||||
|
#LoadModule request_module modules/mod_request.so
|
||||||
|
#LoadModule include_module modules/mod_include.so
|
||||||
|
LoadModule filter_module modules/mod_filter.so
|
||||||
|
#LoadModule reflector_module modules/mod_reflector.so
|
||||||
|
#LoadModule substitute_module modules/mod_substitute.so
|
||||||
|
#LoadModule sed_module modules/mod_sed.so
|
||||||
|
#LoadModule charset_lite_module modules/mod_charset_lite.so
|
||||||
|
#LoadModule deflate_module modules/mod_deflate.so
|
||||||
|
#LoadModule xml2enc_module modules/mod_xml2enc.so
|
||||||
|
#LoadModule proxy_html_module modules/mod_proxy_html.so
|
||||||
|
#LoadModule brotli_module modules/mod_brotli.so
|
||||||
|
LoadModule mime_module modules/mod_mime.so
|
||||||
|
#LoadModule ldap_module modules/mod_ldap.so
|
||||||
|
LoadModule log_config_module modules/mod_log_config.so
|
||||||
|
#LoadModule log_debug_module modules/mod_log_debug.so
|
||||||
|
#LoadModule log_forensic_module modules/mod_log_forensic.so
|
||||||
|
#LoadModule logio_module modules/mod_logio.so
|
||||||
|
#LoadModule lua_module modules/mod_lua.so
|
||||||
|
LoadModule env_module modules/mod_env.so
|
||||||
|
#LoadModule mime_magic_module modules/mod_mime_magic.so
|
||||||
|
#LoadModule cern_meta_module modules/mod_cern_meta.so
|
||||||
|
#LoadModule expires_module modules/mod_expires.so
|
||||||
|
LoadModule headers_module modules/mod_headers.so
|
||||||
|
#LoadModule ident_module modules/mod_ident.so
|
||||||
|
#LoadModule usertrack_module modules/mod_usertrack.so
|
||||||
|
#LoadModule unique_id_module modules/mod_unique_id.so
|
||||||
|
LoadModule setenvif_module modules/mod_setenvif.so
|
||||||
|
LoadModule version_module modules/mod_version.so
|
||||||
|
#LoadModule remoteip_module modules/mod_remoteip.so
|
||||||
|
LoadModule proxy_module modules/mod_proxy.so
|
||||||
|
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
||||||
|
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
|
||||||
|
LoadModule proxy_http_module modules/mod_proxy_http.so
|
||||||
|
#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
|
||||||
|
#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
|
||||||
|
#LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
|
||||||
|
#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
|
||||||
|
#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
|
||||||
|
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
|
||||||
|
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
|
||||||
|
#LoadModule proxy_express_module modules/mod_proxy_express.so
|
||||||
|
#LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
|
||||||
|
#LoadModule session_module modules/mod_session.so
|
||||||
|
#LoadModule session_cookie_module modules/mod_session_cookie.so
|
||||||
|
#LoadModule session_crypto_module modules/mod_session_crypto.so
|
||||||
|
#LoadModule session_dbd_module modules/mod_session_dbd.so
|
||||||
|
#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
|
||||||
|
#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
|
||||||
|
#LoadModule ssl_module modules/mod_ssl.so
|
||||||
|
#LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
|
||||||
|
#LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
|
||||||
|
#LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
|
||||||
|
#LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
|
||||||
|
#LoadModule dialup_module modules/mod_dialup.so
|
||||||
|
#LoadModule http2_module modules/mod_http2.so
|
||||||
|
#LoadModule proxy_http2_module modules/mod_proxy_http2.so
|
||||||
|
#LoadModule md_module modules/mod_md.so
|
||||||
|
#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
|
||||||
|
#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
|
||||||
|
#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
|
||||||
|
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
|
||||||
|
LoadModule unixd_module modules/mod_unixd.so
|
||||||
|
#LoadModule heartbeat_module modules/mod_heartbeat.so
|
||||||
|
#LoadModule heartmonitor_module modules/mod_heartmonitor.so
|
||||||
|
#LoadModule dav_module modules/mod_dav.so
|
||||||
|
LoadModule status_module modules/mod_status.so
|
||||||
|
LoadModule autoindex_module modules/mod_autoindex.so
|
||||||
|
#LoadModule asis_module modules/mod_asis.so
|
||||||
|
#LoadModule info_module modules/mod_info.so
|
||||||
|
#LoadModule suexec_module modules/mod_suexec.so
|
||||||
|
<IfModule !mpm_prefork_module>
|
||||||
|
#LoadModule cgid_module modules/mod_cgid.so
|
||||||
|
</IfModule>
|
||||||
|
<IfModule mpm_prefork_module>
|
||||||
|
#LoadModule cgi_module modules/mod_cgi.so
|
||||||
|
</IfModule>
|
||||||
|
#LoadModule dav_fs_module modules/mod_dav_fs.so
|
||||||
|
#LoadModule dav_lock_module modules/mod_dav_lock.so
|
||||||
|
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
|
||||||
|
#LoadModule negotiation_module modules/mod_negotiation.so
|
||||||
|
LoadModule dir_module modules/mod_dir.so
|
||||||
|
#LoadModule imagemap_module modules/mod_imagemap.so
|
||||||
|
#LoadModule actions_module modules/mod_actions.so
|
||||||
|
#LoadModule speling_module modules/mod_speling.so
|
||||||
|
#LoadModule userdir_module modules/mod_userdir.so
|
||||||
|
LoadModule alias_module modules/mod_alias.so
|
||||||
|
#LoadModule rewrite_module modules/mod_rewrite.so
|
||||||
|
|
||||||
|
<IfModule unixd_module>
|
||||||
|
#
|
||||||
|
# If you wish httpd to run as a different user or group, you must run
|
||||||
|
# httpd as root initially and it will switch.
|
||||||
|
#
|
||||||
|
# User/Group: The name (or #number) of the user/group to run httpd as.
|
||||||
|
# It is usually good practice to create a dedicated user and group for
|
||||||
|
# running httpd, as with most system services.
|
||||||
|
#
|
||||||
|
User daemon
|
||||||
|
Group daemon
|
||||||
|
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# 'Main' server configuration
|
||||||
|
#
|
||||||
|
# The directives in this section set up the values used by the 'main'
|
||||||
|
# server, which responds to any requests that aren't handled by a
|
||||||
|
# <VirtualHost> definition. These values also provide defaults for
|
||||||
|
# any <VirtualHost> containers you may define later in the file.
|
||||||
|
#
|
||||||
|
# All of these directives may appear inside <VirtualHost> containers,
|
||||||
|
# in which case these default settings will be overridden for the
|
||||||
|
# virtual host being defined.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# ServerAdmin: Your address, where problems with the server should be
|
||||||
|
# e-mailed. This address appears on some server-generated pages, such
|
||||||
|
# as error documents. e.g. admin@your-domain.com
|
||||||
|
#
|
||||||
|
ServerAdmin you@example.com
|
||||||
|
|
||||||
|
#
|
||||||
|
# ServerName gives the name and port that the server uses to identify itself.
|
||||||
|
# This can often be determined automatically, but we recommend you specify
|
||||||
|
# it explicitly to prevent problems during startup.
|
||||||
|
#
|
||||||
|
# If your host doesn't have a registered DNS name, enter its IP address here.
|
||||||
|
#
|
||||||
|
#ServerName www.example.com:80
|
||||||
|
|
||||||
|
#
|
||||||
|
# Deny access to the entirety of your server's filesystem. You must
|
||||||
|
# explicitly permit access to web content directories in other
|
||||||
|
# <Directory> blocks below.
|
||||||
|
#
|
||||||
|
<Directory />
|
||||||
|
AllowOverride none
|
||||||
|
Require all denied
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
#
|
||||||
|
# Note that from this point forward you must specifically allow
|
||||||
|
# particular features to be enabled - so if something's not working as
|
||||||
|
# you might expect, make sure that you have specifically enabled it
|
||||||
|
# below.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# DocumentRoot: The directory out of which you will serve your
|
||||||
|
# documents. By default, all requests are taken from this directory, but
|
||||||
|
# symbolic links and aliases may be used to point to other locations.
|
||||||
|
#
|
||||||
|
DocumentRoot "/usr/local/apache2/htdocs"
|
||||||
|
<Directory "/usr/local/apache2/htdocs">
|
||||||
|
#
|
||||||
|
# Possible values for the Options directive are "None", "All",
|
||||||
|
# or any combination of:
|
||||||
|
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
|
||||||
|
#
|
||||||
|
# Note that "MultiViews" must be named *explicitly* --- "Options All"
|
||||||
|
# doesn't give it to you.
|
||||||
|
#
|
||||||
|
# The Options directive is both complicated and important. Please see
|
||||||
|
# http://httpd.apache.org/docs/2.4/mod/core.html#options
|
||||||
|
# for more information.
|
||||||
|
#
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
|
||||||
|
#
|
||||||
|
# AllowOverride controls what directives may be placed in .htaccess files.
|
||||||
|
# It can be "All", "None", or any combination of the keywords:
|
||||||
|
# AllowOverride FileInfo AuthConfig Limit
|
||||||
|
#
|
||||||
|
AllowOverride None
|
||||||
|
|
||||||
|
#
|
||||||
|
# Controls who can get stuff from this server.
|
||||||
|
#
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
#
|
||||||
|
# DirectoryIndex: sets the file that Apache will serve if a directory
|
||||||
|
# is requested.
|
||||||
|
#
|
||||||
|
<IfModule dir_module>
|
||||||
|
DirectoryIndex index.html
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
#
|
||||||
|
# The following lines prevent .htaccess and .htpasswd files from being
|
||||||
|
# viewed by Web clients.
|
||||||
|
#
|
||||||
|
<Files ".ht*">
|
||||||
|
Require all denied
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
#
|
||||||
|
# ErrorLog: The location of the error log file.
|
||||||
|
# If you do not specify an ErrorLog directive within a <VirtualHost>
|
||||||
|
# container, error messages relating to that virtual host will be
|
||||||
|
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||||
|
# container, that host's errors will be logged there and not here.
|
||||||
|
#
|
||||||
|
ErrorLog /proc/self/fd/2
|
||||||
|
|
||||||
|
#
|
||||||
|
# LogLevel: Control the number of messages logged to the error_log.
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit,
|
||||||
|
# alert, emerg.
|
||||||
|
#
|
||||||
|
LogLevel warn
|
||||||
|
|
||||||
|
<IfModule log_config_module>
|
||||||
|
#
|
||||||
|
# The following directives define some format nicknames for use with
|
||||||
|
# a CustomLog directive (see below).
|
||||||
|
#
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||||
|
|
||||||
|
<IfModule logio_module>
|
||||||
|
# You need to enable mod_logio.c to use %I and %O
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
#
|
||||||
|
# The location and format of the access logfile (Common Logfile Format).
|
||||||
|
# If you do not define any access logfiles within a <VirtualHost>
|
||||||
|
# container, they will be logged here. Contrariwise, if you *do*
|
||||||
|
# define per-<VirtualHost> access logfiles, transactions will be
|
||||||
|
# logged therein and *not* in this file.
|
||||||
|
#
|
||||||
|
CustomLog /proc/self/fd/1 common
|
||||||
|
|
||||||
|
#
|
||||||
|
# If you prefer a logfile with access, agent, and referer information
|
||||||
|
# (Combined Logfile Format) you can use the following directive.
|
||||||
|
#
|
||||||
|
#CustomLog "logs/access_log" combined
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule alias_module>
|
||||||
|
#
|
||||||
|
# Redirect: Allows you to tell clients about documents that used to
|
||||||
|
# exist in your server's namespace, but do not anymore. The client
|
||||||
|
# will make a new request for the document at its new location.
|
||||||
|
# Example:
|
||||||
|
# Redirect permanent /foo http://www.example.com/bar
|
||||||
|
|
||||||
|
#
|
||||||
|
# Alias: Maps web paths into filesystem paths and is used to
|
||||||
|
# access content that does not live under the DocumentRoot.
|
||||||
|
# Example:
|
||||||
|
# Alias /webpath /full/filesystem/path
|
||||||
|
#
|
||||||
|
# If you include a trailing / on /webpath then the server will
|
||||||
|
# require it to be present in the URL. You will also likely
|
||||||
|
# need to provide a <Directory> section to allow access to
|
||||||
|
# the filesystem path.
|
||||||
|
|
||||||
|
#
|
||||||
|
# ScriptAlias: This controls which directories contain server scripts.
|
||||||
|
# ScriptAliases are essentially the same as Aliases, except that
|
||||||
|
# documents in the target directory are treated as applications and
|
||||||
|
# run by the server when requested rather than as documents sent to the
|
||||||
|
# client. The same rules about trailing "/" apply to ScriptAlias
|
||||||
|
# directives as to Alias.
|
||||||
|
#
|
||||||
|
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
|
||||||
|
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule cgid_module>
|
||||||
|
#
|
||||||
|
# ScriptSock: On threaded servers, designate the path to the UNIX
|
||||||
|
# socket used to communicate with the CGI daemon of mod_cgid.
|
||||||
|
#
|
||||||
|
#Scriptsock cgisock
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
#
|
||||||
|
# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
|
||||||
|
# CGI directory exists, if you have that configured.
|
||||||
|
#
|
||||||
|
<Directory "/usr/local/apache2/cgi-bin">
|
||||||
|
AllowOverride None
|
||||||
|
Options None
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<IfModule headers_module>
|
||||||
|
#
|
||||||
|
# Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
|
||||||
|
# backend servers which have lingering "httpoxy" defects.
|
||||||
|
# 'Proxy' request header is undefined by the IETF, not listed by IANA
|
||||||
|
#
|
||||||
|
RequestHeader unset Proxy early
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule mime_module>
|
||||||
|
#
|
||||||
|
# TypesConfig points to the file containing the list of mappings from
|
||||||
|
# filename extension to MIME-type.
|
||||||
|
#
|
||||||
|
TypesConfig conf/mime.types
|
||||||
|
|
||||||
|
#
|
||||||
|
# AddType allows you to add to or override the MIME configuration
|
||||||
|
# file specified in TypesConfig for specific file types.
|
||||||
|
#
|
||||||
|
#AddType application/x-gzip .tgz
|
||||||
|
#
|
||||||
|
# AddEncoding allows you to have certain browsers uncompress
|
||||||
|
# information on the fly. Note: Not all browsers support this.
|
||||||
|
#
|
||||||
|
#AddEncoding x-compress .Z
|
||||||
|
#AddEncoding x-gzip .gz .tgz
|
||||||
|
#
|
||||||
|
# If the AddEncoding directives above are commented-out, then you
|
||||||
|
# probably should define those extensions to indicate media types:
|
||||||
|
#
|
||||||
|
AddType application/x-compress .Z
|
||||||
|
AddType application/x-gzip .gz .tgz
|
||||||
|
|
||||||
|
#
|
||||||
|
# AddHandler allows you to map certain file extensions to "handlers":
|
||||||
|
# actions unrelated to filetype. These can be either built into the server
|
||||||
|
# or added with the Action directive (see below)
|
||||||
|
#
|
||||||
|
# To use CGI scripts outside of ScriptAliased directories:
|
||||||
|
# (You will also need to add "ExecCGI" to the "Options" directive.)
|
||||||
|
#
|
||||||
|
#AddHandler cgi-script .cgi
|
||||||
|
|
||||||
|
# For type maps (negotiated resources):
|
||||||
|
#AddHandler type-map var
|
||||||
|
|
||||||
|
#
|
||||||
|
# Filters allow you to process content before it is sent to the client.
|
||||||
|
#
|
||||||
|
# To parse .shtml files for server-side includes (SSI):
|
||||||
|
# (You will also need to add "Includes" to the "Options" directive.)
|
||||||
|
#
|
||||||
|
#AddType text/html .shtml
|
||||||
|
#AddOutputFilter INCLUDES .shtml
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
#
|
||||||
|
# The mod_mime_magic module allows the server to use various hints from the
|
||||||
|
# contents of the file itself to determine its type. The MIMEMagicFile
|
||||||
|
# directive tells the module where the hint definitions are located.
|
||||||
|
#
|
||||||
|
#MIMEMagicFile conf/magic
|
||||||
|
|
||||||
|
#
|
||||||
|
# Customizable error responses come in three flavors:
|
||||||
|
# 1) plain text 2) local redirects 3) external redirects
|
||||||
|
#
|
||||||
|
# Some examples:
|
||||||
|
#ErrorDocument 500 "The server made a boo boo."
|
||||||
|
#ErrorDocument 404 /missing.html
|
||||||
|
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
|
||||||
|
#ErrorDocument 402 http://www.example.com/subscription_info.html
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# MaxRanges: Maximum number of Ranges in a request before
|
||||||
|
# returning the entire resource, or one of the special
|
||||||
|
# values 'default', 'none' or 'unlimited'.
|
||||||
|
# Default setting is to accept 200 Ranges.
|
||||||
|
#MaxRanges unlimited
|
||||||
|
|
||||||
|
#
|
||||||
|
# EnableMMAP and EnableSendfile: On systems that support it,
|
||||||
|
# memory-mapping or the sendfile syscall may be used to deliver
|
||||||
|
# files. This usually improves server performance, but must
|
||||||
|
# be turned off when serving from networked-mounted
|
||||||
|
# filesystems or if support for these functions is otherwise
|
||||||
|
# broken on your system.
|
||||||
|
# Defaults: EnableMMAP On, EnableSendfile Off
|
||||||
|
#
|
||||||
|
#EnableMMAP off
|
||||||
|
#EnableSendfile on
|
||||||
|
|
||||||
|
# Supplemental configuration
|
||||||
|
#
|
||||||
|
# The configuration files in the conf/extra/ directory can be
|
||||||
|
# included to add extra features or to modify the default configuration of
|
||||||
|
# the server, or you may simply copy their contents here and change as
|
||||||
|
# necessary.
|
||||||
|
|
||||||
|
# Server-pool management (MPM specific)
|
||||||
|
#Include conf/extra/httpd-mpm.conf
|
||||||
|
|
||||||
|
# Multi-language error messages
|
||||||
|
#Include conf/extra/httpd-multilang-errordoc.conf
|
||||||
|
|
||||||
|
# Fancy directory listings
|
||||||
|
#Include conf/extra/httpd-autoindex.conf
|
||||||
|
|
||||||
|
# Language settings
|
||||||
|
#Include conf/extra/httpd-languages.conf
|
||||||
|
|
||||||
|
# User home directories
|
||||||
|
#Include conf/extra/httpd-userdir.conf
|
||||||
|
|
||||||
|
# Real-time info on requests and configuration
|
||||||
|
#Include conf/extra/httpd-info.conf
|
||||||
|
|
||||||
|
# Virtual hosts
|
||||||
|
#Include conf/extra/httpd-vhosts.conf
|
||||||
|
|
||||||
|
# Local access to the Apache HTTP Server Manual
|
||||||
|
#Include conf/extra/httpd-manual.conf
|
||||||
|
|
||||||
|
# Distributed authoring and versioning (WebDAV)
|
||||||
|
#Include conf/extra/httpd-dav.conf
|
||||||
|
|
||||||
|
# Various default settings
|
||||||
|
#Include conf/extra/httpd-default.conf
|
||||||
|
|
||||||
|
# Configure mod_proxy_html to understand HTML4/XHTML1
|
||||||
|
<IfModule proxy_html_module>
|
||||||
|
Include conf/extra/proxy-html.conf
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Secure (SSL/TLS) connections
|
||||||
|
#Include conf/extra/httpd-ssl.conf
|
||||||
|
#
|
||||||
|
# Note: The following must must be present to support
|
||||||
|
# starting without SSL on platforms with no /dev/random equivalent
|
||||||
|
# but a statically compiled-in mod_ssl.
|
||||||
|
#
|
||||||
|
<IfModule ssl_module>
|
||||||
|
SSLRandomSeed startup builtin
|
||||||
|
SSLRandomSeed connect builtin
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# SELON install_app.sh
|
||||||
|
<VirtualHost *:80>
|
||||||
|
<Location />
|
||||||
|
ProxyPass http://citizen-front:4000/ retry=0
|
||||||
|
ProxyPassReverse http://citizen-front:4000/
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
# API Url
|
||||||
|
<Location /api>
|
||||||
|
ProxyPass http://citizen-back:5002/api retry=0
|
||||||
|
ProxyPassReverse http://citizen-back:5002/api
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
# MEDIA
|
||||||
|
<Location /api/media>
|
||||||
|
ProxyPass http://media/ retry=0
|
||||||
|
ProxyPassReverse http://media/
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
# Error logs
|
||||||
|
ErrorLog /var/log/apache2-citizen-error.log
|
||||||
|
CustomLog /var/log/apachecitizen.log combined
|
||||||
|
</VirtualHost>
|
@ -4,18 +4,27 @@ services:
|
|||||||
db:
|
db:
|
||||||
image: postgis/postgis:12-3.1-alpine
|
image: postgis/postgis:12-3.1-alpine
|
||||||
ports:
|
ports:
|
||||||
- "5434:5432"
|
- "5432:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- "pg-data:/var/lib/postgresql/data"
|
- "pg-data:/var/lib/postgresql/data"
|
||||||
environment:
|
environment:
|
||||||
- "POSTGRES_PASSWORD=postgres"
|
- "POSTGRES_PASSWORD=postgres"
|
||||||
|
citizen:
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- ./vendor/GeoNature-citizen/frontend:/home/appuser/citizen/frontend
|
||||||
|
- ./vendor/GeoNature-citizen/backend:/home/appuser/citizen/backend
|
||||||
|
- ./restart.sh:/home/appuser/citizen/install/restart.sh
|
||||||
|
- ./patches/frontend/src/conf:/home/appuser/citizen/frontend/src/conf
|
||||||
|
- ./patches/frontend/src/assets:/home/appuser/citizen/frontend/src/assets
|
||||||
|
ports:
|
||||||
|
- "8888:80"
|
||||||
citizen-front:
|
citizen-front:
|
||||||
build:
|
build:
|
||||||
dockerfile: ./Dockerfile-front
|
dockerfile: ./Dockerfile-front
|
||||||
context: .
|
context: .
|
||||||
image: registry.gitlab.com/champs-libres/geonature-citizen/front
|
image: registry.gitlab.com/champs-libres/geonature-citizen/front
|
||||||
volumes:
|
volumes:
|
||||||
- ./vendor/GeoNature-citizen/frontend:/home/appuser/citizen/frontend
|
|
||||||
- ./patches/settings.ini:/home/appuser/citizen/config/settings.ini
|
- ./patches/settings.ini:/home/appuser/citizen/config/settings.ini
|
||||||
- ./patches/frontend/src/conf:/home/appuser/citizen/frontend/src/conf
|
- ./patches/frontend/src/conf:/home/appuser/citizen/frontend/src/conf
|
||||||
- ./patches/frontend/src/assets:/home/appuser/citizen/frontend/src/assets
|
- ./patches/frontend/src/assets:/home/appuser/citizen/frontend/src/assets
|
||||||
@ -26,7 +35,6 @@ services:
|
|||||||
- ./node_modules:/home/appuser/citizen/frontend/node_modules
|
- ./node_modules:/home/appuser/citizen/frontend/node_modules
|
||||||
ports:
|
ports:
|
||||||
- "4000:4000"
|
- "4000:4000"
|
||||||
- "4200:4200"
|
|
||||||
command: npm run serve:ssr
|
command: npm run serve:ssr
|
||||||
environment:
|
environment:
|
||||||
# avoid goodle analytics question
|
# avoid goodle analytics question
|
||||||
@ -37,17 +45,12 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
image: registry.gitlab.com/champs-libres/geonature-citizen/back
|
image: registry.gitlab.com/champs-libres/geonature-citizen/back
|
||||||
volumes:
|
volumes:
|
||||||
- ./vendor/GeoNature-citizen/backend/gncitizen/:/home/appuser/citizen/backend/gncitizen/
|
|
||||||
- ./vendor/GeoNature-citizen/backend/var/log/:/home/appuser/citizen/backend/var/log/
|
|
||||||
- ./patches/settings.ini:/home/appuser/citizen/config/settings.ini
|
- ./patches/settings.ini:/home/appuser/citizen/config/settings.ini
|
||||||
- ./patches/settings.ini:/home/appuser/citizen/backend/config/settings.ini
|
- ./patches/back/default_config.toml:/home/appuser/citizen/config/default_config.toml
|
||||||
- ./patches/back/default_config.toml:/home/appuser/citizen/config/config.toml
|
|
||||||
- ./patches/back/start_gunicorn.sh:/home/appuser/citizen/backend/start_gunicorn.sh
|
|
||||||
- ./patches/back/wsgi.py:/home/appuser/citizen/backend/wsgi.py
|
- ./patches/back/wsgi.py:/home/appuser/citizen/backend/wsgi.py
|
||||||
- ./patches/back/server.py:/home/appuser/citizen/backend/server.py
|
- ./patches/back/server.py:/home/appuser/citizen/backend/server.py
|
||||||
ports:
|
ports:
|
||||||
- "5002:5002"
|
- "5002:5002"
|
||||||
#command: bash start_gunicorn.sh
|
|
||||||
command: python wsgi.py
|
command: python wsgi.py
|
||||||
taxhub:
|
taxhub:
|
||||||
build:
|
build:
|
||||||
@ -61,9 +64,7 @@ services:
|
|||||||
- ./patches/taxhub/server.py:/home/appuser/taxhub/server.py
|
- ./patches/taxhub/server.py:/home/appuser/taxhub/server.py
|
||||||
- ./patches/taxhub/install_db.sh:/home/appuser/taxhub/install_db.sh
|
- ./patches/taxhub/install_db.sh:/home/appuser/taxhub/install_db.sh
|
||||||
- ./patches/taxhub/settings.ini:/home/appuser/taxhub/settings.ini
|
- ./patches/taxhub/settings.ini:/home/appuser/taxhub/settings.ini
|
||||||
- ./patches/taxhub/gunicorn_start.sh:/home/appuser/taxhub/gunicorn_start.sh
|
command: python server.py
|
||||||
- ./vendor/TaxHub/var/log/:/home/appuser/taxhub/var/log/
|
|
||||||
command: bash gunicorn_start.sh
|
|
||||||
|
|
||||||
media:
|
media:
|
||||||
build:
|
build:
|
||||||
@ -72,18 +73,11 @@ services:
|
|||||||
image: registry.gitlab.com/champs-libres/geonature-citizen/media
|
image: registry.gitlab.com/champs-libres/geonature-citizen/media
|
||||||
ports:
|
ports:
|
||||||
- "8082:80"
|
- "8082:80"
|
||||||
nginx:
|
apache:
|
||||||
build:
|
build:
|
||||||
context: ./nginx
|
context: ./apache
|
||||||
dockerfile: ./Dockerfile
|
dockerfile: ./Dockerfile
|
||||||
image: registry.gitlab.com/champs-libres/geonature-citizen/nginx
|
image: registry.gitlab.com/champs-libres/geonature-citizen/apache
|
||||||
volumes:
|
|
||||||
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
|
|
||||||
depends_on:
|
|
||||||
- "media"
|
|
||||||
- "citizen-front"
|
|
||||||
- "citizen-back"
|
|
||||||
- "taxhub"
|
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
pgweb:
|
pgweb:
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
# Documentation de l'application
|
|
||||||
|
|
||||||
## Contenu
|
|
||||||
|
|
||||||
Le contenu de la documentation vit dans le wiki: https://gitea.champs-libres.be/champs-libres/biommap/wiki/_pages. Éditer ce contenu en ligne ou en utilisant le dépôt du wiki.
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
Pour faire un beau pdf de cette documentation, on utilise pandoc avec un template. Pour lancer la commande:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
documentation$ sudo sh build.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: pour utiliser le filtre lua sur les images, je dois faire cette commande avec sudo.
|
|
||||||
|
|
||||||
J'ai utilisé pandoc 2.14.2.
|
|
||||||
|
|
||||||
Pour que pandoc trouve les fichiers, il faut leur indiquer un chemin valide. Ici, on présuppose que les dépots de ce projet de du wiki sont tels que:
|
|
||||||
|
|
||||||
├── repo
|
|
||||||
│ └── biommap-multi
|
|
||||||
├── wiki
|
|
||||||
│ └── biommap.wiki
|
|
||||||
|
|
||||||
Sinon, changer les chemins relatifs dans le fichier `build.sh`.
|
|
@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cd $(dirname "${0}")
|
|
||||||
|
|
||||||
pandoc --from markdown \
|
|
||||||
--number-sections \
|
|
||||||
--pdf-engine=xelatex \
|
|
||||||
--template=template.tex \
|
|
||||||
--lua-filter=image-path.lua \
|
|
||||||
-o documentation-biommap.pdf \
|
|
||||||
src/001-cover.md \
|
|
||||||
src/002-toc.md \
|
|
||||||
../../../wiki/biommap.wiki/Gestion-des-utilisateurs.md \
|
|
||||||
../../../wiki/biommap.wiki/Gestion-des-programmes.md \
|
|
||||||
../../../wiki/biommap.wiki/Tableau-de-bord.md \
|
|
||||||
../../../wiki/biommap.wiki/Editer-le-contenu-statique.md \
|
|
||||||
../../../wiki/biommap.wiki/Image-programme.md \
|
|
||||||
../../../wiki/biommap.wiki/Configurer-le-serveur-SMTP.md \
|
|
||||||
../../../wiki/biommap.wiki/Import-requalification.md \
|
|
||||||
../../../wiki/biommap.wiki/Utilisation-API.md \
|
|
||||||
../../../wiki/biommap.wiki/Access-a-la-base-de-donnees.md \
|
|
||||||
../../../wiki/biommap.wiki/Interaction-QGIS-BD.md \
|
|
@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
function fix_path (path)
|
|
||||||
return '../../../wiki/biommap.wiki/' .. path
|
|
||||||
end
|
|
||||||
|
|
||||||
function Image (element)
|
|
||||||
element.src = fix_path(element.src)
|
|
||||||
return element
|
|
||||||
end
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
\includepdf{./src/cover.pdf}
|
|
||||||
|
|
||||||
\newpage
|
|
@ -1,18 +0,0 @@
|
|||||||
```{=latex}
|
|
||||||
|
|
||||||
\begingroup
|
|
||||||
|
|
||||||
\hypersetup{linkcolor=linkcolortoc}
|
|
||||||
|
|
||||||
\tableofcontents
|
|
||||||
|
|
||||||
\listoffigures
|
|
||||||
|
|
||||||
\listoftables
|
|
||||||
|
|
||||||
\endgroup
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 95 KiB |
@ -1,438 +0,0 @@
|
|||||||
%!TEX TS-program = xelatex
|
|
||||||
\documentclass[french, 10pt]{scrartcl}
|
|
||||||
|
|
||||||
% The declaration of the document class:
|
|
||||||
|
|
||||||
% The second line here, i.e.
|
|
||||||
% \documentclass[12pt]{scrartcl}
|
|
||||||
% is a standard LaTeX document class declaration:
|
|
||||||
% we say what kind of document we are making in curly brackets,
|
|
||||||
% and specify any options in square brackets.
|
|
||||||
|
|
||||||
% (The previous line is a pseudo-comment, declaring that we will
|
|
||||||
% use the special XeTeX machinery for its more extensive font list
|
|
||||||
% and its use of unicode;
|
|
||||||
% in general, LaTeX 'comments' like this one
|
|
||||||
% begin with % and end with a linebreak.)
|
|
||||||
|
|
||||||
% Note that there we have nothing in the nature of a template;
|
|
||||||
% it's just a standard bit of LaTeX pandoc will copy unaltered into the
|
|
||||||
% LaTeX file it is writing. But suppose you wrote something
|
|
||||||
% more akin to the corresponding line in Pandoc's default
|
|
||||||
% latex.template file, say:
|
|
||||||
|
|
||||||
% \documentclass$if(fontsize)$[$fontsize$]$endif${scrartcl}
|
|
||||||
|
|
||||||
% then you would have invented a 'variable', fontsize,
|
|
||||||
% and could write things like
|
|
||||||
|
|
||||||
% `markdown2pdf my.txt --xetex --variable=fontsize:12pt -o my.pdf` or
|
|
||||||
% `pandoc -r markdown -w html my.txt -s --xetex --variable=fontsize:24pt -o my.tex`.
|
|
||||||
|
|
||||||
% If we specified --variable-fontsize:12, then template substitution
|
|
||||||
% would yield a LaTeX document beginning
|
|
||||||
% \documentclass[12pt]{scrarcl}
|
|
||||||
% which is just what we said anyway.
|
|
||||||
% But we could also specify a different fontsize.
|
|
||||||
|
|
||||||
% I don't use this `--variable=....`functionality myself;
|
|
||||||
% I have a couple of basic templates I call with
|
|
||||||
% `--template=whatever.template` which I can also
|
|
||||||
% easily inspect to adjust things like font size as I please.
|
|
||||||
|
|
||||||
% While we are discussing the declaration of the document class...
|
|
||||||
% here's an alternative command for two column landscape,
|
|
||||||
% not bad for some purposes. (If you strike the word 'landscape'
|
|
||||||
% you will have two narrow newspaperlike
|
|
||||||
% columns; scientists like that, because irrationality must
|
|
||||||
% show itself somewhere):
|
|
||||||
%\documentclass[12pt,twocolumn,landscape]{scrartcl}
|
|
||||||
% Columns are too close together in LaTeX so we add this
|
|
||||||
% `columnsep` command:
|
|
||||||
%\setlength{\columnsep}{.5in}
|
|
||||||
|
|
||||||
|
|
||||||
% I use the special 'komascript' article class "scrartcl"
|
|
||||||
% reasons I can't entirely remember; I'm not sure it's that great.
|
|
||||||
% One reason is the unimportant one that, like many classes,
|
|
||||||
% it allows very big fonts which are convenient for booklet printing
|
|
||||||
% in the idiotic American way by shrinking letterpaper pages.
|
|
||||||
|
|
||||||
% the standard minimal LaTeX 'article' class declaration would be something like:
|
|
||||||
|
|
||||||
% \documentclass[12pt]{article}
|
|
||||||
|
|
||||||
% or for big type:
|
|
||||||
|
|
||||||
% \documentclass[24pt]{extarticle}
|
|
||||||
|
|
||||||
% but these restrict you to old-fashioned LaTeX materials.
|
|
||||||
% Note that Kieran Healy uses the swank 'Memoir' class,
|
|
||||||
% \documentclass[11pt,article,oneside]{memoir}
|
|
||||||
% which might be worth a look.
|
|
||||||
|
|
||||||
% Enough about the document class.
|
|
||||||
|
|
||||||
% -- We are in swanky unicode, XeTeX land, and must now import these packages:
|
|
||||||
\usepackage{fontspec,xltxtra,xunicode}
|
|
||||||
% fontspec means we can specify pretty much any font.
|
|
||||||
% Because we are using XeTeX material,
|
|
||||||
% this template needs to be called with the `--xetex` flag.
|
|
||||||
|
|
||||||
|
|
||||||
% Symbols:
|
|
||||||
% Pandoc imports the extensive `amsmath` collection of symbols
|
|
||||||
% for typesetting ordinary math.
|
|
||||||
\usepackage{amsmath}
|
|
||||||
% if you use exotic symbols you need to import specific packages, eg. for
|
|
||||||
% electrical engineering diagrams, musical notation, exotic currency symbols,
|
|
||||||
% the unspeakable rites of freemasonry etc.
|
|
||||||
|
|
||||||
\usepackage{amssymb}
|
|
||||||
|
|
||||||
\usepackage{eurosym}
|
|
||||||
\usepackage{rotating}
|
|
||||||
|
|
||||||
\usepackage[%
|
|
||||||
all,
|
|
||||||
defaultlines=3 % nombre minimum de lignes
|
|
||||||
]{nowidow}
|
|
||||||
|
|
||||||
% `babel`:
|
|
||||||
% The `babel` package, among other things, lets you determine what
|
|
||||||
% language you are using in a given stretch of text, so that typesetting
|
|
||||||
% will go well. Here we specify that mostly, we are speaking English:
|
|
||||||
% \usepackage[francais]{babel}
|
|
||||||
%%% \usepackage[francais]{babel}
|
|
||||||
\usepackage{babel}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% Margins, etc:
|
|
||||||
% the `geometry` package makes for convenient adjusting of margins, which is what
|
|
||||||
% you asked about. Of course it can do much more, even make coffee for you:
|
|
||||||
\usepackage{geometry}
|
|
||||||
\geometry{verbose,a4paper,tmargin=3cm,bmargin=5cm,lmargin=3cm,rmargin=5cm}
|
|
||||||
% so if you just keep a copy of this template in the directory you are working in, you
|
|
||||||
% can adjust the margins by going into this file and messing with the margins.
|
|
||||||
% the syntax is very unforgiving, but permits 3cm and 2.5in and some other things.
|
|
||||||
|
|
||||||
|
|
||||||
% Font:
|
|
||||||
% Here I set my main font, which is an Apple Corporation Exclusive, golly.
|
|
||||||
|
|
||||||
% \setmainfont{Hoefler Text}
|
|
||||||
% \setromanfont[Mapping=tex-text,Contextuals={NoWordInitial,NoWordFinal,NoLineInitial,NoLineFinal},Ligatures={NoCommon}]{Hoefler Text}
|
|
||||||
|
|
||||||
% Hoefler Text is okay, but note the long discussion of 'contextuals' which is necessary to cools off
|
|
||||||
% some of its show-offy properties. (You can make your essay look like the
|
|
||||||
% Declaration of Independence by specifying e.g. Ligatures={Rare} )
|
|
||||||
% If you have a copy you might try it; as it is
|
|
||||||
% I will comment it out and supply something more certain to be around:
|
|
||||||
|
|
||||||
\setmainfont{Open Sans}
|
|
||||||
|
|
||||||
% Properly one should specify a sanserif font and a monospace font
|
|
||||||
% see e.g. the example of Kieran Healy:
|
|
||||||
% \setromanfont[Mapping=tex-text,Numbers=OldStyle]{Minion Pro}
|
|
||||||
% \setsansfont[Mapping=tex-text]{Minion Pro}
|
|
||||||
% \setmonofont[Mapping=tex-text,Scale=0.8]{Pragmata}
|
|
||||||
|
|
||||||
% But I hate sanserif fonts, and anyway there are defaults.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% Heading styles:
|
|
||||||
% These commands keep the koma system from making stupid sans serif section headings
|
|
||||||
\setkomafont{title}{\rmfamily\mdseries\upshape\normalsize\color{clgreencolor}}
|
|
||||||
\setkomafont{sectioning}{\rmfamily\mdseries\upshape\normalsize\color{clgreencolor}}
|
|
||||||
\setkomafont{descriptionlabel}{\rmfamily\mdseries\upshape\normalsize\color{clgreencolor}}
|
|
||||||
|
|
||||||
% Add some numbering to headings and a new line until heading level 6
|
|
||||||
%\usepackage{titlesec}
|
|
||||||
%\setcounter{secnumdepth}{6}
|
|
||||||
%\titleformat{\paragraph}{\normalfont\normalsize\color{clgreencolor}}{\theparagraph}{1em}{}
|
|
||||||
%\titlespacing*{\paragraph}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
|
|
||||||
%\titleformat{\subparagraph}{\normalfont\normalsize\color{clgreencolor}}{\thesubparagraph}{1em}{}
|
|
||||||
%\titlespacing*{\subparagraph}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
|
|
||||||
|
|
||||||
% Hyphenation
|
|
||||||
% We played with the tolerance to increase the hyphenation
|
|
||||||
\tolerance=1000
|
|
||||||
% list of words which need hyphenation
|
|
||||||
\hyphenation{a-gen-da cha-que u-sa-ger}
|
|
||||||
|
|
||||||
% I'm puzzled why I have this foonote speciality,
|
|
||||||
% I wonder if it's part of my problem I've been having, but wont look
|
|
||||||
% into it now.
|
|
||||||
\usepackage[flushmargin]{footmisc}
|
|
||||||
% \usepackage[hang,flushmargin]{footmisc}
|
|
||||||
|
|
||||||
|
|
||||||
% So much for my personal template.
|
|
||||||
|
|
||||||
|
|
||||||
% Everything that follows is copied from the pandoc default template:
|
|
||||||
% I will interpolate a few comments, the comments that are in
|
|
||||||
% the default template will be marked % --
|
|
||||||
|
|
||||||
% Paragraph format:
|
|
||||||
% Pandoc prefers unindented paragraphs in the European style:
|
|
||||||
\setlength{\parindent}{0pt}
|
|
||||||
% ... with paragraph breaks marked by a slight lengthening of
|
|
||||||
% the space between paragraphs:
|
|
||||||
\setlength{\parskip}{6pt plus 2pt minus 1pt}
|
|
||||||
\providecommand{\tightlist}{%
|
|
||||||
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
|
||||||
% Page format:
|
|
||||||
% \pagestyle{plain}
|
|
||||||
% The default `plain` pagestyle just numbers the pages,
|
|
||||||
% whereas
|
|
||||||
\pagestyle{empty}
|
|
||||||
% would give you no numbering.
|
|
||||||
% After one-million man-years of macro-composition,
|
|
||||||
% there are also fancy pagestyles with much wilder options
|
|
||||||
% for headers and footers, of course.
|
|
||||||
|
|
||||||
\usepackage{fancyhdr}
|
|
||||||
\pagestyle{fancy}
|
|
||||||
\fancyhf{}
|
|
||||||
\rfoot{\color{clgraycolor}\thepage}
|
|
||||||
\renewcommand{\headrulewidth}{0pt}
|
|
||||||
\renewcommand{\footrulewidth}{0pt}
|
|
||||||
|
|
||||||
|
|
||||||
% Footnotes
|
|
||||||
% if you have code in your footnotes, the million macro march
|
|
||||||
% kind of bumps into itself.
|
|
||||||
% Pandoc, having just rendered your text into LaTeX,
|
|
||||||
% knows whether the 'variable' `verbatim-in-note` is True, and
|
|
||||||
% If it is, it asks for a LaTeX package that solves the dilemma:
|
|
||||||
$if(verbatim-in-note)$
|
|
||||||
\usepackage{fancyvrb}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
% Lists formatting:
|
|
||||||
% note sure what 'fancy enums' are; something to do with lists,
|
|
||||||
% as the further comment suggests:
|
|
||||||
$if(fancy-enums)$
|
|
||||||
% -- Redefine labelwidth for lists; otherwise, the enumerate package will cause
|
|
||||||
% -- markers to extend beyond the left margin.
|
|
||||||
\makeatletter\AtBeginDocument{%
|
|
||||||
\renewcommand{\@listi}
|
|
||||||
{\setlength{\labelwidth}{4em}}
|
|
||||||
}\makeatother
|
|
||||||
\usepackage{enumerate}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
|
|
||||||
% Table formatting:
|
|
||||||
% What if you make a table? -- Pandoc knows, of course, and
|
|
||||||
% then declares that its variable `table` is True and
|
|
||||||
% imports a table package suitable to its pleasantly simple tables.
|
|
||||||
% Needless to say infinitely complicated tables are possible in
|
|
||||||
% LaTeX with suitable packages. We are spared the temptation:
|
|
||||||
|
|
||||||
$if(tables)$
|
|
||||||
\usepackage{array}
|
|
||||||
|
|
||||||
% Continuing on the topic of tables ... (we havent reached `endif`).
|
|
||||||
% The commented out line below is in the default pandoc latex.template.
|
|
||||||
% Some unpleasantness with table formatting must be corrected.
|
|
||||||
|
|
||||||
% -- This is needed because raggedright in table elements redefines \\:
|
|
||||||
\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
|
|
||||||
\let\PBS=\PreserveBackslash
|
|
||||||
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
|
|
||||||
% Subscripts:
|
|
||||||
% Pandoc remembers whether you used subscripts, assigning True to
|
|
||||||
% its `subscript` variable
|
|
||||||
% It then needs to adopt a default with an incantation like this:
|
|
||||||
$if(subscript)$
|
|
||||||
\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
|
|
||||||
% Web-style links:
|
|
||||||
|
|
||||||
% markdown inclines us to use links, since our texts can be made into html.
|
|
||||||
% Why not have clickable blue links even in
|
|
||||||
% learned, scientific, religious, juridical, poetical and other suchlike texts?
|
|
||||||
% Never mind that they have been proven to destroy the nervous system!
|
|
||||||
|
|
||||||
% First, what about the fact that links like http://example.com are
|
|
||||||
% technically code and thus must not be broken across lines?
|
|
||||||
% [breaklinks=true] to the rescue!
|
|
||||||
|
|
||||||
% Nowadays LaTeX can handle all of this with another half million macros:
|
|
||||||
|
|
||||||
\usepackage[dvipsnames]{xcolor}
|
|
||||||
\definecolor{linkcolor}{RGB}{0, 136, 170}
|
|
||||||
\definecolor{linkcolortoc}{RGB}{51,51,51} % same as text color
|
|
||||||
\definecolor{clgreencolor}{RGB}{136,170,0}
|
|
||||||
\definecolor{clgraycolor}{RGB}{51,51,51}
|
|
||||||
\definecolor{cctpcolor}{RGB}{0,136,170}
|
|
||||||
|
|
||||||
\usepackage[breaklinks=true]{hyperref}
|
|
||||||
\hypersetup{colorlinks,%
|
|
||||||
citecolor=linkcolor%
|
|
||||||
filecolor=linkcolor,%
|
|
||||||
linkcolor=linkcolor,
|
|
||||||
urlcolor=linkcolor}
|
|
||||||
$if(url)$
|
|
||||||
\usepackage{url}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
|
|
||||||
% Images.
|
|
||||||
% In ye olde LaTeX one could only import a limited range of image
|
|
||||||
% types, e.g. the forgotten .eps files. Or else one simply drew the image with suitable
|
|
||||||
% commands and drawing packages. Today we want to import .jpg files we make with
|
|
||||||
% our smart phones or whatever:
|
|
||||||
|
|
||||||
\usepackage{lscape}
|
|
||||||
\usepackage{graphicx}
|
|
||||||
\usepackage{pdfpages}
|
|
||||||
|
|
||||||
%$if(graphics)$
|
|
||||||
%\usepackage{graphicx}
|
|
||||||
% -- We will generate all images so they have a width \maxwidth. This means
|
|
||||||
% -- that they will get their normal width if they fit onto the page, but
|
|
||||||
% -- are scaled down if they would overflow the margins.
|
|
||||||
%\makeatletter
|
|
||||||
%\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
|
|
||||||
%\else\Gin@nat@width\fi}
|
|
||||||
%\makeatother
|
|
||||||
%\let\Oldincludegraphics\includegraphics
|
|
||||||
%\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
|
|
||||||
%$endif$
|
|
||||||
|
|
||||||
|
|
||||||
\makeatletter
|
|
||||||
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
|
|
||||||
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
|
|
||||||
\makeatother
|
|
||||||
% Scale images if necessary, so that they will not overflow the page
|
|
||||||
% margins by default, and it is still possible to overwrite the defaults
|
|
||||||
% using explicit options in \includegraphics[width, height, ...]{}
|
|
||||||
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
|
|
||||||
|
|
||||||
$if(csl-refs)$
|
|
||||||
\newlength{\cslhangindent}
|
|
||||||
\setlength{\cslhangindent}{1.5em}
|
|
||||||
\newenvironment{cslreferences}%
|
|
||||||
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
|
|
||||||
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
|
|
||||||
{\par}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
% Section numbering.
|
|
||||||
% Here again is a variable you can specify on the commandline
|
|
||||||
% `markdown2pdf my.txt --number-sections --xetex --template=/wherever/this/is -o my.pdf`
|
|
||||||
$if(numbersections)$
|
|
||||||
$else$
|
|
||||||
\setcounter{secnumdepth}{0}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
% Footnotes:
|
|
||||||
% Wait, didn't we already discuss the crisis of code in footnotes?
|
|
||||||
% Evidently the order of unfolding of macros required that
|
|
||||||
% we import a package to deal with them earlier
|
|
||||||
% and issue a command it defines now. (Or maybe that's not the reason;
|
|
||||||
% very often the order does matter as the insane system of macro expansion
|
|
||||||
% must take place by stages.)
|
|
||||||
$if(verbatim-in-note)$
|
|
||||||
\VerbatimFootnotes % -- allows verbatim text in footnotes
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
% Other stuff you specify on the command line:
|
|
||||||
% You can include stuff for the header from a file specified on the command line;
|
|
||||||
% I've never done this, but that stuff will go here:
|
|
||||||
$for(header-includes)$
|
|
||||||
$header-includes$
|
|
||||||
$endfor$
|
|
||||||
|
|
||||||
% Title, authors, date.
|
|
||||||
% If you specified title authors and date at the start of
|
|
||||||
% your pandoc-markdown file, pandoc knows the 'values' of the
|
|
||||||
% variables: title authors date and fills them in.
|
|
||||||
|
|
||||||
$if(title)$
|
|
||||||
\title{$title$}
|
|
||||||
$endif$
|
|
||||||
\author{$for(author)$$author$$sep$\\$endfor$}
|
|
||||||
$if(date)$
|
|
||||||
\date{$date$}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
% Package tcolorbox for making nice boxes around some texts
|
|
||||||
\usepackage{tcolorbox}
|
|
||||||
|
|
||||||
|
|
||||||
% Eviter l'erreur "Environment Shaded undefined"
|
|
||||||
$if(highlighting-macros)$
|
|
||||||
$highlighting-macros$
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
% missing environment longtable
|
|
||||||
\usepackage{booktabs}
|
|
||||||
\usepackage{longtable}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% At last:
|
|
||||||
% The document itself!:
|
|
||||||
|
|
||||||
% After filling in all these blanks above, or erasing them
|
|
||||||
% where they are not needed, Pandoc has finished writing the
|
|
||||||
% famous LaTeX *preamble* for your document.
|
|
||||||
% Now comes the all-important command \begin{document}
|
|
||||||
% which as you can see, will be paired with an \end{document} at the end.
|
|
||||||
% Pandoc knows whether you have a title, and has already
|
|
||||||
% specified what it is; if so, it demands that the title be rendered.
|
|
||||||
% Pandoc knows whether you want a table of contents, you
|
|
||||||
% specify this on the command line.
|
|
||||||
% Then, after fiddling with alignments, there comes the real
|
|
||||||
% business: pandoc slaps its rendering of your text in the place of
|
|
||||||
% the variable `body`
|
|
||||||
% It then concludes the document it has been writing.
|
|
||||||
|
|
||||||
\color{clgraycolor}
|
|
||||||
|
|
||||||
\errorcontextlines 10000
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
|
|
||||||
$if(title)$
|
|
||||||
\maketitle
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
|
|
||||||
%\begingroup
|
|
||||||
%\hypersetup{linkcolor=linkcolortoc}
|
|
||||||
|
|
||||||
%\tableofcontents
|
|
||||||
|
|
||||||
%\listoffigures
|
|
||||||
|
|
||||||
%\listoftables
|
|
||||||
|
|
||||||
%\endgroup
|
|
||||||
|
|
||||||
|
|
||||||
$if(alignment)$
|
|
||||||
\begin{$alignment$}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
$body$
|
|
||||||
|
|
||||||
%$if(alignment)$
|
|
||||||
\end{$alignment$}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
|
|
||||||
\end{document}
|
|
@ -6,7 +6,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"environnement": {
|
"environnement": {
|
||||||
"title": "Environnement Immédiat",
|
"title": "Environnement Immédiat",
|
||||||
"description": "Quel est le type de milieu représentant le mieux (milieu dominant) l’occupation du sol sur la parcelle où se situe l'arbre",
|
"description": "Quel est le type de milieu représentant le mieux (milieu dominant) l’occupation du sol sur la parcelle où se situe l'arbre'",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"hauteur": {
|
"hauteur": {
|
||||||
@ -27,7 +27,7 @@
|
|||||||
"espece": {
|
"espece": {
|
||||||
"title": "Espèce",
|
"title": "Espèce",
|
||||||
"description": "Nom de l'espèce d'arbre. À déterminer avec une appli tierce (PlantNet) ou en consultant le tuto dans la section « à propos »",
|
"description": "Nom de l'espèce d'arbre. À déterminer avec une appli tierce (PlantNet) ou en consultant le tuto dans la section « à propos »",
|
||||||
"type": "string"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"remarques": {
|
"remarques": {
|
||||||
"title": "Remarques",
|
"title": "Remarques",
|
||||||
@ -38,7 +38,7 @@
|
|||||||
},
|
},
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"title": "Environnement de l'arbre",
|
"title": "Environnement de l'arbre'",
|
||||||
"description": "",
|
"description": "",
|
||||||
"layout": [
|
"layout": [
|
||||||
{ "key": "environnement",
|
{ "key": "environnement",
|
||||||
|
@ -1,202 +0,0 @@
|
|||||||
{
|
|
||||||
"schema": {
|
|
||||||
"title": "Haies",
|
|
||||||
"description": "Données associées à une haie",
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"environnement": {
|
|
||||||
"title": "Environnement immédiat",
|
|
||||||
"description": "Quel est le type de milieu représentant le mieux (milieu dominant) l’occupation du sol sur la parcelle où se situe la haie",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"longueur": {
|
|
||||||
"title": "Longueur (en m)",
|
|
||||||
"description": "À exprimer en mètres. Vous pouvez l’estimer en comptant le nombre de pas. Un pas allongé par rapport à la foulée normale équivaut à 1 mètre. La longueur sera aussi calculée automatiquement sur base de votre dessin",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"largeur": {
|
|
||||||
"title": "Largeur (en m)",
|
|
||||||
"description": "À exprimer en mètre",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"hauteur": {
|
|
||||||
"title": "Hauteur (en m)",
|
|
||||||
"description": "Vous pouvez l’estimer avec une méthode simple expliquée dans un tutoriel (voir section « à propos »)",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"nombre_rangs": {
|
|
||||||
"title": "Nombre de rangs",
|
|
||||||
"description": "",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"etat_entretien": {
|
|
||||||
"title": "État / entretien",
|
|
||||||
"description": "Dans la partie tuto, on vous explique comment reconnaitre si une haie est entretenue ou pas.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"espece_1": {
|
|
||||||
"title": "Espèce principale 1",
|
|
||||||
"description": "À déterminer avec une appli tierce (PlantNet) ou en consultant le tuto dans la section « à propos »",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"espece_2": {
|
|
||||||
"title": "Espèce principale 2",
|
|
||||||
"description": "À déterminer avec une appli tierce (PlantNet) ou en consultant le tuto dans la section « à propos »",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"espece_3": {
|
|
||||||
"title": "Espèce principale 3",
|
|
||||||
"description": "À déterminer avec une appli tierce (PlantNet) ou en consultant le tuto dans la section « à propos »",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"autres_especes": {
|
|
||||||
"title": "Autres espèces",
|
|
||||||
"description": "",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"remarques": {
|
|
||||||
"title": "Remarques",
|
|
||||||
"description": "Autres observations à propos du site visité, nom complet des espèces identifiées.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"title": "Environnement de la haie",
|
|
||||||
"description": "",
|
|
||||||
"layout": [
|
|
||||||
{ "key": "environnement",
|
|
||||||
"type": "select",
|
|
||||||
"titleMap": [
|
|
||||||
{ "name": "inconnu", "value": null },
|
|
||||||
{ "name": "Prairie", "value": "Prairie" },
|
|
||||||
{ "name": "Champ cultivé", "value": "Champ cultivé" },
|
|
||||||
{ "name": "Bois de feuillus", "value": "Bois de feuillus" },
|
|
||||||
{ "name": "Bois de résineux", "value": "Bois de résineux" },
|
|
||||||
{ "name": "Friche / lande", "value": "Friche / lande" },
|
|
||||||
{ "name": "Zone humide", "value": "Zone humide" },
|
|
||||||
{ "name": "Zone urbanisée", "value": "Zone urbanisée" },
|
|
||||||
{ "name": "Parc de loisirs / jardin", "value": "Parc de loisirs / jardin" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Caractéristiques physiques de la haie",
|
|
||||||
"description": "",
|
|
||||||
"layout": [
|
|
||||||
{
|
|
||||||
"key": "longueur"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "largeur"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "hauteur"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "nombre_rangs"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "État entretien",
|
|
||||||
"description": "",
|
|
||||||
"layout": [
|
|
||||||
{
|
|
||||||
"key": "etat_entretien",
|
|
||||||
"titleMap": [
|
|
||||||
{ "name": "indéterminé", "value": null },
|
|
||||||
{ "name": "régulier", "value" : "regulier" },
|
|
||||||
{ "name": "occasionnel", "value" : "occasionnel" },
|
|
||||||
{ "name": "pas entretenu", "value" : "pas entretenu" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Espèces présentes",
|
|
||||||
"description": "",
|
|
||||||
"layout": [
|
|
||||||
{
|
|
||||||
"key": "espece_1",
|
|
||||||
"titleMap": [
|
|
||||||
{ "name": "inconnu", "value": null },
|
|
||||||
{ "name": "Aubépine", "value": "Aubépine" },
|
|
||||||
{ "name": "Cassissier", "value": "Cassissier" },
|
|
||||||
{ "name": "Charme", "value": "Charme" },
|
|
||||||
{ "name": "Cognassier", "value": "Cognassier" },
|
|
||||||
{ "name": "Cornouiller", "value": "Cornouiller" },
|
|
||||||
{ "name": "Églantier", "value": "Églantier" },
|
|
||||||
{ "name": "Framboisier", "value": "Framboisier" },
|
|
||||||
{ "name": "Fusain", "value": "Fusain" },
|
|
||||||
{ "name": "Groseillier", "value": "Groseillier" },
|
|
||||||
{ "name": "Houx", "value": "Houx" },
|
|
||||||
{ "name": "Merisier", "value": "Merisier" },
|
|
||||||
{ "name": "Néflier", "value": "Néflier" },
|
|
||||||
{ "name": "Sureau", "value": "Sureau" },
|
|
||||||
{ "name": "Viorne", "value": "Viorne" },
|
|
||||||
{ "name": "Autre", "value": "Autre" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "espece_2",
|
|
||||||
"titleMap": [
|
|
||||||
{ "name": "inconnu", "value": null },
|
|
||||||
{ "name": "Aubépine", "value": "Aubépine" },
|
|
||||||
{ "name": "Cassissier", "value": "Cassissier" },
|
|
||||||
{ "name": "Charme", "value": "Charme" },
|
|
||||||
{ "name": "Cognassier", "value": "Cognassier" },
|
|
||||||
{ "name": "Cornouiller", "value": "Cornouiller" },
|
|
||||||
{ "name": "Églantier", "value": "Églantier" },
|
|
||||||
{ "name": "Framboisier", "value": "Framboisier" },
|
|
||||||
{ "name": "Fusain", "value": "Fusain" },
|
|
||||||
{ "name": "Groseillier", "value": "Groseillier" },
|
|
||||||
{ "name": "Houx", "value": "Houx" },
|
|
||||||
{ "name": "Merisier", "value": "Merisier" },
|
|
||||||
{ "name": "Néflier", "value": "Néflier" },
|
|
||||||
{ "name": "Sureau", "value": "Sureau" },
|
|
||||||
{ "name": "Viorne", "value": "Viorne" },
|
|
||||||
{ "name": "Autre", "value": "Autre" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "espece_3",
|
|
||||||
"titleMap": [
|
|
||||||
{ "name": "inconnu", "value": null },
|
|
||||||
{ "name": "Aubépine", "value": "Aubépine" },
|
|
||||||
{ "name": "Cassissier", "value": "Cassissier" },
|
|
||||||
{ "name": "Charme", "value": "Charme" },
|
|
||||||
{ "name": "Cognassier", "value": "Cognassier" },
|
|
||||||
{ "name": "Cornouiller", "value": "Cornouiller" },
|
|
||||||
{ "name": "Églantier", "value": "Églantier" },
|
|
||||||
{ "name": "Framboisier", "value": "Framboisier" },
|
|
||||||
{ "name": "Fusain", "value": "Fusain" },
|
|
||||||
{ "name": "Groseillier", "value": "Groseillier" },
|
|
||||||
{ "name": "Houx", "value": "Houx" },
|
|
||||||
{ "name": "Merisier", "value": "Merisier" },
|
|
||||||
{ "name": "Néflier", "value": "Néflier" },
|
|
||||||
{ "name": "Sureau", "value": "Sureau" },
|
|
||||||
{ "name": "Viorne", "value": "Viorne" },
|
|
||||||
{ "name": "Autre", "value": "Autre" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "autres_especes"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Remarques",
|
|
||||||
"description": "",
|
|
||||||
"layout": [
|
|
||||||
{
|
|
||||||
"key": "remarques",
|
|
||||||
"type": "textarea",
|
|
||||||
"notitle": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,239 +0,0 @@
|
|||||||
{
|
|
||||||
"schema": {
|
|
||||||
"title": "Bosquets, buissons, friches, lisières",
|
|
||||||
"description": "Données associées à des zones naturelles",
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"environnement": {
|
|
||||||
"title": "Environnement immédiat",
|
|
||||||
"description": "Quel est le type de milieu représentant le mieux (milieu dominant) l’occupation du sol sur la parcelle où se situe la zone naturelle",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"longueur": {
|
|
||||||
"title": "Longueur (en m)",
|
|
||||||
"description": "À exprimer en mètres. Vous pouvez l’estimer en comptant le nombre de pas. Un pas allongé par rapport à la foulée normale équivaut à 1 mètre.",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"largeur": {
|
|
||||||
"title": "Largeur (en m)",
|
|
||||||
"description": "À exprimer en mètres. Vous pouvez l’estimer en comptant le nombre de pas. Un pas allongé par rapport à la foulée normale équivaut à 1 mètre.",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"hauteur": {
|
|
||||||
"title": "Hauteur (en m)",
|
|
||||||
"description": "Vous pouvez l’estimer avec une méthode simple expliquée dans un tutoriel (voir section « à propos »)",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"etat_entretien": {
|
|
||||||
"title": "État / entretien",
|
|
||||||
"description": "Dans la partie tuto, on vous explique comment reconnaitre si une zone naturelle est entretenue ou pas.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"espece_1": {
|
|
||||||
"title": "Espèce principale 1",
|
|
||||||
"description": "À déterminer avec une appli tierce (PlantNet) ou en consultant le tuto dans la section « à propos »",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"espece_2": {
|
|
||||||
"title": "Espèce principale 2",
|
|
||||||
"description": "À déterminer avec une appli tierce (PlantNet) ou en consultant le tuto dans la section « à propos »",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"espece_3": {
|
|
||||||
"title": "Espèce principale 3",
|
|
||||||
"description": "À déterminer avec une appli tierce (PlantNet) ou en consultant le tuto dans la section « à propos »",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"autres_especes": {
|
|
||||||
"title": "Autres espèces",
|
|
||||||
"description": "",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"remarques": {
|
|
||||||
"title": "Remarques",
|
|
||||||
"description": "Autres observations à propos du site visité, nom complet des espèces identifiées.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"title": "Environnement de la zone naturelle",
|
|
||||||
"description": "",
|
|
||||||
"layout": [
|
|
||||||
{ "key": "environnement",
|
|
||||||
"type": "select",
|
|
||||||
"titleMap": [
|
|
||||||
{ "name": "inconnu", "value": null },
|
|
||||||
{ "name": "Prairie", "value": "Prairie" },
|
|
||||||
{ "name": "Champ cultivé", "value": "Champ cultivé" },
|
|
||||||
{ "name": "Bois de feuillus", "value": "Bois de feuillus" },
|
|
||||||
{ "name": "Bois de résineux", "value": "Bois de résineux" },
|
|
||||||
{ "name": "Friche / lande", "value": "Friche / lande" },
|
|
||||||
{ "name": "Zone humide", "value": "Zone humide" },
|
|
||||||
{ "name": "Zone urbanisée", "value": "Zone urbanisée" },
|
|
||||||
{ "name": "Parc de loisirs / jardin", "value": "Parc de loisirs / jardin" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Caractéristiques physiques de la zone naturelle",
|
|
||||||
"description": "",
|
|
||||||
"layout": [
|
|
||||||
{
|
|
||||||
"key": "longueur"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "largeur"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "hauteur"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "État entretien",
|
|
||||||
"description": "",
|
|
||||||
"layout": [
|
|
||||||
{
|
|
||||||
"key": "etat_entretien",
|
|
||||||
"titleMap": [
|
|
||||||
{ "name": "indéterminé", "value": null },
|
|
||||||
{ "name": "régulier", "value" : "regulier" },
|
|
||||||
{ "name": "occasionnel", "value" : "occasionnel" },
|
|
||||||
{ "name": "pas entretenu", "value" : "pas entretenu" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Espèces présentes",
|
|
||||||
"description": "",
|
|
||||||
"layout": [
|
|
||||||
{
|
|
||||||
"key": "espece_1",
|
|
||||||
"titleMap": [
|
|
||||||
{ "name": "Inconnu", "value": "Inconnu" },
|
|
||||||
{ "name": "Aubépine", "value": "Aubépine" },
|
|
||||||
{ "name": "Aulne", "value": "Aulne" },
|
|
||||||
{ "name": "Bouleau", "value": "Bouleau" },
|
|
||||||
{ "name": "Bourdaine", "value": "Bourdaine" },
|
|
||||||
{ "name": "Camérisier", "value": "Camérisier" },
|
|
||||||
{ "name": "Cerisier", "value": "Cerisier" },
|
|
||||||
{ "name": "Charme", "value": "Charme" },
|
|
||||||
{ "name": "Châtaignier", "value": "Châtaignier" },
|
|
||||||
{ "name": "Chêne", "value": "Chêne" },
|
|
||||||
{ "name": "Conifère", "value": "Conifère" },
|
|
||||||
{ "name": "Erable", "value": "Erable" },
|
|
||||||
{ "name": "Frêne", "value": "Frêne" },
|
|
||||||
{ "name": "Fusain", "value": "Fusain" },
|
|
||||||
{ "name": "Hêtre", "value": "Hêtre" },
|
|
||||||
{ "name": "Houx", "value": "Houx" },
|
|
||||||
{ "name": "If", "value": "If" },
|
|
||||||
{ "name": "Marronnier", "value": "Marronnier" },
|
|
||||||
{ "name": "Merisier", "value": "Merisier" },
|
|
||||||
{ "name": "Noisetier", "value": "Noisetier" },
|
|
||||||
{ "name": "Orme", "value": "Orme" },
|
|
||||||
{ "name": "Peuplier", "value": "Peuplier" },
|
|
||||||
{ "name": "Platane", "value": "Platane" },
|
|
||||||
{ "name": "Robinier Faux-acacia", "value": "Robinier Faux-acacia" },
|
|
||||||
{ "name": "Saule", "value": "Saule" },
|
|
||||||
{ "name": "Saule", "value": "Saule" },
|
|
||||||
{ "name": "Sorbier (des oiseleurs)", "value": "Sorbier (des oiseleurs)" },
|
|
||||||
{ "name": "Sureau noir", "value": "Sureau noir" },
|
|
||||||
{ "name": "Tilleul", "value": "Tilleul" },
|
|
||||||
{ "name": "Viorne", "value": "Viorne" },
|
|
||||||
{ "name": "Autre", "value": "Autre" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "espece_2",
|
|
||||||
"titleMap": [
|
|
||||||
{ "name": "Inconnu", "value": "Inconnu" },
|
|
||||||
{ "name": "Aubépine", "value": "Aubépine" },
|
|
||||||
{ "name": "Aulne", "value": "Aulne" },
|
|
||||||
{ "name": "Bouleau", "value": "Bouleau" },
|
|
||||||
{ "name": "Bourdaine", "value": "Bourdaine" },
|
|
||||||
{ "name": "Camérisier", "value": "Camérisier" },
|
|
||||||
{ "name": "Cerisier", "value": "Cerisier" },
|
|
||||||
{ "name": "Charme", "value": "Charme" },
|
|
||||||
{ "name": "Châtaignier", "value": "Châtaignier" },
|
|
||||||
{ "name": "Chêne", "value": "Chêne" },
|
|
||||||
{ "name": "Conifère", "value": "Conifère" },
|
|
||||||
{ "name": "Erable", "value": "Erable" },
|
|
||||||
{ "name": "Frêne", "value": "Frêne" },
|
|
||||||
{ "name": "Fusain", "value": "Fusain" },
|
|
||||||
{ "name": "Hêtre", "value": "Hêtre" },
|
|
||||||
{ "name": "Houx", "value": "Houx" },
|
|
||||||
{ "name": "If", "value": "If" },
|
|
||||||
{ "name": "Marronnier", "value": "Marronnier" },
|
|
||||||
{ "name": "Merisier", "value": "Merisier" },
|
|
||||||
{ "name": "Noisetier", "value": "Noisetier" },
|
|
||||||
{ "name": "Orme", "value": "Orme" },
|
|
||||||
{ "name": "Peuplier", "value": "Peuplier" },
|
|
||||||
{ "name": "Platane", "value": "Platane" },
|
|
||||||
{ "name": "Robinier Faux-acacia", "value": "Robinier Faux-acacia" },
|
|
||||||
{ "name": "Saule", "value": "Saule" },
|
|
||||||
{ "name": "Saule", "value": "Saule" },
|
|
||||||
{ "name": "Sorbier (des oiseleurs)", "value": "Sorbier (des oiseleurs)" },
|
|
||||||
{ "name": "Sureau noir", "value": "Sureau noir" },
|
|
||||||
{ "name": "Tilleul", "value": "Tilleul" },
|
|
||||||
{ "name": "Viorne", "value": "Viorne" },
|
|
||||||
{ "name": "Autre", "value": "Autre" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "espece_3",
|
|
||||||
"titleMap": [
|
|
||||||
{ "name": "Inconnu", "value": "Inconnu" },
|
|
||||||
{ "name": "Aubépine", "value": "Aubépine" },
|
|
||||||
{ "name": "Aulne", "value": "Aulne" },
|
|
||||||
{ "name": "Bouleau", "value": "Bouleau" },
|
|
||||||
{ "name": "Bourdaine", "value": "Bourdaine" },
|
|
||||||
{ "name": "Camérisier", "value": "Camérisier" },
|
|
||||||
{ "name": "Cerisier", "value": "Cerisier" },
|
|
||||||
{ "name": "Charme", "value": "Charme" },
|
|
||||||
{ "name": "Châtaignier", "value": "Châtaignier" },
|
|
||||||
{ "name": "Chêne", "value": "Chêne" },
|
|
||||||
{ "name": "Conifère", "value": "Conifère" },
|
|
||||||
{ "name": "Erable", "value": "Erable" },
|
|
||||||
{ "name": "Frêne", "value": "Frêne" },
|
|
||||||
{ "name": "Fusain", "value": "Fusain" },
|
|
||||||
{ "name": "Hêtre", "value": "Hêtre" },
|
|
||||||
{ "name": "Houx", "value": "Houx" },
|
|
||||||
{ "name": "If", "value": "If" },
|
|
||||||
{ "name": "Marronnier", "value": "Marronnier" },
|
|
||||||
{ "name": "Merisier", "value": "Merisier" },
|
|
||||||
{ "name": "Noisetier", "value": "Noisetier" },
|
|
||||||
{ "name": "Orme", "value": "Orme" },
|
|
||||||
{ "name": "Peuplier", "value": "Peuplier" },
|
|
||||||
{ "name": "Platane", "value": "Platane" },
|
|
||||||
{ "name": "Robinier Faux-acacia", "value": "Robinier Faux-acacia" },
|
|
||||||
{ "name": "Saule", "value": "Saule" },
|
|
||||||
{ "name": "Saule", "value": "Saule" },
|
|
||||||
{ "name": "Sorbier (des oiseleurs)", "value": "Sorbier (des oiseleurs)" },
|
|
||||||
{ "name": "Sureau noir", "value": "Sureau noir" },
|
|
||||||
{ "name": "Tilleul", "value": "Tilleul" },
|
|
||||||
{ "name": "Viorne", "value": "Viorne" },
|
|
||||||
{ "name": "Autre", "value": "Autre" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "autres_especes"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Remarques",
|
|
||||||
"description": "",
|
|
||||||
"layout": [
|
|
||||||
{
|
|
||||||
"key": "remarques",
|
|
||||||
"type": "textarea",
|
|
||||||
"notitle": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
FROM nginx
|
|
||||||
COPY ./default.conf /etc/nginx/conf.d/default.conf
|
|
@ -1,40 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80;
|
|
||||||
listen [::]:80;
|
|
||||||
server_name localhost;
|
|
||||||
client_max_body_size 12M;
|
|
||||||
|
|
||||||
#charset koi8-r;
|
|
||||||
#access_log /var/log/nginx/host.access.log main;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_pass http://citizen-front:4000/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /api/ {
|
|
||||||
proxy_pass http://citizen-back:5002/api/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /api/media/ {
|
|
||||||
proxy_pass http://citizen-back:5002/api/media/;
|
|
||||||
proxy_intercept_errors on;
|
|
||||||
error_page 404 = @media1;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /api/media1/ {
|
|
||||||
proxy_pass http://media/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location @media1 {
|
|
||||||
rewrite ^/api/media/(.*)$ /api/media1/$1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#error_page 404 /404.html;
|
|
||||||
|
|
||||||
# redirect server error pages to the static page /50x.html
|
|
||||||
#
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
}
|
|
||||||
}
|
|
@ -10,14 +10,13 @@ JWT_BLACKLIST_TOKEN_CHECKS = ['access', 'refresh']
|
|||||||
# Application
|
# Application
|
||||||
appName = 'GeoNature-citizen' # Application name in the home page
|
appName = 'GeoNature-citizen' # Application name in the home page
|
||||||
DEFAULT_LANGUAGE = 'fr'
|
DEFAULT_LANGUAGE = 'fr'
|
||||||
FLASK_ADMIN_FLUID_LAYOUT = true
|
|
||||||
|
|
||||||
# Debug
|
# Debug
|
||||||
DEBUG = false
|
DEBUG = false
|
||||||
SQLALCHEMY_DEBUG_LEVEL = 'WARNING'
|
SQLALCHEMY_DEBUG_LEVEL = 'WARNING'
|
||||||
|
|
||||||
# URL_APPLICATION = "http://mydomain.org" # Replace mydomain.org by your domain
|
# URL_APPLICATION = "http://mydomain.org" # Replace mydomain.org by your domain
|
||||||
URL_APPLICATION = "https://localhost:8080/"
|
URL_APPLICATION = "http://taxhub:5000"
|
||||||
API_TAXHUB = "http://taxhub:5000/api/"
|
API_TAXHUB = "http://taxhub:5000/api/"
|
||||||
# API_TAXHUB = "http://mytaxhub.org/api/" # Replace mytaxhub.org by your TaxHub url
|
# API_TAXHUB = "http://mytaxhub.org/api/" # Replace mytaxhub.org by your TaxHub url
|
||||||
|
|
||||||
@ -28,12 +27,10 @@ CONFIRM_MAIL_SALT = 'your-secret-salt' # secret salt for corfirm mail token
|
|||||||
|
|
||||||
MEDIA_FOLDER = 'media'
|
MEDIA_FOLDER = 'media'
|
||||||
|
|
||||||
# Rewards
|
|
||||||
REWARDS_ENABLED = false
|
|
||||||
|
|
||||||
[RESET_PASSWD]
|
[RESET_PASSWD]
|
||||||
SUBJECT = "Link"
|
SUBJECT = "Link"
|
||||||
FROM = '"Biommap" <contact@geonature-citizen.fr>'
|
FROM = 'contact@geonature-citizen.fr'
|
||||||
TEXT_TEMPLATE = '''
|
TEXT_TEMPLATE = '''
|
||||||
Bonjour,\r\nVoici votre nouveau mot de passe :\r\n{passwd}\r\n"{app_url}
|
Bonjour,\r\nVoici votre nouveau mot de passe :\r\n{passwd}\r\n"{app_url}
|
||||||
'''
|
'''
|
||||||
@ -45,31 +42,21 @@ REWARDS_ENABLED = false
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
[CONFIRM_EMAIL]
|
[CONFIRM_EMAIL]
|
||||||
USE_CONFIRM_EMAIL = true
|
|
||||||
SUBJECT = "Activez votre compte"
|
SUBJECT = "Activez votre compte"
|
||||||
FROM = '"Biommap" <contact@geonature-citizen.fr>'
|
FROM = 'contact@geonature-citizen.fr'
|
||||||
HTML_TEMPLATE = '''<p> Bonjour,</p><br /><p>Nous vous confirmons que votre compte Biommap a bien été créé.</p>
|
HTML_TEMPLATE = '''<p> Bonjour,</p><br /><p>Nous vous confirmons que votre compte a bien été créé.</p>
|
||||||
<p> Afin d'activer votre compte veuillez <a href="{activate_url}">cliquer ici.</a>
|
<p> Afin d'activer votre compte veuillez <a href="{activate_url}">cliquer ici.</a>
|
||||||
<p>Nous vous souhaitons la bienvenue sur notre site.</p><br />
|
<p>Nous vous souhaitons la bienvenue sur notre site.</p><br />
|
||||||
<p>Bien à vous.</p>
|
<p>Bien à vous.</p>
|
||||||
'''
|
'''
|
||||||
NO_VALIDATION_HTML_TEMPLATE = '''<p> Bonjour,</p><br /><p>Nous vous confirmons que votre compte a bien été créé.</p>
|
|
||||||
<p>Nous vous souhaitons la bienvenue sur notre site.</p><br />
|
|
||||||
<p>Bien à vous.</p>
|
|
||||||
'''
|
|
||||||
|
|
||||||
[MAIL]
|
[MAIL]
|
||||||
MAIL_USE_SSL = false
|
MAIL_USE_SSL = false
|
||||||
MAIL_STARTTLS = true
|
MAIL_STARTTLS = true
|
||||||
MAIL_HOST = 'mail.easter-eggs.com'
|
MAIL_HOST = 'smtpd host'
|
||||||
MAIL_PORT = 587 # mandatory SSL port
|
MAIL_PORT = 493 # mandatory SSL port
|
||||||
MAIL_AUTH_LOGIN = 'julien.minet@champs-libres.coop'
|
MAIL_AUTH_LOGIN = 'smtpd/relay host username'
|
||||||
MAIL_AUTH_PASSWD = 'Bomel2164'
|
MAIL_AUTH_PASSWD = 'smtpd/relay host password'
|
||||||
ADMIN_MESSAGE = '''<p>Bonjour administrateur,</p><br />
|
|
||||||
<p>Un nouvel utilisateur de Biommap avec le nom d'utilisateur "{newuser_username}" a été créé!</p>
|
|
||||||
<p>Vous pouvez gérer cet utilisateur dans l'espace d'administration.</p><br />
|
|
||||||
<p>Bonne journée</p>
|
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
# API flasgger main config
|
# API flasgger main config
|
35
patches/back/requirements.txt
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
certifi==2019.6.16
|
||||||
|
chardet==3.0.4
|
||||||
|
Click==7.0
|
||||||
|
colorlog==4.0.2
|
||||||
|
flasgger==0.9.3
|
||||||
|
Flask==1.1.1
|
||||||
|
Flask-Admin==1.5.3
|
||||||
|
Flask-CKEditor==0.4.3
|
||||||
|
Flask-Cors==3.0.8
|
||||||
|
Flask-JWT-Extended==3.21.0
|
||||||
|
Flask-SQLAlchemy==2.4.0
|
||||||
|
GeoAlchemy2==0.6.3
|
||||||
|
geojson==2.5.0
|
||||||
|
gunicorn==20.0.4
|
||||||
|
idna==2.8
|
||||||
|
itsdangerous==1.1.0
|
||||||
|
Jinja2==2.10.1
|
||||||
|
jsonschema==2.6.0
|
||||||
|
MarkupSafe==1.1.1
|
||||||
|
mistune==0.8.4
|
||||||
|
passlib==1.7.1
|
||||||
|
psycopg2-binary==2.8.3
|
||||||
|
PyJWT==1.7.1
|
||||||
|
PyYAML==5.1.2
|
||||||
|
requests==2.22.0
|
||||||
|
Shapely==1.7.1
|
||||||
|
six==1.12.0
|
||||||
|
SQLAlchemy==1.3.7
|
||||||
|
toml==0.10.0
|
||||||
|
urllib3==1.25.3
|
||||||
|
Werkzeug==0.15.5
|
||||||
|
WTForms==2.2.1
|
||||||
|
gunicorn==20.0.4
|
||||||
|
httplib2==0.19.0
|
||||||
|
xlwt==1.3.0
|
@ -49,24 +49,28 @@ def get_app(config, _app=None, with_external_mods=True, url_prefix="/api"):
|
|||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config.update(config)
|
app.config.update(config)
|
||||||
|
|
||||||
if app.config["DEBUG"]:
|
if app.config["DEBUG"]:
|
||||||
from flask.logging import default_handler
|
from flask.logging import default_handler
|
||||||
import coloredlogs
|
import colorlog
|
||||||
|
|
||||||
app.config["SQLALCHEMY_ECHO"] = True
|
handler = colorlog.StreamHandler()
|
||||||
logger = logging.getLogger("werkzeug")
|
handler.setFormatter(
|
||||||
|
colorlog.ColoredFormatter(
|
||||||
coloredlogs.install(
|
"""%(log_color)s%(asctime)s %(levelname)s:%(name)s:%(message)s [in %(pathname)s:%(lineno)d]"""
|
||||||
level=logging.DEBUG,
|
)
|
||||||
fmt="%(asctime)s %(hostname)s %(name)s[%(process)d] [in %(pathname)s:%(lineno)d] %(levelname)s %(message)s",
|
|
||||||
)
|
)
|
||||||
logger.removeHandler(default_handler)
|
|
||||||
|
|
||||||
# for l in logging.Logger.manager.loggerDict.values():
|
logger = logging.getLogger("werkzeug")
|
||||||
# if hasattr(l, "handlers"):
|
logger.addHandler(handler)
|
||||||
# l.handlers = [handler]
|
app.logger.removeHandler(default_handler)
|
||||||
|
|
||||||
|
for l in logging.Logger.manager.loggerDict.values():
|
||||||
|
if hasattr(l, "handlers"):
|
||||||
|
l.handlers = [handler]
|
||||||
|
|
||||||
# else:
|
# else:
|
||||||
|
# # TODO: sourced from app.config['LOGGING']
|
||||||
# logging.basicConfig()
|
# logging.basicConfig()
|
||||||
# logger = logging.getLogger()
|
# logger = logging.getLogger()
|
||||||
# logger.setLevel(logging.INFO)
|
# logger.setLevel(logging.INFO)
|
||||||
@ -84,30 +88,45 @@ def get_app(config, _app=None, with_external_mods=True, url_prefix="/api"):
|
|||||||
|
|
||||||
# Bind app to DB
|
# Bind app to DB
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
|
|
||||||
# JWT Auth
|
# JWT Auth
|
||||||
jwt.init_app(app)
|
jwt.init_app(app)
|
||||||
|
|
||||||
swagger.init_app(app)
|
swagger.init_app(app)
|
||||||
|
|
||||||
admin.init_app(app)
|
admin.init_app(app)
|
||||||
|
|
||||||
ckeditor.init_app(app)
|
ckeditor.init_app(app)
|
||||||
|
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
|
|
||||||
|
from gncitizen.core.users.routes import routes
|
||||||
|
|
||||||
from gncitizen.core.users.routes import users_api
|
app.register_blueprint(routes, url_prefix=url_prefix)
|
||||||
from gncitizen.core.commons.routes import commons_api
|
|
||||||
from gncitizen.core.observations.routes import obstax_api
|
|
||||||
#from gncitizen.core.ref_geo.routes import geo_api
|
|
||||||
from gncitizen.core.badges.routes import badges_api
|
|
||||||
from gncitizen.core.taxonomy.routes import taxo_api
|
|
||||||
from gncitizen.core.sites.routes import sites_api
|
|
||||||
|
|
||||||
app.register_blueprint(users_api, url_prefix=url_prefix)
|
from gncitizen.core.commons.routes import routes
|
||||||
app.register_blueprint(commons_api, url_prefix=url_prefix)
|
|
||||||
app.register_blueprint(obstax_api, url_prefix=url_prefix)
|
app.register_blueprint(routes, url_prefix=url_prefix)
|
||||||
#app.register_blueprint(geo_api, url_prefix=url_prefix)
|
|
||||||
app.register_blueprint(badges_api, url_prefix=url_prefix)
|
from gncitizen.core.observations.routes import routes
|
||||||
app.register_blueprint(taxo_api, url_prefix=url_prefix)
|
|
||||||
app.register_blueprint(sites_api, url_prefix=url_prefix + "/sites")
|
app.register_blueprint(routes, url_prefix=url_prefix)
|
||||||
|
|
||||||
|
from gncitizen.core.ref_geo.routes import routes
|
||||||
|
|
||||||
|
app.register_blueprint(routes, url_prefix=url_prefix)
|
||||||
|
|
||||||
|
from gncitizen.core.badges.routes import routes
|
||||||
|
|
||||||
|
app.register_blueprint(routes, url_prefix=url_prefix)
|
||||||
|
|
||||||
|
from gncitizen.core.taxonomy.routes import routes
|
||||||
|
|
||||||
|
app.register_blueprint(routes, url_prefix=url_prefix)
|
||||||
|
|
||||||
|
from gncitizen.core.sites.routes import routes
|
||||||
|
|
||||||
|
app.register_blueprint(routes, url_prefix=url_prefix + "/sites")
|
||||||
|
|
||||||
CORS(app, supports_credentials=True)
|
CORS(app, supports_credentials=True)
|
||||||
|
|
||||||
@ -131,10 +150,11 @@ def get_app(config, _app=None, with_external_mods=True, url_prefix="/api"):
|
|||||||
module.backend.blueprint.blueprint.config = conf
|
module.backend.blueprint.blueprint.config = conf
|
||||||
app.config[manifest["module_name"]] = conf
|
app.config[manifest["module_name"]] = conf
|
||||||
|
|
||||||
# _app = app
|
_app = app
|
||||||
|
|
||||||
create_schemas(db)
|
create_schemas(db)
|
||||||
db.create_all()
|
db.create_all()
|
||||||
populate_modules(db)
|
populate_modules(db)
|
||||||
|
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
|
|
||||||
echo "------------------------------------------------"
|
|
||||||
echo "GeoNature-citizen backend server is starting ..."
|
|
||||||
echo "------------------------------------------------"
|
|
||||||
|
|
||||||
|
|
||||||
FLASKDIR=$(readlink -e "${0%/*}")
|
|
||||||
APP_DIR="$(dirname "$FLASKDIR")"
|
|
||||||
|
|
||||||
. $APP_DIR/config/settings.ini
|
|
||||||
|
|
||||||
echo "info: Starting $app_name"
|
|
||||||
echo "info: FLASKDIR: $FLASKDIR"
|
|
||||||
echo "info: APP_DIR: $APP_DIR"
|
|
||||||
|
|
||||||
# Start your gunicorn
|
|
||||||
LOG_DIR="$APP_DIR/var/log"
|
|
||||||
echo "LOG_DIR: $LOG_DIR"
|
|
||||||
if [[ ! -e $LOG_DIR ]]; then
|
|
||||||
mkdir -p $LOG_DIR
|
|
||||||
elif [[ ! -d $LOG_DIR ]]; then
|
|
||||||
echo "LOG_DIR already exists but is not a directory" 1>&2
|
|
||||||
fi
|
|
||||||
export PYTHONPATH=`pwd`/${venv_dir}
|
|
||||||
#echo $PYTHONPATH
|
|
||||||
echo "info: Starting gunicorn"
|
|
||||||
echo "--"
|
|
||||||
exec gunicorn -w ${gun_num_workers:-2} --error-log $APP_DIR/var/log/gunicorn_gncitizen_errors.log --pid="${app_name:-"gncitizen"}.pid" -b ${gun_host:-"0.0.0.0"}:${gun_port:-5002} --timeout=${gun_timeout:-30} --reload -n "geonature-citizen" wsgi:app
|
|
@ -13,5 +13,5 @@ app = get_app(config)
|
|||||||
port = app.config["API_PORT"] if app.config.get("API_PORT", False) else 5002
|
port = app.config["API_PORT"] if app.config.get("API_PORT", False) else 5002
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.debug = app.config.get("DEBUG", False)
|
app.debug = True
|
||||||
app.run(host="0.0.0.0", port=port)
|
app.run(host="0.0.0.0", port=port)
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="800px"
|
|
||||||
height="800px"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
version="1.1"
|
|
||||||
id="svg4"
|
|
||||||
sodipodi:docname="check-circle-svgrepo-com-green.svg"
|
|
||||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
|
||||||
<metadata
|
|
||||||
id="metadata10">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title></dc:title>
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<defs
|
|
||||||
id="defs8" />
|
|
||||||
<sodipodi:namedview
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1"
|
|
||||||
objecttolerance="10"
|
|
||||||
gridtolerance="10"
|
|
||||||
guidetolerance="10"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:window-width="2506"
|
|
||||||
inkscape:window-height="1403"
|
|
||||||
id="namedview6"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:zoom="0.834386"
|
|
||||||
inkscape:cx="448.21459"
|
|
||||||
inkscape:cy="381.26471"
|
|
||||||
inkscape:window-x="54"
|
|
||||||
inkscape:window-y="0"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="svg4" />
|
|
||||||
<path
|
|
||||||
fill-rule="evenodd"
|
|
||||||
clip-rule="evenodd"
|
|
||||||
d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM16.0303 8.96967C16.3232 9.26256 16.3232 9.73744 16.0303 10.0303L11.0303 15.0303C10.7374 15.3232 10.2626 15.3232 9.96967 15.0303L7.96967 13.0303C7.67678 12.7374 7.67678 12.2626 7.96967 11.9697C8.26256 11.6768 8.73744 11.6768 9.03033 11.9697L10.5 13.4393L12.7348 11.2045L14.9697 8.96967C15.2626 8.67678 15.7374 8.67678 16.0303 8.96967Z"
|
|
||||||
fill="#1C274C"
|
|
||||||
id="path2"
|
|
||||||
style="fill:#60b15c" />
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 123 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB |
@ -1,71 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
version="1.1"
|
|
||||||
id="Calque_1"
|
|
||||||
x="0px"
|
|
||||||
y="0px"
|
|
||||||
viewBox="0 0 15.2 19.8"
|
|
||||||
style="enable-background:new 0 0 15.2 19.8;"
|
|
||||||
xml:space="preserve"
|
|
||||||
sodipodi:docname="pointer-orange.svg"
|
|
||||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata
|
|
||||||
id="metadata19"><rdf:RDF><cc:Work
|
|
||||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>pointer-green</dc:title></cc:Work></rdf:RDF></metadata><defs
|
|
||||||
id="defs17" /><sodipodi:namedview
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1"
|
|
||||||
objecttolerance="10"
|
|
||||||
gridtolerance="10"
|
|
||||||
guidetolerance="10"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:window-width="1866"
|
|
||||||
inkscape:window-height="983"
|
|
||||||
id="namedview15"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:zoom="16.856284"
|
|
||||||
inkscape:cx="10.460673"
|
|
||||||
inkscape:cy="11.423541"
|
|
||||||
inkscape:window-x="54"
|
|
||||||
inkscape:window-y="27"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="Calque_1" />
|
|
||||||
<style
|
|
||||||
type="text/css"
|
|
||||||
id="style2">
|
|
||||||
.st0{fill:#FFFFFF;}
|
|
||||||
.st1{fill:#60B15C;}
|
|
||||||
</style>
|
|
||||||
<path
|
|
||||||
class="st0"
|
|
||||||
d="M7.4,19.7C-0.3,13.8,0,7.8,0,7.6C0,3.4,3.4,0,7.6,0s7.6,3.4,7.6,7.6c0.2,7.1-7.4,12.1-7.5,12.1l-0.2,0.1 L7.4,19.7z"
|
|
||||||
id="path4" />
|
|
||||||
<title
|
|
||||||
id="title6">pointer-green</title>
|
|
||||||
<path
|
|
||||||
class="st1"
|
|
||||||
d="M11.5,7.7L11.5,7.7c-0.6-0.6-1.6-0.6-2.2,0C9.2,7.9,9.1,8.1,9,8.3c0,0.1-0.1,0.3-0.1,0.4c0,0.9,0.7,1.5,1.6,1.5 c0.3,0,0.7-0.1,0.9-0.3c0.7-0.5,0.8-1.5,0.3-2.1c0,0,0,0,0,0l0,0L11.5,7.7z"
|
|
||||||
id="path8"
|
|
||||||
style="fill:#ff6600" />
|
|
||||||
<path
|
|
||||||
class="st1"
|
|
||||||
d="M4.8,7.2c-0.8,0-1.5,0.7-1.5,1.5c0,0,0,0,0,0l0,0c-0.1,0.8,0.6,1.6,1.4,1.6C5.5,10.4,6.2,9.8,6.3,9 c0-0.1,0-0.2,0-0.2c0-0.1,0-0.3-0.1-0.4C6,7.6,5.5,7.2,4.8,7.2z"
|
|
||||||
id="path10"
|
|
||||||
style="fill:#ff6600" />
|
|
||||||
<path
|
|
||||||
class="st1"
|
|
||||||
d="M7.6,0.3c-4,0-7.3,3.3-7.3,7.3c0,0,0,0,0,0c0,0-0.4,6,7.3,11.9c0,0,7.5-4.8,7.3-11.9C14.9,3.5,11.6,0.3,7.6,0.3 z M10.6,10.9c-1.2,0.1-2.4-0.8-2.5-2c0,0,0,0,0,0l0,0V8.7c0-0.2,0-0.3,0-0.5c0-0.1,0-0.2,0.1-0.3C8.2,7.8,8,7.7,7.9,7.6 c-0.4-0.2-0.8,0-1,0.3C6.9,8,7,8.1,7,8.2c0,0.2,0,0.3,0,0.5c0,0.1,0,0.1,0,0.2C7,9.3,6.9,9.6,6.7,10c-0.7,1-2.1,1.3-3.2,0.6 S2.2,8.4,2.9,7.4l0.8-1.5c0.2-0.3,0.4-0.5,0.7-0.6c0.1-0.4,0.4-0.7,0.8-0.8c0.7-0.3,1.6,0,1.9,0.8c0,0,0,0,0,0l0,0 c0.3-0.1,0.6-0.1,0.9,0c0.1-0.4,0.4-0.6,0.8-0.8c0.7-0.3,1.6,0,1.9,0.8c0,0,0,0,0,0l0,0c0.3,0.1,0.6,0.4,0.8,0.7l1,1.9l0,0 c0.1,0.2,0.1,0.4,0.1,0.6C12.9,9.7,11.9,10.8,10.6,10.9L10.6,10.9z"
|
|
||||||
id="path12"
|
|
||||||
style="fill:#ff6600" />
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 3.0 KiB |
@ -22,15 +22,15 @@ export const AppConfig = {
|
|||||||
fr: "assets/cgu.pdf",
|
fr: "assets/cgu.pdf",
|
||||||
en: "assets/termsOfUse.pdf"
|
en: "assets/termsOfUse.pdf"
|
||||||
},
|
},
|
||||||
signup: "optional", // never|optional|always
|
signup:true,
|
||||||
email_contact:false,
|
email_contact:false,
|
||||||
platform_intro: {
|
platform_intro: {
|
||||||
fr: "Atlas du maillage écologique",
|
fr: "La biodiversité<br /> à Wasseiges",
|
||||||
en: "Atlas of the ecological network"
|
en: "Biodiversity<br /> in Wasseiges"
|
||||||
},
|
},
|
||||||
platform_teaser: {
|
platform_teaser: {
|
||||||
fr: "Contribuez à mieux connaitre arbres, arbustes, haies, alignements d’arbres, bosquets,… de votre commune en partageant ici vos observations. Débutant ou expérimenté, tout le monde peut participer !",
|
fr: "Aidez-nous à mieux connaitre la biodiversité de la commune en partageant ici vos observations. Débutant ou expérimenté, tout le monde peut participer !",
|
||||||
en: "Contribute to the knowledge of trees, shrubs, hedges, tree lines, copses,... of your municipality by sharing your observations here. Beginner or experienced, everyone can participate!"
|
en: "Hae duae provinciae bello quondam piratico catervis mixtae praedonum a Servilio pro consule missae sub iugum factae sunt vectigales. et hae quidem regiones velut in prominenti terrarum lingua positae ob orbe eoo monte Amano disparantur."
|
||||||
},
|
},
|
||||||
platform_participate: {
|
platform_participate: {
|
||||||
fr: "PARTICIPER AU PROGRAMME",
|
fr: "PARTICIPER AU PROGRAMME",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
export const AppConfig = {
|
export const AppConfig = {
|
||||||
appName: "BiomMap – la biodiversité à Wasseiges",
|
appName: "BiomMap – la biodiversité à Wasseiges",
|
||||||
API_ENDPOINT:"https://biomap.champs-libres.be/api",
|
API_ENDPOINT:"http://liveche.champs-libres.be:8080/api",
|
||||||
API_TAXHUB:"https://biomap.champs-libres.be/taxhub/api/",
|
API_TAXHUB:"http://liveche.champs-libres.be:8080/taxhub/api/",
|
||||||
FRONTEND:{
|
FRONTEND:{
|
||||||
PROD_MOD:true,
|
PROD_MOD:true,
|
||||||
MULTILINGUAL:false,
|
MULTILINGUAL:false,
|
||||||
@ -16,21 +16,21 @@ export const AppConfig = {
|
|||||||
keywords: 'biodiversite enquetes participatif observations',
|
keywords: 'biodiversite enquetes participatif observations',
|
||||||
},
|
},
|
||||||
about: true,
|
about: true,
|
||||||
URL_APPLICATION:"http://localhost:8080/",
|
URL_APPLICATION:"http://liveche.champs-libres.be:8080/",
|
||||||
REWARDS: true,
|
REWARDS: true,
|
||||||
termsOfUse: {
|
termsOfUse: {
|
||||||
fr: "assets/cgu.pdf",
|
fr: "assets/cgu.pdf",
|
||||||
en: "assets/termsOfUse.pdf"
|
en: "assets/termsOfUse.pdf"
|
||||||
},
|
},
|
||||||
signup: "optional", // never|optional|always
|
signup:true,
|
||||||
email_contact:false,
|
email_contact:false,
|
||||||
platform_intro: {
|
platform_intro: {
|
||||||
fr: "Atlas du maillage écologique",
|
fr: "La biodiversité<br /> à Wasseiges",
|
||||||
en: "Atlas of the ecological network"
|
en: "Biodiversity<br /> in Wasseiges"
|
||||||
},
|
},
|
||||||
platform_teaser: {
|
platform_teaser: {
|
||||||
fr: "Contribuez à mieux connaitre arbres, arbustes, haies, alignement d’arbres, bosquets,… de votre commune en partageant ici vos observations. Débutant ou expérimenté, tout le monde peut participer !",
|
fr: "Aidez-nous à mieux connaitre la biodiversité de la commune en partageant ici vos observations. Débutant ou expérimenté, tout le monde peut participer !",
|
||||||
en: "Contribute to the knowledge of trees, shrubs, hedges, tree lines, copses,... of your municipality by sharing your observations here. Beginner or experienced, everyone can participate!"
|
en: "Hae duae provinciae bello quondam piratico catervis mixtae praedonum a Servilio pro consule missae sub iugum factae sunt vectigales. et hae quidem regiones velut in prominenti terrarum lingua positae ob orbe eoo monte Amano disparantur."
|
||||||
},
|
},
|
||||||
platform_participate: {
|
platform_participate: {
|
||||||
fr: "PARTICIPER AU PROGRAMME",
|
fr: "PARTICIPER AU PROGRAMME",
|
||||||
|
@ -1,91 +0,0 @@
|
|||||||
export const dashboardData = {
|
|
||||||
base: {
|
|
||||||
name: 'Wasseiges',
|
|
||||||
area: 24.48,
|
|
||||||
population: 2996,
|
|
||||||
lat: 50.6173,
|
|
||||||
lon: 5.0206,
|
|
||||||
},
|
|
||||||
landuse: [
|
|
||||||
{
|
|
||||||
name: 'Terres arables',
|
|
||||||
area: 1694,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Prairies',
|
|
||||||
area: 376,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Bois',
|
|
||||||
area: 25,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Surfaces bâties',
|
|
||||||
area: 167
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Autres',
|
|
||||||
area: 186
|
|
||||||
}
|
|
||||||
],
|
|
||||||
production: [
|
|
||||||
{
|
|
||||||
name: 'Froment',
|
|
||||||
area: 768.94,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Orge',
|
|
||||||
area: 61.78,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Betteraves',
|
|
||||||
area: 313.28,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Pommes de terre',
|
|
||||||
area: 274.12,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Cultures fourragères (maïs, prairies temporaires, ...)',
|
|
||||||
area: 108.70,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Vergers',
|
|
||||||
area: 33.06,
|
|
||||||
}
|
|
||||||
],
|
|
||||||
biomasse : {
|
|
||||||
agri_area: 2070,
|
|
||||||
forest_area: 25
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
interface landuse {
|
|
||||||
name: string,
|
|
||||||
area: number,
|
|
||||||
}
|
|
||||||
|
|
||||||
interface production {
|
|
||||||
name: string,
|
|
||||||
area: number
|
|
||||||
}
|
|
||||||
|
|
||||||
interface biomasse {
|
|
||||||
agri_area: number,
|
|
||||||
forest_area: number
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export type dashboardDataType = {
|
|
||||||
base: {
|
|
||||||
name: string,
|
|
||||||
area: number,
|
|
||||||
population: number,
|
|
||||||
lat: number,
|
|
||||||
lon: number,
|
|
||||||
},
|
|
||||||
landuse: landuse[],
|
|
||||||
production: production[],
|
|
||||||
biomasse: biomasse
|
|
||||||
// landuse: Record<string, landuse>
|
|
||||||
}
|
|
@ -1,109 +0,0 @@
|
|||||||
import { AppConfig } from './app.config';
|
|
||||||
import { MAP_CONFIG as MapConfig } from './map.config';
|
|
||||||
|
|
||||||
export const DefaulConfig = {
|
|
||||||
// Default MainConfig
|
|
||||||
appName: 'GeoNature-citizen',
|
|
||||||
API_ENDPOINT: 'http://localhost:5002/api',
|
|
||||||
API_TAXHUB: 'http://localhost:5000/api',
|
|
||||||
API_CITY: 'https://nominatim.openstreetmap.org/reverse',
|
|
||||||
HCAPTCHA_SITE_KEY: null,
|
|
||||||
FRONTEND: {
|
|
||||||
PROD_MOD: true,
|
|
||||||
MULTILINGUAL: false,
|
|
||||||
DISPLAY_FOOTER: true,
|
|
||||||
DISPLAY_TOPBAR: true,
|
|
||||||
DISPLAY_SIDEBAR: true,
|
|
||||||
DISPLAY_STATS: true,
|
|
||||||
DISPLAY_BADGES: true,
|
|
||||||
NEW_OBS_FORM_MODAL_VERSION: true,
|
|
||||||
},
|
|
||||||
META: {
|
|
||||||
keywords: 'biodiversite enquetes participatif observations',
|
|
||||||
},
|
|
||||||
about: true,
|
|
||||||
URL_APPLICATION: 'http://127.0.0.1:4200',
|
|
||||||
REWARDS: true,
|
|
||||||
termsOfUse: {
|
|
||||||
fr: 'assets/cgu.pdf',
|
|
||||||
en: 'assets/termsOfUse.pdf',
|
|
||||||
},
|
|
||||||
signup: 'optional', // never|optional|always
|
|
||||||
email_contact: false,
|
|
||||||
platform_intro: {
|
|
||||||
fr: 'Bienvenue<br /> sur GeoNature Citizen',
|
|
||||||
en: 'Welcome<br /> on GeoNature Citizen',
|
|
||||||
},
|
|
||||||
platform_teaser: {
|
|
||||||
fr: 'Hae duae provinciae bello quondam piratico catervis mixtae praedonum a Servilio pro consule missae sub iugum factae sunt vectigales. et hae quidem regiones velut in prominenti terrarum lingua positae ob orbe eoo monte Amano disparantur.',
|
|
||||||
en: 'Hae duae provinciae bello quondam piratico catervis mixtae praedonum a Servilio pro consule missae sub iugum factae sunt vectigales. et hae quidem regiones velut in prominenti terrarum lingua positae ob orbe eoo monte Amano disparantur.',
|
|
||||||
},
|
|
||||||
platform_participate: {
|
|
||||||
fr: 'PARTICIPER AU PROGRAMME',
|
|
||||||
en: 'PARTICIPATE',
|
|
||||||
},
|
|
||||||
programs_label: {
|
|
||||||
fr: 'Programmes',
|
|
||||||
en: 'Surveys',
|
|
||||||
},
|
|
||||||
program_label: {
|
|
||||||
fr: 'Le programme',
|
|
||||||
en: 'Survey',
|
|
||||||
},
|
|
||||||
program_share_an_observation: {
|
|
||||||
fr: 'PARTAGER UNE OBSERVATION',
|
|
||||||
en: 'SHARE AN OBSERVATION',
|
|
||||||
},
|
|
||||||
program_add_an_observation: {
|
|
||||||
fr: 'AJOUTER UNE OBSERVATION',
|
|
||||||
en: 'CONTRIBUTE AN OBSERVATION',
|
|
||||||
},
|
|
||||||
program_allow_email_contact: {
|
|
||||||
fr: "J'accepte que mon adresse e-mail puisse être utilisée pour recontacter à propos de mon observation",
|
|
||||||
en: 'I agree that my e-mail address can be used to recontact about my observation',
|
|
||||||
},
|
|
||||||
taxonDisplayImageWhenUnique: true,
|
|
||||||
taxonSelectInputThreshold: 7,
|
|
||||||
taxonAutocompleteInputThreshold: 12,
|
|
||||||
taxonAutocompleteFields: [
|
|
||||||
'nom_complet',
|
|
||||||
'nom_vern',
|
|
||||||
'nom_vern_eng',
|
|
||||||
'cd_nom',
|
|
||||||
],
|
|
||||||
taxonDisplaySciName: true,
|
|
||||||
program_list_observers_names: true,
|
|
||||||
program_list_sort: '-timestamp_create',
|
|
||||||
details_espece_url: '<url_inpn_or_atlas>/cd_nom/', // !! gardez bien le cd_nom/ dans l'url
|
|
||||||
registration_message: 'Vous inscrire vous permet de gérer vos observations',
|
|
||||||
imageUpload: {
|
|
||||||
maxHeight: 1440,
|
|
||||||
maxWidth: 1440,
|
|
||||||
quality: 0.9,
|
|
||||||
},
|
|
||||||
// Default MapConfig
|
|
||||||
DEFAULT_PROVIDER: 'OpenStreetMapOrg',
|
|
||||||
BASEMAPS: [
|
|
||||||
{
|
|
||||||
name: 'OpenStreetMapOrg',
|
|
||||||
maxZoom: 19,
|
|
||||||
layer: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
||||||
subdomains: 'abc',
|
|
||||||
attribution:
|
|
||||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
CENTER: [46.52863469527167, 2.43896484375],
|
|
||||||
ZOOM_LEVEL: 6,
|
|
||||||
ZOOM_LEVEL_RELEVE: 15,
|
|
||||||
NEW_OBS_POINTER: 'assets/pointer-blue2.png',
|
|
||||||
OBS_POINTER: 'assets/pointer-green.png',
|
|
||||||
LOCATE_CONTROL_TITLE: {
|
|
||||||
fr: 'Me localiser',
|
|
||||||
en: 'Show me where i am',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export const MainConfig = { ...DefaulConfig, ...AppConfig, ...MapConfig };
|
|
||||||
|
|
||||||
export default MainConfig;
|
|
@ -20,7 +20,7 @@ export const MAP_CONFIG = {
|
|||||||
{
|
{
|
||||||
name: "Hydrographie",
|
name: "Hydrographie",
|
||||||
maxZoom: 20,
|
maxZoom: 20,
|
||||||
layer: "//geoservices.wallonie.be/arcgis/services/EAU/RHW_SIMPLE/MapServer/WMSServer?",
|
layer: "//geoservices.wallonie.be/arcgis/services/EAU/RHW/MapServer/WMSServer?",
|
||||||
layers: ['1', '2', '3', '4', '5','6'],
|
layers: ['1', '2', '3', '4', '5','6'],
|
||||||
wms: true,
|
wms: true,
|
||||||
attribution: '© SPW'
|
attribution: '© SPW'
|
||||||
@ -44,7 +44,7 @@ export const MAP_CONFIG = {
|
|||||||
{
|
{
|
||||||
name: "Pentes (relief)",
|
name: "Pentes (relief)",
|
||||||
maxZoom: 20,
|
maxZoom: 20,
|
||||||
layer: "//geoservices.wallonie.be/arcgis/services/RELIEF/WALLONIE_MNP_2013_2014__CLASSES/MapServer/WMSServer?",
|
layer: "//geoservices.wallonie.be/arcgis/services/RELIEF/WALLONIE_MNP_CLASSE_2013_2014/MapServer/WMSServer?",
|
||||||
layers: '0',
|
layers: '0',
|
||||||
wms: true,
|
wms: true,
|
||||||
attribution: '© SPW'
|
attribution: '© SPW'
|
||||||
@ -83,9 +83,9 @@ export const MAP_CONFIG = {
|
|||||||
attribution: '© SPW'
|
attribution: '© SPW'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Parcellaire agricole anonyme 2020",
|
name: "Parcellaire agricole anonyme 2019",
|
||||||
maxZoom: 20,
|
maxZoom: 20,
|
||||||
layer: "//geoservices.wallonie.be/arcgis/services/AGRICULTURE/SIGEC_PARC_AGRI_ANON__2020/MapServer/WMSServer?",
|
layer: "//geoservices.wallonie.be/arcgis/services/AGRICULTURE/SIGEC_PARC_AGRI_ANON__2019/MapServer/WMSServer?",
|
||||||
layers: '0',
|
layers: '0',
|
||||||
wms: true,
|
wms: true,
|
||||||
attribution: '© SPW'
|
attribution: '© SPW'
|
||||||
@ -165,20 +165,11 @@ export const MAP_CONFIG = {
|
|||||||
wms: true,
|
wms: true,
|
||||||
attribution: '© SPW'
|
attribution: '© SPW'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "Parcellaire cadastral",
|
|
||||||
minZoom: 12,
|
|
||||||
maxZoom: 20,
|
|
||||||
layer: "//geoservices.wallonie.be/arcgis/services/PLAN_REGLEMENT/CADMAP_2021_PARCELLES/MapServer/WMSServer?",
|
|
||||||
layers: ['0', '1'],
|
|
||||||
wms: true,
|
|
||||||
attribution: '© SPW'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "Limites administratives",
|
name: "Limites administratives",
|
||||||
maxZoom: 20,
|
maxZoom: 20,
|
||||||
layer: "//ccff02.minfin.fgov.be/geoservices/arcgis/services/WMS/Cadastral_Layers/MapServer/WMSServer?",
|
layer: "//ccff02.minfin.fgov.be/geoservices/arcgis/services/INSPIRE/AU_wms/MapServer/WMSServer?",
|
||||||
layers: ['Region', 'Province', 'Municipality'],
|
layers: ['1', '2', '3', '4'],
|
||||||
wms: true,
|
wms: true,
|
||||||
attribution: '© CadGIS'
|
attribution: '© CadGIS'
|
||||||
},
|
},
|
||||||
@ -188,8 +179,6 @@ export const MAP_CONFIG = {
|
|||||||
ZOOM_LEVEL_RELEVE: 15,
|
ZOOM_LEVEL_RELEVE: 15,
|
||||||
NEW_OBS_POINTER: "assets/pointer-blue2.png",
|
NEW_OBS_POINTER: "assets/pointer-blue2.png",
|
||||||
OBS_POINTER: "assets/pointer-green.png",
|
OBS_POINTER: "assets/pointer-green.png",
|
||||||
WHITE_POINTER: "assets/pointer-white.png",
|
|
||||||
ORANGE_POINTER: "assets/pointer-orange.png",
|
|
||||||
LOCATE_CONTROL_TITLE: {
|
LOCATE_CONTROL_TITLE: {
|
||||||
'fr':'Me localiser',
|
'fr':'Me localiser',
|
||||||
'en':'Show me where i am'
|
'en':'Show me where i am'
|
||||||
|
@ -20,10 +20,3 @@
|
|||||||
--modal-header-bg-webkit: moz-linear-gradient(top, var(--secondary) 0%, var(--secondary) 50%, var(--secondary-gradient) 51%, var(--secondary-gradient) 100%);
|
--modal-header-bg-webkit: moz-linear-gradient(top, var(--secondary) 0%, var(--secondary) 50%, var(--secondary-gradient) 51%, var(--secondary-gradient) 100%);
|
||||||
--modal-header-bg-linear: linear-gradient(to bottom, var(--secondary) 0%, var(--secondary) 50%, var(--secondary-gradient) 51%, var(--secondary-gradient) 100%);
|
--modal-header-bg-linear: linear-gradient(to bottom, var(--secondary) 0%, var(--secondary) 50%, var(--secondary-gradient) 51%, var(--secondary-gradient) 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for printing the dashboard */
|
|
||||||
@media print {
|
|
||||||
div.leaflet-control-container {
|
|
||||||
display: none!important;
|
|
||||||
}
|
|
||||||
}
|
|
@ -26,23 +26,16 @@ footer div a:hover {
|
|||||||
footer div.logo {
|
footer div.logo {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
|
@media screen and (max-width: 900px) {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer div.logo img {
|
footer div.logo img {
|
||||||
height: 90px;
|
height: 90px;
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
}
|
@media screen and (max-width: 900px) {
|
||||||
|
|
||||||
@media screen and (max-width: 900px) {
|
|
||||||
footer div.logo {
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
footer div.logo img {
|
|
||||||
height: 60px;
|
height: 60px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media print {
|
|
||||||
footer > div:first-child {
|
|
||||||
display: none!important;
|
|
||||||
}
|
|
||||||
}
|
|
@ -43,6 +43,6 @@ user_pg_pass=postgres
|
|||||||
|
|
||||||
app_name=gncitizen
|
app_name=gncitizen
|
||||||
gun_num_workers=2
|
gun_num_workers=2
|
||||||
gun_host=0.0.0.0
|
gun_host=localhost
|
||||||
gun_port=5002
|
gun_port=5002
|
||||||
gun_timeout=30
|
gun_timeout=30
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
FLASKDIR=$(readlink -e "${0%/*}")
|
|
||||||
APP_DIR="$(dirname "$FLASKDIR")"
|
|
||||||
|
|
||||||
echo "Starting $app_name"
|
|
||||||
echo "$FLASKDIR"
|
|
||||||
echo "$APP_DIR"
|
|
||||||
|
|
||||||
. "$APP_DIR"/settings.ini
|
|
||||||
|
|
||||||
# # activate the virtualenv
|
|
||||||
# cd $FLASKDIR/$venv_dir
|
|
||||||
# source bin/activate
|
|
||||||
|
|
||||||
# export PYTHONPATH=$FLASKDIR:$PYTHONPATH
|
|
||||||
|
|
||||||
|
|
||||||
# Start your unicorn
|
|
||||||
exec gunicorn server:app --access-logfile $APP_DIR/var/log/taxhub-access.log --pid="${app_name}.pid" --error-log $APP_DIR/var/log/taxhub-errors.log -w "${gun_num_workers}" -b "${gun_host}:${gun_port}" -n "${app_name}"
|
|
2215
qgis/access-api.qgs~
@ -1,590 +0,0 @@
|
|||||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
|
||||||
<qgis projectname="" saveUser="julien" saveDateTime="2021-10-21T09:10:22" version="3.16.4-Hannover" saveUserFull="julien">
|
|
||||||
<homePath path=""/>
|
|
||||||
<title></title>
|
|
||||||
<autotransaction active="0"/>
|
|
||||||
<evaluateDefaultValues active="0"/>
|
|
||||||
<trust active="0"/>
|
|
||||||
<projectCrs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
|
|
||||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
|
||||||
<srsid>3857</srsid>
|
|
||||||
<srid>3857</srid>
|
|
||||||
<authid>EPSG:3857</authid>
|
|
||||||
<description>WGS 84 / Pseudo-Mercator</description>
|
|
||||||
<projectionacronym>merc</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</projectCrs>
|
|
||||||
<layer-tree-group>
|
|
||||||
<customproperties/>
|
|
||||||
<layer-tree-layer providerKey="wms" legend_exp="" patch_size="-1,-1" expanded="1" id="ORTHO_2021_ae5204e1_745a_4a09_93a2_e7291d28b03d" legend_split_behavior="0" name="ORTHO_2021" source="contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=0&styles&url=https://geoservices.wallonie.be/arcgis/services/IMAGERIE/ORTHO_2021/MapServer/WMSServer" checked="Qt::Checked">
|
|
||||||
<customproperties/>
|
|
||||||
</layer-tree-layer>
|
|
||||||
<layer-tree-layer providerKey="wms" legend_exp="" patch_size="-1,-1" expanded="1" id="OpenStreetMap_ec6e4612_9dbd_4642_a5e1_846bc5e3d315" legend_split_behavior="0" name="OpenStreetMap" source="type=xyz&url=https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0" checked="Qt::Checked">
|
|
||||||
<customproperties/>
|
|
||||||
</layer-tree-layer>
|
|
||||||
<custom-order enabled="0">
|
|
||||||
<item>OpenStreetMap_ec6e4612_9dbd_4642_a5e1_846bc5e3d315</item>
|
|
||||||
<item>ORTHO_2021_ae5204e1_745a_4a09_93a2_e7291d28b03d</item>
|
|
||||||
</custom-order>
|
|
||||||
</layer-tree-group>
|
|
||||||
<snapping-settings self-snapping="0" enabled="0" mode="2" intersection-snapping="0" tolerance="12" scaleDependencyMode="0" minScale="0" unit="1" maxScale="0" type="1">
|
|
||||||
<individual-layer-settings/>
|
|
||||||
</snapping-settings>
|
|
||||||
<relations/>
|
|
||||||
<mapcanvas annotationsVisible="1" name="theMapCanvas">
|
|
||||||
<units>meters</units>
|
|
||||||
<extent>
|
|
||||||
<xmin>-19960441.00300928577780724</xmin>
|
|
||||||
<ymin>-43668959.47562752664089203</ymin>
|
|
||||||
<xmax>19960441.00300927087664604</xmax>
|
|
||||||
<ymax>43668959.47563116252422333</ymax>
|
|
||||||
</extent>
|
|
||||||
<rotation>0</rotation>
|
|
||||||
<destinationsrs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
|
|
||||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
|
||||||
<srsid>3857</srsid>
|
|
||||||
<srid>3857</srid>
|
|
||||||
<authid>EPSG:3857</authid>
|
|
||||||
<description>WGS 84 / Pseudo-Mercator</description>
|
|
||||||
<projectionacronym>merc</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</destinationsrs>
|
|
||||||
<rendermaptile>0</rendermaptile>
|
|
||||||
<expressionContextScope/>
|
|
||||||
</mapcanvas>
|
|
||||||
<DataPlotly>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option name="dynamic_properties" type="Map">
|
|
||||||
<Option value="" name="name" type="QString"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" name="type" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
<Option name="plot_layout" type="Map">
|
|
||||||
<Option value="" name="additional_info_expression" type="QString"/>
|
|
||||||
<Option value="group" name="bar_mode" type="QString"/>
|
|
||||||
<Option value="0" name="bargaps" type="double"/>
|
|
||||||
<Option value="false" name="bins_check" type="bool"/>
|
|
||||||
<Option value="true" name="legend" type="bool"/>
|
|
||||||
<Option value="v" name="legend_orientation" type="QString"/>
|
|
||||||
<Option name="legend_title" type="invalid"/>
|
|
||||||
<Option name="polar" type="Map">
|
|
||||||
<Option name="angularaxis" type="Map">
|
|
||||||
<Option value="clockwise" name="direction" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
</Option>
|
|
||||||
<Option name="range_slider" type="Map">
|
|
||||||
<Option value="1" name="borderwidth" type="int"/>
|
|
||||||
<Option value="false" name="visible" type="bool"/>
|
|
||||||
</Option>
|
|
||||||
<Option value="" name="title" type="QString"/>
|
|
||||||
<Option name="x_inv" type="invalid"/>
|
|
||||||
<Option name="x_max" type="invalid"/>
|
|
||||||
<Option name="x_min" type="invalid"/>
|
|
||||||
<Option value="" name="x_title" type="QString"/>
|
|
||||||
<Option value="linear" name="x_type" type="QString"/>
|
|
||||||
<Option name="xaxis" type="invalid"/>
|
|
||||||
<Option name="y_inv" type="invalid"/>
|
|
||||||
<Option name="y_max" type="invalid"/>
|
|
||||||
<Option name="y_min" type="invalid"/>
|
|
||||||
<Option value="" name="y_title" type="QString"/>
|
|
||||||
<Option value="linear" name="y_type" type="QString"/>
|
|
||||||
<Option value="" name="z_title" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
<Option name="plot_properties" type="Map">
|
|
||||||
<Option name="additional_hover_text" type="invalid"/>
|
|
||||||
<Option value="10" name="bins" type="int"/>
|
|
||||||
<Option value="v" name="box_orientation" type="QString"/>
|
|
||||||
<Option value="false" name="box_outliers" type="bool"/>
|
|
||||||
<Option value="false" name="box_stat" type="bool"/>
|
|
||||||
<Option value="Greys" name="color_scale" type="QString"/>
|
|
||||||
<Option value="false" name="color_scale_data_defined_in_check" type="bool"/>
|
|
||||||
<Option value="false" name="color_scale_data_defined_in_invert_check" type="bool"/>
|
|
||||||
<Option value="fill" name="cont_type" type="QString"/>
|
|
||||||
<Option value="Fill" name="contour_type_combo" type="QString"/>
|
|
||||||
<Option value="false" name="cumulative" type="bool"/>
|
|
||||||
<Option name="custom" type="List">
|
|
||||||
<Option value="" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
<Option value="auto" name="hover_label_position" type="QString"/>
|
|
||||||
<Option name="hover_label_text" type="invalid"/>
|
|
||||||
<Option value="all" name="hover_text" type="QString"/>
|
|
||||||
<Option value="#8ebad9" name="in_color" type="QString"/>
|
|
||||||
<Option value="false" name="invert_color_scale" type="bool"/>
|
|
||||||
<Option value="increasing" name="invert_hist" type="QString"/>
|
|
||||||
<Option value="Solid Line" name="line_combo" type="QString"/>
|
|
||||||
<Option value="solid" name="line_dash" type="QString"/>
|
|
||||||
<Option value="markers" name="marker" type="QString"/>
|
|
||||||
<Option value="10" name="marker_size" type="double"/>
|
|
||||||
<Option value="0" name="marker_symbol" type="int"/>
|
|
||||||
<Option value="Points" name="marker_type_combo" type="QString"/>
|
|
||||||
<Option value="1" name="marker_width" type="double"/>
|
|
||||||
<Option value="" name="name" type="QString"/>
|
|
||||||
<Option value="" name="normalization" type="QString"/>
|
|
||||||
<Option value="1" name="opacity" type="double"/>
|
|
||||||
<Option value="#1f77b4" name="out_color" type="QString"/>
|
|
||||||
<Option value="" name="point_combo" type="QString"/>
|
|
||||||
<Option value="false" name="selected_features_only" type="bool"/>
|
|
||||||
<Option value="false" name="show_colorscale_legend" type="bool"/>
|
|
||||||
<Option value="true" name="show_lines" type="bool"/>
|
|
||||||
<Option value="true" name="show_lines_check" type="bool"/>
|
|
||||||
<Option value="true" name="show_mean_line" type="bool"/>
|
|
||||||
<Option value="true" name="violin_box" type="bool"/>
|
|
||||||
<Option value="both" name="violin_side" type="QString"/>
|
|
||||||
<Option value="false" name="visible_features_only" type="bool"/>
|
|
||||||
<Option value="" name="x_name" type="QString"/>
|
|
||||||
<Option value="" name="y_name" type="QString"/>
|
|
||||||
<Option value="" name="z_name" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
<Option value="scatter" name="plot_type" type="QString"/>
|
|
||||||
<Option name="source_layer_id" type="invalid"/>
|
|
||||||
</Option>
|
|
||||||
</DataPlotly>
|
|
||||||
<projectModels/>
|
|
||||||
<legend updateDrawingOrder="true">
|
|
||||||
<legendlayer showFeatureCount="0" open="true" drawingOrder="-1" name="ORTHO_2021" checked="Qt::Checked">
|
|
||||||
<filegroup open="true" hidden="false">
|
|
||||||
<legendlayerfile visible="1" layerid="ORTHO_2021_ae5204e1_745a_4a09_93a2_e7291d28b03d" isInOverview="0"/>
|
|
||||||
</filegroup>
|
|
||||||
</legendlayer>
|
|
||||||
<legendlayer showFeatureCount="0" open="true" drawingOrder="-1" name="OpenStreetMap" checked="Qt::Checked">
|
|
||||||
<filegroup open="true" hidden="false">
|
|
||||||
<legendlayerfile visible="1" layerid="OpenStreetMap_ec6e4612_9dbd_4642_a5e1_846bc5e3d315" isInOverview="0"/>
|
|
||||||
</filegroup>
|
|
||||||
</legendlayer>
|
|
||||||
</legend>
|
|
||||||
<mapViewDocks/>
|
|
||||||
<mapViewDocks3D/>
|
|
||||||
<mapcanvas annotationsVisible="1" name="mAreaCanvas">
|
|
||||||
<units>degrees</units>
|
|
||||||
<extent>
|
|
||||||
<xmin>0</xmin>
|
|
||||||
<ymin>0</ymin>
|
|
||||||
<xmax>0</xmax>
|
|
||||||
<ymax>0</ymax>
|
|
||||||
</extent>
|
|
||||||
<rotation>0</rotation>
|
|
||||||
<destinationsrs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
|
|
||||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
|
||||||
<srsid>3452</srsid>
|
|
||||||
<srid>4326</srid>
|
|
||||||
<authid>EPSG:4326</authid>
|
|
||||||
<description>WGS 84</description>
|
|
||||||
<projectionacronym>longlat</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>true</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</destinationsrs>
|
|
||||||
<rendermaptile>0</rendermaptile>
|
|
||||||
<expressionContextScope/>
|
|
||||||
</mapcanvas>
|
|
||||||
<mapcanvas annotationsVisible="1" name="mAreaCanvas">
|
|
||||||
<units>degrees</units>
|
|
||||||
<extent>
|
|
||||||
<xmin>0</xmin>
|
|
||||||
<ymin>0</ymin>
|
|
||||||
<xmax>0</xmax>
|
|
||||||
<ymax>0</ymax>
|
|
||||||
</extent>
|
|
||||||
<rotation>0</rotation>
|
|
||||||
<destinationsrs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
|
|
||||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
|
||||||
<srsid>3452</srsid>
|
|
||||||
<srid>4326</srid>
|
|
||||||
<authid>EPSG:4326</authid>
|
|
||||||
<description>WGS 84</description>
|
|
||||||
<projectionacronym>longlat</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>true</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</destinationsrs>
|
|
||||||
<rendermaptile>0</rendermaptile>
|
|
||||||
<expressionContextScope/>
|
|
||||||
</mapcanvas>
|
|
||||||
<mapcanvas annotationsVisible="1" name="mAreaCanvas">
|
|
||||||
<units>degrees</units>
|
|
||||||
<extent>
|
|
||||||
<xmin>0</xmin>
|
|
||||||
<ymin>0</ymin>
|
|
||||||
<xmax>0</xmax>
|
|
||||||
<ymax>0</ymax>
|
|
||||||
</extent>
|
|
||||||
<rotation>0</rotation>
|
|
||||||
<destinationsrs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
|
|
||||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
|
||||||
<srsid>3452</srsid>
|
|
||||||
<srid>4326</srid>
|
|
||||||
<authid>EPSG:4326</authid>
|
|
||||||
<description>WGS 84</description>
|
|
||||||
<projectionacronym>longlat</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>true</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</destinationsrs>
|
|
||||||
<rendermaptile>0</rendermaptile>
|
|
||||||
<expressionContextScope/>
|
|
||||||
</mapcanvas>
|
|
||||||
<main-annotation-layer autoRefreshEnabled="0" refreshOnNotifyMessage="" refreshOnNotifyEnabled="0" type="annotation" autoRefreshTime="0">
|
|
||||||
<id>Annotations_58249151_7565_4174_821b_dcfdd29aefda</id>
|
|
||||||
<datasource></datasource>
|
|
||||||
<keywordList>
|
|
||||||
<value></value>
|
|
||||||
</keywordList>
|
|
||||||
<layername>Annotations</layername>
|
|
||||||
<srs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt></wkt>
|
|
||||||
<proj4></proj4>
|
|
||||||
<srsid>0</srsid>
|
|
||||||
<srid>0</srid>
|
|
||||||
<authid></authid>
|
|
||||||
<description></description>
|
|
||||||
<projectionacronym></projectionacronym>
|
|
||||||
<ellipsoidacronym></ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</srs>
|
|
||||||
<resourceMetadata>
|
|
||||||
<identifier></identifier>
|
|
||||||
<parentidentifier></parentidentifier>
|
|
||||||
<language></language>
|
|
||||||
<type></type>
|
|
||||||
<title></title>
|
|
||||||
<abstract></abstract>
|
|
||||||
<links/>
|
|
||||||
<fees></fees>
|
|
||||||
<encoding></encoding>
|
|
||||||
<crs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt></wkt>
|
|
||||||
<proj4></proj4>
|
|
||||||
<srsid>0</srsid>
|
|
||||||
<srid>0</srid>
|
|
||||||
<authid></authid>
|
|
||||||
<description></description>
|
|
||||||
<projectionacronym></projectionacronym>
|
|
||||||
<ellipsoidacronym></ellipsoidacronym>
|
|
||||||
<geographicflag>true</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</crs>
|
|
||||||
<extent/>
|
|
||||||
</resourceMetadata>
|
|
||||||
<items/>
|
|
||||||
<layerOpacity>1</layerOpacity>
|
|
||||||
</main-annotation-layer>
|
|
||||||
<projectlayers>
|
|
||||||
<maplayer autoRefreshEnabled="0" refreshOnNotifyMessage="" styleCategories="AllStyleCategories" minScale="1e+08" hasScaleBasedVisibilityFlag="0" maxScale="0" refreshOnNotifyEnabled="0" type="raster" autoRefreshTime="0">
|
|
||||||
<extent>
|
|
||||||
<xmin>315726.9638730000006035</xmin>
|
|
||||||
<ymin>6355634.75045599974691868</ymin>
|
|
||||||
<xmax>716952.71791600005235523</xmax>
|
|
||||||
<ymax>6589971.62795300036668777</ymax>
|
|
||||||
</extent>
|
|
||||||
<id>ORTHO_2021_ae5204e1_745a_4a09_93a2_e7291d28b03d</id>
|
|
||||||
<datasource>contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=0&styles&url=https://geoservices.wallonie.be/arcgis/services/IMAGERIE/ORTHO_2021/MapServer/WMSServer</datasource>
|
|
||||||
<keywordList>
|
|
||||||
<value></value>
|
|
||||||
</keywordList>
|
|
||||||
<layername>ORTHO_2021</layername>
|
|
||||||
<srs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
|
|
||||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
|
||||||
<srsid>3857</srsid>
|
|
||||||
<srid>3857</srid>
|
|
||||||
<authid>EPSG:3857</authid>
|
|
||||||
<description>WGS 84 / Pseudo-Mercator</description>
|
|
||||||
<projectionacronym>merc</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</srs>
|
|
||||||
<resourceMetadata>
|
|
||||||
<identifier></identifier>
|
|
||||||
<parentidentifier></parentidentifier>
|
|
||||||
<language></language>
|
|
||||||
<type></type>
|
|
||||||
<title></title>
|
|
||||||
<abstract></abstract>
|
|
||||||
<links/>
|
|
||||||
<fees></fees>
|
|
||||||
<encoding></encoding>
|
|
||||||
<crs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt></wkt>
|
|
||||||
<proj4></proj4>
|
|
||||||
<srsid>0</srsid>
|
|
||||||
<srid>0</srid>
|
|
||||||
<authid></authid>
|
|
||||||
<description></description>
|
|
||||||
<projectionacronym></projectionacronym>
|
|
||||||
<ellipsoidacronym></ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</crs>
|
|
||||||
<extent/>
|
|
||||||
</resourceMetadata>
|
|
||||||
<provider>wms</provider>
|
|
||||||
<noData>
|
|
||||||
<noDataList useSrcNoData="0" bandNo="1"/>
|
|
||||||
</noData>
|
|
||||||
<map-layer-style-manager current="default">
|
|
||||||
<map-layer-style name="default"/>
|
|
||||||
</map-layer-style-manager>
|
|
||||||
<flags>
|
|
||||||
<Identifiable>1</Identifiable>
|
|
||||||
<Removable>1</Removable>
|
|
||||||
<Searchable>1</Searchable>
|
|
||||||
</flags>
|
|
||||||
<temporal enabled="0" mode="0" fetchMode="0">
|
|
||||||
<fixedRange>
|
|
||||||
<start></start>
|
|
||||||
<end></end>
|
|
||||||
</fixedRange>
|
|
||||||
</temporal>
|
|
||||||
<customproperties>
|
|
||||||
<property key="identify/format" value="Html"/>
|
|
||||||
</customproperties>
|
|
||||||
<pipe>
|
|
||||||
<provider>
|
|
||||||
<resampling enabled="false" zoomedInResamplingMethod="nearestNeighbour" zoomedOutResamplingMethod="nearestNeighbour" maxOversampling="2"/>
|
|
||||||
</provider>
|
|
||||||
<rasterrenderer opacity="1" nodataColor="" alphaBand="-1" band="1" type="singlebandcolordata">
|
|
||||||
<rasterTransparency/>
|
|
||||||
<minMaxOrigin>
|
|
||||||
<limits>None</limits>
|
|
||||||
<extent>WholeRaster</extent>
|
|
||||||
<statAccuracy>Estimated</statAccuracy>
|
|
||||||
<cumulativeCutLower>0.02</cumulativeCutLower>
|
|
||||||
<cumulativeCutUpper>0.98</cumulativeCutUpper>
|
|
||||||
<stdDevFactor>2</stdDevFactor>
|
|
||||||
</minMaxOrigin>
|
|
||||||
</rasterrenderer>
|
|
||||||
<brightnesscontrast brightness="0" contrast="0" gamma="1"/>
|
|
||||||
<huesaturation colorizeOn="0" colorizeGreen="128" saturation="0" colorizeRed="255" colorizeBlue="128" colorizeStrength="100" grayscaleMode="0"/>
|
|
||||||
<rasterresampler maxOversampling="2"/>
|
|
||||||
<resamplingStage>resamplingFilter</resamplingStage>
|
|
||||||
</pipe>
|
|
||||||
<blendMode>0</blendMode>
|
|
||||||
</maplayer>
|
|
||||||
<maplayer autoRefreshEnabled="0" refreshOnNotifyMessage="" styleCategories="AllStyleCategories" minScale="1e+08" hasScaleBasedVisibilityFlag="0" maxScale="0" refreshOnNotifyEnabled="0" type="raster" autoRefreshTime="0">
|
|
||||||
<extent>
|
|
||||||
<xmin>-20037508.34278924390673637</xmin>
|
|
||||||
<ymin>-20037508.34278925508260727</ymin>
|
|
||||||
<xmax>20037508.34278924390673637</xmax>
|
|
||||||
<ymax>20037508.34278924390673637</ymax>
|
|
||||||
</extent>
|
|
||||||
<id>OpenStreetMap_ec6e4612_9dbd_4642_a5e1_846bc5e3d315</id>
|
|
||||||
<datasource>type=xyz&url=https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0</datasource>
|
|
||||||
<keywordList>
|
|
||||||
<value></value>
|
|
||||||
</keywordList>
|
|
||||||
<layername>OpenStreetMap</layername>
|
|
||||||
<srs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
|
|
||||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
|
||||||
<srsid>3857</srsid>
|
|
||||||
<srid>3857</srid>
|
|
||||||
<authid>EPSG:3857</authid>
|
|
||||||
<description>WGS 84 / Pseudo-Mercator</description>
|
|
||||||
<projectionacronym>merc</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</srs>
|
|
||||||
<resourceMetadata>
|
|
||||||
<identifier>OpenStreetMap tiles</identifier>
|
|
||||||
<parentidentifier></parentidentifier>
|
|
||||||
<language></language>
|
|
||||||
<type>dataset</type>
|
|
||||||
<title>OpenStreetMap tiles</title>
|
|
||||||
<abstract>OpenStreetMap is built by a community of mappers that contribute and maintain data about roads, trails, cafés, railway stations, and much more, all over the world.</abstract>
|
|
||||||
<links>
|
|
||||||
<link url="https://www.openstreetmap.org/" format="" name="Source" type="WWW:LINK" mimeType="" description="" size=""/>
|
|
||||||
</links>
|
|
||||||
<fees></fees>
|
|
||||||
<rights>Base map and data from OpenStreetMap and OpenStreetMap Foundation (CC-BY-SA). © https://www.openstreetmap.org and contributors.</rights>
|
|
||||||
<license>Open Data Commons Open Database License (ODbL)</license>
|
|
||||||
<license>Creative Commons Attribution-ShareAlike (CC-BY-SA)</license>
|
|
||||||
<encoding></encoding>
|
|
||||||
<crs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
|
|
||||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
|
||||||
<srsid>3857</srsid>
|
|
||||||
<srid>3857</srid>
|
|
||||||
<authid>EPSG:3857</authid>
|
|
||||||
<description>WGS 84 / Pseudo-Mercator</description>
|
|
||||||
<projectionacronym>merc</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</crs>
|
|
||||||
<extent>
|
|
||||||
<spatial minz="0" miny="-85.05112877980660357" maxx="180" maxz="0" crs="EPSG:4326" minx="-180" maxy="85.05112877980660357" dimensions="2"/>
|
|
||||||
</extent>
|
|
||||||
</resourceMetadata>
|
|
||||||
<provider>wms</provider>
|
|
||||||
<noData>
|
|
||||||
<noDataList useSrcNoData="0" bandNo="1"/>
|
|
||||||
</noData>
|
|
||||||
<map-layer-style-manager current="default">
|
|
||||||
<map-layer-style name="default"/>
|
|
||||||
</map-layer-style-manager>
|
|
||||||
<flags>
|
|
||||||
<Identifiable>1</Identifiable>
|
|
||||||
<Removable>1</Removable>
|
|
||||||
<Searchable>1</Searchable>
|
|
||||||
</flags>
|
|
||||||
<temporal enabled="0" mode="0" fetchMode="0">
|
|
||||||
<fixedRange>
|
|
||||||
<start></start>
|
|
||||||
<end></end>
|
|
||||||
</fixedRange>
|
|
||||||
</temporal>
|
|
||||||
<customproperties>
|
|
||||||
<property key="identify/format" value="Undefined"/>
|
|
||||||
</customproperties>
|
|
||||||
<pipe>
|
|
||||||
<provider>
|
|
||||||
<resampling enabled="false" zoomedInResamplingMethod="nearestNeighbour" zoomedOutResamplingMethod="nearestNeighbour" maxOversampling="2"/>
|
|
||||||
</provider>
|
|
||||||
<rasterrenderer opacity="1" nodataColor="" alphaBand="-1" band="1" type="singlebandcolordata">
|
|
||||||
<rasterTransparency/>
|
|
||||||
<minMaxOrigin>
|
|
||||||
<limits>None</limits>
|
|
||||||
<extent>WholeRaster</extent>
|
|
||||||
<statAccuracy>Estimated</statAccuracy>
|
|
||||||
<cumulativeCutLower>0.02</cumulativeCutLower>
|
|
||||||
<cumulativeCutUpper>0.98</cumulativeCutUpper>
|
|
||||||
<stdDevFactor>2</stdDevFactor>
|
|
||||||
</minMaxOrigin>
|
|
||||||
</rasterrenderer>
|
|
||||||
<brightnesscontrast brightness="0" contrast="0" gamma="1"/>
|
|
||||||
<huesaturation colorizeOn="0" colorizeGreen="128" saturation="0" colorizeRed="255" colorizeBlue="128" colorizeStrength="100" grayscaleMode="0"/>
|
|
||||||
<rasterresampler maxOversampling="2"/>
|
|
||||||
<resamplingStage>resamplingFilter</resamplingStage>
|
|
||||||
</pipe>
|
|
||||||
<blendMode>0</blendMode>
|
|
||||||
</maplayer>
|
|
||||||
</projectlayers>
|
|
||||||
<layerorder>
|
|
||||||
<layer id="OpenStreetMap_ec6e4612_9dbd_4642_a5e1_846bc5e3d315"/>
|
|
||||||
<layer id="ORTHO_2021_ae5204e1_745a_4a09_93a2_e7291d28b03d"/>
|
|
||||||
</layerorder>
|
|
||||||
<properties>
|
|
||||||
<Digitizing>
|
|
||||||
<AvoidIntersectionsMode type="int">0</AvoidIntersectionsMode>
|
|
||||||
</Digitizing>
|
|
||||||
<Gui>
|
|
||||||
<CanvasColorBluePart type="int">255</CanvasColorBluePart>
|
|
||||||
<CanvasColorGreenPart type="int">255</CanvasColorGreenPart>
|
|
||||||
<CanvasColorRedPart type="int">255</CanvasColorRedPart>
|
|
||||||
<SelectionColorAlphaPart type="int">255</SelectionColorAlphaPart>
|
|
||||||
<SelectionColorBluePart type="int">0</SelectionColorBluePart>
|
|
||||||
<SelectionColorGreenPart type="int">255</SelectionColorGreenPart>
|
|
||||||
<SelectionColorRedPart type="int">255</SelectionColorRedPart>
|
|
||||||
</Gui>
|
|
||||||
<Legend>
|
|
||||||
<filterByMap type="bool">false</filterByMap>
|
|
||||||
</Legend>
|
|
||||||
<Measure>
|
|
||||||
<Ellipsoid type="QString">EPSG:7030</Ellipsoid>
|
|
||||||
</Measure>
|
|
||||||
<Measurement>
|
|
||||||
<AreaUnits type="QString">m2</AreaUnits>
|
|
||||||
<DistanceUnits type="QString">meters</DistanceUnits>
|
|
||||||
</Measurement>
|
|
||||||
<PAL>
|
|
||||||
<CandidatesLinePerCM type="double">5</CandidatesLinePerCM>
|
|
||||||
<CandidatesPolygonPerCM type="double">2.5</CandidatesPolygonPerCM>
|
|
||||||
<DrawRectOnly type="bool">false</DrawRectOnly>
|
|
||||||
<DrawUnplaced type="bool">false</DrawUnplaced>
|
|
||||||
<PlacementEngineVersion type="int">1</PlacementEngineVersion>
|
|
||||||
<SearchMethod type="int">0</SearchMethod>
|
|
||||||
<ShowingAllLabels type="bool">false</ShowingAllLabels>
|
|
||||||
<ShowingCandidates type="bool">false</ShowingCandidates>
|
|
||||||
<ShowingPartialsLabels type="bool">true</ShowingPartialsLabels>
|
|
||||||
<TextFormat type="int">0</TextFormat>
|
|
||||||
<UnplacedColor type="QString">255,0,0,255</UnplacedColor>
|
|
||||||
</PAL>
|
|
||||||
<Paths>
|
|
||||||
<Absolute type="bool">false</Absolute>
|
|
||||||
</Paths>
|
|
||||||
<PositionPrecision>
|
|
||||||
<Automatic type="bool">true</Automatic>
|
|
||||||
<DecimalPlaces type="int">2</DecimalPlaces>
|
|
||||||
</PositionPrecision>
|
|
||||||
<SpatialRefSys>
|
|
||||||
<ProjectionsEnabled type="int">1</ProjectionsEnabled>
|
|
||||||
</SpatialRefSys>
|
|
||||||
</properties>
|
|
||||||
<dataDefinedServerProperties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" name="name" type="QString"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" name="type" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
</dataDefinedServerProperties>
|
|
||||||
<visibility-presets/>
|
|
||||||
<transformContext/>
|
|
||||||
<projectMetadata>
|
|
||||||
<identifier></identifier>
|
|
||||||
<parentidentifier></parentidentifier>
|
|
||||||
<language></language>
|
|
||||||
<type></type>
|
|
||||||
<title></title>
|
|
||||||
<abstract></abstract>
|
|
||||||
<links/>
|
|
||||||
<author>julien</author>
|
|
||||||
<creation>2021-10-21T09:09:36</creation>
|
|
||||||
</projectMetadata>
|
|
||||||
<Annotations/>
|
|
||||||
<Layouts/>
|
|
||||||
<Bookmarks/>
|
|
||||||
<ProjectViewSettings UseProjectScales="0">
|
|
||||||
<Scales/>
|
|
||||||
<DefaultViewExtent ymin="-43668959.47562752664089203" xmin="-69790116.63613784313201904" xmax="69790116.63613782823085785" ymax="43668959.47563116252422333">
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
|
|
||||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
|
||||||
<srsid>3857</srsid>
|
|
||||||
<srid>3857</srid>
|
|
||||||
<authid>EPSG:3857</authid>
|
|
||||||
<description>WGS 84 / Pseudo-Mercator</description>
|
|
||||||
<projectionacronym>merc</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</DefaultViewExtent>
|
|
||||||
</ProjectViewSettings>
|
|
||||||
<ProjectTimeSettings cumulativeTemporalRange="0" timeStepUnit="h" timeStep="1" frameRate="1"/>
|
|
||||||
<ProjectDisplaySettings>
|
|
||||||
<BearingFormat id="bearing">
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" name="decimal_separator" type="QChar"/>
|
|
||||||
<Option value="6" name="decimals" type="int"/>
|
|
||||||
<Option value="0" name="direction_format" type="int"/>
|
|
||||||
<Option value="0" name="rounding_type" type="int"/>
|
|
||||||
<Option value="false" name="show_plus" type="bool"/>
|
|
||||||
<Option value="true" name="show_thousand_separator" type="bool"/>
|
|
||||||
<Option value="false" name="show_trailing_zeros" type="bool"/>
|
|
||||||
<Option value="" name="thousand_separator" type="QChar"/>
|
|
||||||
</Option>
|
|
||||||
</BearingFormat>
|
|
||||||
</ProjectDisplaySettings>
|
|
||||||
</qgis>
|
|
@ -1,398 +0,0 @@
|
|||||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
|
||||||
<qgis projectname="" saveUser="julien" saveDateTime="2021-10-21T09:10:08" version="3.16.4-Hannover" saveUserFull="julien">
|
|
||||||
<homePath path=""/>
|
|
||||||
<title></title>
|
|
||||||
<autotransaction active="0"/>
|
|
||||||
<evaluateDefaultValues active="0"/>
|
|
||||||
<trust active="0"/>
|
|
||||||
<projectCrs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
|
|
||||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
|
||||||
<srsid>3857</srsid>
|
|
||||||
<srid>3857</srid>
|
|
||||||
<authid>EPSG:3857</authid>
|
|
||||||
<description>WGS 84 / Pseudo-Mercator</description>
|
|
||||||
<projectionacronym>merc</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</projectCrs>
|
|
||||||
<layer-tree-group>
|
|
||||||
<customproperties/>
|
|
||||||
<layer-tree-layer providerKey="wms" legend_exp="" patch_size="-1,-1" expanded="1" id="OpenStreetMap_ec6e4612_9dbd_4642_a5e1_846bc5e3d315" legend_split_behavior="0" name="OpenStreetMap" source="type=xyz&url=https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0" checked="Qt::Checked">
|
|
||||||
<customproperties/>
|
|
||||||
</layer-tree-layer>
|
|
||||||
<custom-order enabled="0">
|
|
||||||
<item>OpenStreetMap_ec6e4612_9dbd_4642_a5e1_846bc5e3d315</item>
|
|
||||||
</custom-order>
|
|
||||||
</layer-tree-group>
|
|
||||||
<snapping-settings self-snapping="0" enabled="0" mode="2" intersection-snapping="0" tolerance="12" scaleDependencyMode="0" minScale="0" unit="1" maxScale="0" type="1">
|
|
||||||
<individual-layer-settings/>
|
|
||||||
</snapping-settings>
|
|
||||||
<relations/>
|
|
||||||
<mapcanvas annotationsVisible="1" name="theMapCanvas">
|
|
||||||
<units>meters</units>
|
|
||||||
<extent>
|
|
||||||
<xmin>-19960441.00300928577780724</xmin>
|
|
||||||
<ymin>-43668959.47562752664089203</ymin>
|
|
||||||
<xmax>19960441.00300927087664604</xmax>
|
|
||||||
<ymax>43668959.47563116252422333</ymax>
|
|
||||||
</extent>
|
|
||||||
<rotation>0</rotation>
|
|
||||||
<destinationsrs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
|
|
||||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
|
||||||
<srsid>3857</srsid>
|
|
||||||
<srid>3857</srid>
|
|
||||||
<authid>EPSG:3857</authid>
|
|
||||||
<description>WGS 84 / Pseudo-Mercator</description>
|
|
||||||
<projectionacronym>merc</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</destinationsrs>
|
|
||||||
<rendermaptile>0</rendermaptile>
|
|
||||||
<expressionContextScope/>
|
|
||||||
</mapcanvas>
|
|
||||||
<DataPlotly>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option name="dynamic_properties" type="Map">
|
|
||||||
<Option value="" name="name" type="QString"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" name="type" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
<Option name="plot_layout" type="Map">
|
|
||||||
<Option value="" name="additional_info_expression" type="QString"/>
|
|
||||||
<Option value="group" name="bar_mode" type="QString"/>
|
|
||||||
<Option value="0" name="bargaps" type="double"/>
|
|
||||||
<Option value="false" name="bins_check" type="bool"/>
|
|
||||||
<Option value="true" name="legend" type="bool"/>
|
|
||||||
<Option value="v" name="legend_orientation" type="QString"/>
|
|
||||||
<Option name="legend_title" type="invalid"/>
|
|
||||||
<Option name="polar" type="Map">
|
|
||||||
<Option name="angularaxis" type="Map">
|
|
||||||
<Option value="clockwise" name="direction" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
</Option>
|
|
||||||
<Option name="range_slider" type="Map">
|
|
||||||
<Option value="1" name="borderwidth" type="int"/>
|
|
||||||
<Option value="false" name="visible" type="bool"/>
|
|
||||||
</Option>
|
|
||||||
<Option value="" name="title" type="QString"/>
|
|
||||||
<Option name="x_inv" type="invalid"/>
|
|
||||||
<Option name="x_max" type="invalid"/>
|
|
||||||
<Option name="x_min" type="invalid"/>
|
|
||||||
<Option value="" name="x_title" type="QString"/>
|
|
||||||
<Option value="linear" name="x_type" type="QString"/>
|
|
||||||
<Option name="xaxis" type="invalid"/>
|
|
||||||
<Option name="y_inv" type="invalid"/>
|
|
||||||
<Option name="y_max" type="invalid"/>
|
|
||||||
<Option name="y_min" type="invalid"/>
|
|
||||||
<Option value="" name="y_title" type="QString"/>
|
|
||||||
<Option value="linear" name="y_type" type="QString"/>
|
|
||||||
<Option value="" name="z_title" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
<Option name="plot_properties" type="Map">
|
|
||||||
<Option name="additional_hover_text" type="invalid"/>
|
|
||||||
<Option value="10" name="bins" type="int"/>
|
|
||||||
<Option value="v" name="box_orientation" type="QString"/>
|
|
||||||
<Option value="false" name="box_outliers" type="bool"/>
|
|
||||||
<Option value="false" name="box_stat" type="bool"/>
|
|
||||||
<Option value="Greys" name="color_scale" type="QString"/>
|
|
||||||
<Option value="false" name="color_scale_data_defined_in_check" type="bool"/>
|
|
||||||
<Option value="false" name="color_scale_data_defined_in_invert_check" type="bool"/>
|
|
||||||
<Option value="fill" name="cont_type" type="QString"/>
|
|
||||||
<Option value="Fill" name="contour_type_combo" type="QString"/>
|
|
||||||
<Option value="false" name="cumulative" type="bool"/>
|
|
||||||
<Option name="custom" type="List">
|
|
||||||
<Option value="" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
<Option value="auto" name="hover_label_position" type="QString"/>
|
|
||||||
<Option name="hover_label_text" type="invalid"/>
|
|
||||||
<Option value="all" name="hover_text" type="QString"/>
|
|
||||||
<Option value="#8ebad9" name="in_color" type="QString"/>
|
|
||||||
<Option value="false" name="invert_color_scale" type="bool"/>
|
|
||||||
<Option value="increasing" name="invert_hist" type="QString"/>
|
|
||||||
<Option value="Solid Line" name="line_combo" type="QString"/>
|
|
||||||
<Option value="solid" name="line_dash" type="QString"/>
|
|
||||||
<Option value="markers" name="marker" type="QString"/>
|
|
||||||
<Option value="10" name="marker_size" type="double"/>
|
|
||||||
<Option value="0" name="marker_symbol" type="int"/>
|
|
||||||
<Option value="Points" name="marker_type_combo" type="QString"/>
|
|
||||||
<Option value="1" name="marker_width" type="double"/>
|
|
||||||
<Option value="" name="name" type="QString"/>
|
|
||||||
<Option value="" name="normalization" type="QString"/>
|
|
||||||
<Option value="1" name="opacity" type="double"/>
|
|
||||||
<Option value="#1f77b4" name="out_color" type="QString"/>
|
|
||||||
<Option value="" name="point_combo" type="QString"/>
|
|
||||||
<Option value="false" name="selected_features_only" type="bool"/>
|
|
||||||
<Option value="false" name="show_colorscale_legend" type="bool"/>
|
|
||||||
<Option value="true" name="show_lines" type="bool"/>
|
|
||||||
<Option value="true" name="show_lines_check" type="bool"/>
|
|
||||||
<Option value="true" name="show_mean_line" type="bool"/>
|
|
||||||
<Option value="true" name="violin_box" type="bool"/>
|
|
||||||
<Option value="both" name="violin_side" type="QString"/>
|
|
||||||
<Option value="false" name="visible_features_only" type="bool"/>
|
|
||||||
<Option value="" name="x_name" type="QString"/>
|
|
||||||
<Option value="" name="y_name" type="QString"/>
|
|
||||||
<Option value="" name="z_name" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
<Option value="scatter" name="plot_type" type="QString"/>
|
|
||||||
<Option name="source_layer_id" type="invalid"/>
|
|
||||||
</Option>
|
|
||||||
</DataPlotly>
|
|
||||||
<projectModels/>
|
|
||||||
<legend updateDrawingOrder="true">
|
|
||||||
<legendlayer showFeatureCount="0" open="true" drawingOrder="-1" name="OpenStreetMap" checked="Qt::Checked">
|
|
||||||
<filegroup open="true" hidden="false">
|
|
||||||
<legendlayerfile visible="1" layerid="OpenStreetMap_ec6e4612_9dbd_4642_a5e1_846bc5e3d315" isInOverview="0"/>
|
|
||||||
</filegroup>
|
|
||||||
</legendlayer>
|
|
||||||
</legend>
|
|
||||||
<mapViewDocks/>
|
|
||||||
<mapViewDocks3D/>
|
|
||||||
<main-annotation-layer autoRefreshEnabled="0" refreshOnNotifyMessage="" refreshOnNotifyEnabled="0" type="annotation" autoRefreshTime="0">
|
|
||||||
<id>Annotations_58249151_7565_4174_821b_dcfdd29aefda</id>
|
|
||||||
<datasource></datasource>
|
|
||||||
<keywordList>
|
|
||||||
<value></value>
|
|
||||||
</keywordList>
|
|
||||||
<layername>Annotations</layername>
|
|
||||||
<srs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt></wkt>
|
|
||||||
<proj4></proj4>
|
|
||||||
<srsid>0</srsid>
|
|
||||||
<srid>0</srid>
|
|
||||||
<authid></authid>
|
|
||||||
<description></description>
|
|
||||||
<projectionacronym></projectionacronym>
|
|
||||||
<ellipsoidacronym></ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</srs>
|
|
||||||
<resourceMetadata>
|
|
||||||
<identifier></identifier>
|
|
||||||
<parentidentifier></parentidentifier>
|
|
||||||
<language></language>
|
|
||||||
<type></type>
|
|
||||||
<title></title>
|
|
||||||
<abstract></abstract>
|
|
||||||
<links/>
|
|
||||||
<fees></fees>
|
|
||||||
<encoding></encoding>
|
|
||||||
<crs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt></wkt>
|
|
||||||
<proj4></proj4>
|
|
||||||
<srsid>0</srsid>
|
|
||||||
<srid>0</srid>
|
|
||||||
<authid></authid>
|
|
||||||
<description></description>
|
|
||||||
<projectionacronym></projectionacronym>
|
|
||||||
<ellipsoidacronym></ellipsoidacronym>
|
|
||||||
<geographicflag>true</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</crs>
|
|
||||||
<extent/>
|
|
||||||
</resourceMetadata>
|
|
||||||
<items/>
|
|
||||||
<layerOpacity>1</layerOpacity>
|
|
||||||
</main-annotation-layer>
|
|
||||||
<projectlayers>
|
|
||||||
<maplayer autoRefreshEnabled="0" refreshOnNotifyMessage="" styleCategories="AllStyleCategories" minScale="1e+08" hasScaleBasedVisibilityFlag="0" maxScale="0" refreshOnNotifyEnabled="0" type="raster" autoRefreshTime="0">
|
|
||||||
<extent>
|
|
||||||
<xmin>-20037508.34278924390673637</xmin>
|
|
||||||
<ymin>-20037508.34278925508260727</ymin>
|
|
||||||
<xmax>20037508.34278924390673637</xmax>
|
|
||||||
<ymax>20037508.34278924390673637</ymax>
|
|
||||||
</extent>
|
|
||||||
<id>OpenStreetMap_ec6e4612_9dbd_4642_a5e1_846bc5e3d315</id>
|
|
||||||
<datasource>type=xyz&url=https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0</datasource>
|
|
||||||
<keywordList>
|
|
||||||
<value></value>
|
|
||||||
</keywordList>
|
|
||||||
<layername>OpenStreetMap</layername>
|
|
||||||
<srs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
|
|
||||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
|
||||||
<srsid>3857</srsid>
|
|
||||||
<srid>3857</srid>
|
|
||||||
<authid>EPSG:3857</authid>
|
|
||||||
<description>WGS 84 / Pseudo-Mercator</description>
|
|
||||||
<projectionacronym>merc</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</srs>
|
|
||||||
<resourceMetadata>
|
|
||||||
<identifier>OpenStreetMap tiles</identifier>
|
|
||||||
<parentidentifier></parentidentifier>
|
|
||||||
<language></language>
|
|
||||||
<type>dataset</type>
|
|
||||||
<title>OpenStreetMap tiles</title>
|
|
||||||
<abstract>OpenStreetMap is built by a community of mappers that contribute and maintain data about roads, trails, cafés, railway stations, and much more, all over the world.</abstract>
|
|
||||||
<links>
|
|
||||||
<link url="https://www.openstreetmap.org/" format="" name="Source" type="WWW:LINK" mimeType="" description="" size=""/>
|
|
||||||
</links>
|
|
||||||
<fees></fees>
|
|
||||||
<rights>Base map and data from OpenStreetMap and OpenStreetMap Foundation (CC-BY-SA). © https://www.openstreetmap.org and contributors.</rights>
|
|
||||||
<license>Open Data Commons Open Database License (ODbL)</license>
|
|
||||||
<license>Creative Commons Attribution-ShareAlike (CC-BY-SA)</license>
|
|
||||||
<encoding></encoding>
|
|
||||||
<crs>
|
|
||||||
<spatialrefsys>
|
|
||||||
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
|
|
||||||
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
|
|
||||||
<srsid>3857</srsid>
|
|
||||||
<srid>3857</srid>
|
|
||||||
<authid>EPSG:3857</authid>
|
|
||||||
<description>WGS 84 / Pseudo-Mercator</description>
|
|
||||||
<projectionacronym>merc</projectionacronym>
|
|
||||||
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
|
|
||||||
<geographicflag>false</geographicflag>
|
|
||||||
</spatialrefsys>
|
|
||||||
</crs>
|
|
||||||
<extent>
|
|
||||||
<spatial minz="0" miny="-85.05112877980660357" maxx="180" maxz="0" crs="EPSG:4326" minx="-180" maxy="85.05112877980660357" dimensions="2"/>
|
|
||||||
</extent>
|
|
||||||
</resourceMetadata>
|
|
||||||
<provider>wms</provider>
|
|
||||||
<noData>
|
|
||||||
<noDataList useSrcNoData="0" bandNo="1"/>
|
|
||||||
</noData>
|
|
||||||
<map-layer-style-manager current="default">
|
|
||||||
<map-layer-style name="default"/>
|
|
||||||
</map-layer-style-manager>
|
|
||||||
<flags>
|
|
||||||
<Identifiable>1</Identifiable>
|
|
||||||
<Removable>1</Removable>
|
|
||||||
<Searchable>1</Searchable>
|
|
||||||
</flags>
|
|
||||||
<temporal enabled="0" mode="0" fetchMode="0">
|
|
||||||
<fixedRange>
|
|
||||||
<start></start>
|
|
||||||
<end></end>
|
|
||||||
</fixedRange>
|
|
||||||
</temporal>
|
|
||||||
<customproperties>
|
|
||||||
<property key="identify/format" value="Undefined"/>
|
|
||||||
</customproperties>
|
|
||||||
<pipe>
|
|
||||||
<provider>
|
|
||||||
<resampling enabled="false" zoomedInResamplingMethod="nearestNeighbour" zoomedOutResamplingMethod="nearestNeighbour" maxOversampling="2"/>
|
|
||||||
</provider>
|
|
||||||
<rasterrenderer opacity="1" nodataColor="" alphaBand="-1" band="1" type="singlebandcolordata">
|
|
||||||
<rasterTransparency/>
|
|
||||||
<minMaxOrigin>
|
|
||||||
<limits>None</limits>
|
|
||||||
<extent>WholeRaster</extent>
|
|
||||||
<statAccuracy>Estimated</statAccuracy>
|
|
||||||
<cumulativeCutLower>0.02</cumulativeCutLower>
|
|
||||||
<cumulativeCutUpper>0.98</cumulativeCutUpper>
|
|
||||||
<stdDevFactor>2</stdDevFactor>
|
|
||||||
</minMaxOrigin>
|
|
||||||
</rasterrenderer>
|
|
||||||
<brightnesscontrast brightness="0" contrast="0" gamma="1"/>
|
|
||||||
<huesaturation colorizeOn="0" colorizeGreen="128" saturation="0" colorizeRed="255" colorizeBlue="128" colorizeStrength="100" grayscaleMode="0"/>
|
|
||||||
<rasterresampler maxOversampling="2"/>
|
|
||||||
<resamplingStage>resamplingFilter</resamplingStage>
|
|
||||||
</pipe>
|
|
||||||
<blendMode>0</blendMode>
|
|
||||||
</maplayer>
|
|
||||||
</projectlayers>
|
|
||||||
<layerorder>
|
|
||||||
<layer id="OpenStreetMap_ec6e4612_9dbd_4642_a5e1_846bc5e3d315"/>
|
|
||||||
</layerorder>
|
|
||||||
<properties>
|
|
||||||
<Digitizing>
|
|
||||||
<AvoidIntersectionsMode type="int">0</AvoidIntersectionsMode>
|
|
||||||
</Digitizing>
|
|
||||||
<Gui>
|
|
||||||
<CanvasColorBluePart type="int">255</CanvasColorBluePart>
|
|
||||||
<CanvasColorGreenPart type="int">255</CanvasColorGreenPart>
|
|
||||||
<CanvasColorRedPart type="int">255</CanvasColorRedPart>
|
|
||||||
<SelectionColorAlphaPart type="int">255</SelectionColorAlphaPart>
|
|
||||||
<SelectionColorBluePart type="int">0</SelectionColorBluePart>
|
|
||||||
<SelectionColorGreenPart type="int">255</SelectionColorGreenPart>
|
|
||||||
<SelectionColorRedPart type="int">255</SelectionColorRedPart>
|
|
||||||
</Gui>
|
|
||||||
<Legend>
|
|
||||||
<filterByMap type="bool">false</filterByMap>
|
|
||||||
</Legend>
|
|
||||||
<Measure>
|
|
||||||
<Ellipsoid type="QString">EPSG:7030</Ellipsoid>
|
|
||||||
</Measure>
|
|
||||||
<Measurement>
|
|
||||||
<AreaUnits type="QString">m2</AreaUnits>
|
|
||||||
<DistanceUnits type="QString">meters</DistanceUnits>
|
|
||||||
</Measurement>
|
|
||||||
<PAL>
|
|
||||||
<CandidatesLinePerCM type="double">5</CandidatesLinePerCM>
|
|
||||||
<CandidatesPolygonPerCM type="double">2.5</CandidatesPolygonPerCM>
|
|
||||||
<DrawRectOnly type="bool">false</DrawRectOnly>
|
|
||||||
<DrawUnplaced type="bool">false</DrawUnplaced>
|
|
||||||
<PlacementEngineVersion type="int">1</PlacementEngineVersion>
|
|
||||||
<SearchMethod type="int">0</SearchMethod>
|
|
||||||
<ShowingAllLabels type="bool">false</ShowingAllLabels>
|
|
||||||
<ShowingCandidates type="bool">false</ShowingCandidates>
|
|
||||||
<ShowingPartialsLabels type="bool">true</ShowingPartialsLabels>
|
|
||||||
<TextFormat type="int">0</TextFormat>
|
|
||||||
<UnplacedColor type="QString">255,0,0,255</UnplacedColor>
|
|
||||||
</PAL>
|
|
||||||
<Paths>
|
|
||||||
<Absolute type="bool">false</Absolute>
|
|
||||||
</Paths>
|
|
||||||
<PositionPrecision>
|
|
||||||
<Automatic type="bool">true</Automatic>
|
|
||||||
<DecimalPlaces type="int">2</DecimalPlaces>
|
|
||||||
</PositionPrecision>
|
|
||||||
<SpatialRefSys>
|
|
||||||
<ProjectionsEnabled type="int">1</ProjectionsEnabled>
|
|
||||||
</SpatialRefSys>
|
|
||||||
</properties>
|
|
||||||
<dataDefinedServerProperties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" name="name" type="QString"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" name="type" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
</dataDefinedServerProperties>
|
|
||||||
<visibility-presets/>
|
|
||||||
<transformContext/>
|
|
||||||
<projectMetadata>
|
|
||||||
<identifier></identifier>
|
|
||||||
<parentidentifier></parentidentifier>
|
|
||||||
<language></language>
|
|
||||||
<type></type>
|
|
||||||
<title></title>
|
|
||||||
<abstract></abstract>
|
|
||||||
<links/>
|
|
||||||
<author>julien</author>
|
|
||||||
<creation>2021-10-21T09:09:36</creation>
|
|
||||||
</projectMetadata>
|
|
||||||
<Annotations/>
|
|
||||||
<Layouts/>
|
|
||||||
<Bookmarks/>
|
|
||||||
<ProjectViewSettings UseProjectScales="0">
|
|
||||||
<Scales/>
|
|
||||||
</ProjectViewSettings>
|
|
||||||
<ProjectTimeSettings cumulativeTemporalRange="0" timeStepUnit="h" timeStep="1" frameRate="1"/>
|
|
||||||
<ProjectDisplaySettings>
|
|
||||||
<BearingFormat id="bearing">
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" name="decimal_separator" type="QChar"/>
|
|
||||||
<Option value="6" name="decimals" type="int"/>
|
|
||||||
<Option value="0" name="direction_format" type="int"/>
|
|
||||||
<Option value="0" name="rounding_type" type="int"/>
|
|
||||||
<Option value="false" name="show_plus" type="bool"/>
|
|
||||||
<Option value="true" name="show_thousand_separator" type="bool"/>
|
|
||||||
<Option value="false" name="show_trailing_zeros" type="bool"/>
|
|
||||||
<Option value="" name="thousand_separator" type="QChar"/>
|
|
||||||
</Option>
|
|
||||||
</BearingFormat>
|
|
||||||
</ProjectDisplaySettings>
|
|
||||||
</qgis>
|
|
@ -1,3 +0,0 @@
|
|||||||
How to draw lines and polygons in Leaflet: sandbox for testing
|
|
||||||
=================================
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html style="height:100%;margin:0;padding:0;">
|
|
||||||
<head>
|
|
||||||
<title>Tests edit line - polygon</title>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
|
|
||||||
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
|
|
||||||
<script src="./leaflet/leaflet-hash.js"></script>
|
|
||||||
<style type="text/css">
|
|
||||||
.leaflet-tile-container { pointer-events: auto; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body style="height:100%;margin:0;padding:0;">
|
|
||||||
<div id="map" style="height:100%"></div>
|
|
||||||
<script>
|
|
||||||
const map = L.map('map').setView([50.5, 5.57], 10);
|
|
||||||
|
|
||||||
const cyclosm = L.tileLayer('https://{s}.tiles.champs-libres.be/cyclosm/{z}/{x}/{y}.png', {
|
|
||||||
subdomains: "abc",
|
|
||||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
|
||||||
maxZoom: 20
|
|
||||||
});
|
|
||||||
|
|
||||||
map.addLayer(cyclosm);
|
|
||||||
|
|
||||||
const hash = L.hash(map);
|
|
||||||
|
|
||||||
let geometryType = 'POLYGON'; //'POINT' | 'LINESTRING' | 'POLYGON'
|
|
||||||
let myMarker = null;
|
|
||||||
let polyline = null;
|
|
||||||
let previousPolyline = null;
|
|
||||||
let previousLayerPoint = null;
|
|
||||||
|
|
||||||
let polygon = null;
|
|
||||||
let firstPolygonPoint = null;
|
|
||||||
|
|
||||||
const lineDraw = L.polyline([], {color: '#11aa9e', dashArray: '6', lineCap: 'butt'}).addTo(map);
|
|
||||||
|
|
||||||
const pointDistance = (pointA, pointB) => {
|
|
||||||
const SNAP_DISTANCE = 6;
|
|
||||||
let distancePixel = Math.sqrt(Math.abs((pointB.x - pointA.x)**2 - (pointB.y - pointA.y)**2));
|
|
||||||
return distancePixel < SNAP_DISTANCE;
|
|
||||||
};
|
|
||||||
|
|
||||||
const arePointsSnapped = (previousPoint, currentPoint) =>
|
|
||||||
(previousPoint && currentPoint) ? pointDistance(previousPoint, currentPoint) : false;
|
|
||||||
|
|
||||||
switch(geometryType){
|
|
||||||
case 'LINESTRING':
|
|
||||||
map.on('mousemove', (e) => {
|
|
||||||
if(polyline){
|
|
||||||
let lastDrawPoint = polyline.getLatLngs()[polyline.getLatLngs().length - 1];
|
|
||||||
lineDraw.setLatLngs([lastDrawPoint, e.latlng]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 'POLYGON':
|
|
||||||
map.on('mousemove', (e) => {
|
|
||||||
if(polygon){
|
|
||||||
let lastDrawPoint = polygon.getLatLngs()[0][polygon.getLatLngs()[0].length - 1];
|
|
||||||
let firstDrawPoint = polygon.getLatLngs()[0][0];
|
|
||||||
lineDraw.setLatLngs([firstDrawPoint, e.latlng, lastDrawPoint]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
map.on('click', (e) => {
|
|
||||||
console.log(e);
|
|
||||||
|
|
||||||
switch(geometryType){
|
|
||||||
case 'POINT':
|
|
||||||
default:
|
|
||||||
if (myMarker !== null) {
|
|
||||||
map.removeLayer(myMarker);
|
|
||||||
}
|
|
||||||
myMarker = L.marker(e.latlng).addTo(map);
|
|
||||||
break;
|
|
||||||
case 'LINESTRING':
|
|
||||||
lineDraw.setLatLngs([]);
|
|
||||||
if (polyline === null){
|
|
||||||
console.log(previousPolyline)
|
|
||||||
if (previousPolyline !== null){
|
|
||||||
map.removeLayer(previousPolyline);
|
|
||||||
}
|
|
||||||
polyline = L.polyline([e.latlng], {color: '#11aa9e'}).addTo(map);
|
|
||||||
} else {
|
|
||||||
if (arePointsSnapped(previousLayerPoint, e.layerPoint)) {
|
|
||||||
console.log('reset line')
|
|
||||||
previousPolyline = polyline;
|
|
||||||
polyline.setStyle({color: '#60b15c'});
|
|
||||||
polyline = null;
|
|
||||||
} else {
|
|
||||||
polyline.addLatLng(e.latlng);
|
|
||||||
previousLayerPoint = e.layerPoint;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'POLYGON':
|
|
||||||
lineDraw.setLatLngs([]);
|
|
||||||
if (polygon === null){
|
|
||||||
polygon = L.polygon([e.latlng], {color: '#11aa9e'}).addTo(map);
|
|
||||||
firstPolygonPoint = e.layerPoint;
|
|
||||||
} else {
|
|
||||||
if (arePointsSnapped(firstPolygonPoint, e.layerPoint)) {
|
|
||||||
console.log('close the polygon')
|
|
||||||
polygon.setStyle({color: '#60b15c'});
|
|
||||||
polygon = null;
|
|
||||||
} else {
|
|
||||||
polygon.addLatLng(e.latlng);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,2 +0,0 @@
|
|||||||
node_modules
|
|
||||||
.lvimrc
|
|
@ -1,55 +0,0 @@
|
|||||||
{
|
|
||||||
/*
|
|
||||||
* ENVIRONMENTS
|
|
||||||
* =================
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Define globals exposed by modern browsers.
|
|
||||||
"browser": true,
|
|
||||||
|
|
||||||
// Define globals exposed by jQuery.
|
|
||||||
"jquery": true,
|
|
||||||
|
|
||||||
"globals": {"L": false, "proj4": false},
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ENFORCING OPTIONS
|
|
||||||
* =================
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Force all variable names to use either camelCase style or UPPER_CASE
|
|
||||||
// with underscores.
|
|
||||||
"camelcase": true,
|
|
||||||
|
|
||||||
// Prohibit use of == and != in favor of === and !==.
|
|
||||||
"eqeqeq": true,
|
|
||||||
|
|
||||||
// Suppress warnings about == null comparisons.
|
|
||||||
"eqnull": true,
|
|
||||||
|
|
||||||
// Enforce tab width of 2 spaces.
|
|
||||||
"indent": 2,
|
|
||||||
|
|
||||||
"smarttabs": true,
|
|
||||||
|
|
||||||
// Prohibit use of a variable before it is defined.
|
|
||||||
"latedef": true,
|
|
||||||
|
|
||||||
// Require capitalized names for constructor functions.
|
|
||||||
"newcap": true,
|
|
||||||
|
|
||||||
// Enforce use of single quotation marks for strings.
|
|
||||||
"quotmark": "single",
|
|
||||||
|
|
||||||
// Prohibit trailing whitespace.
|
|
||||||
"trailing": true,
|
|
||||||
|
|
||||||
// Prohibit use of explicitly undeclared variables.
|
|
||||||
"undef": true,
|
|
||||||
|
|
||||||
// Warn when variables are defined but never used.
|
|
||||||
"unused": true,
|
|
||||||
|
|
||||||
// All loops and conditionals should have braces.
|
|
||||||
"curly": true
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- "6.9"
|
|
@ -1,22 +0,0 @@
|
|||||||
Copyright (c) 2012, Kartena AB
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
||||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,162 +0,0 @@
|
|||||||
# Proj4Leaflet [![NPM version](https://badge.fury.io/js/proj4leaflet.png)](http://badge.fury.io/js/proj4leaflet) [![Build Status](https://travis-ci.org/kartena/Proj4Leaflet.svg?branch=master)](https://travis-ci.org/kartena/Proj4Leaflet)
|
|
||||||
|
|
||||||
This [Leaflet](http://leafletjs.com) plugin adds support for using projections supported by
|
|
||||||
[Proj4js](https://github.com/proj4js/proj4js).
|
|
||||||
|
|
||||||
_Proj4Leaflet uses Leaflet 1.0.3, for compatibility with Leaflet 0.7.x use the [0.7.2](https://github.com/kartena/Proj4Leaflet/releases/tag/0.7.2) release._
|
|
||||||
|
|
||||||
Leaflet comes with built in support for tiles in [Spherical Mercator](http://wiki.openstreetmap.org/wiki/EPSG:3857) and [a few other projections](http://leafletjs.com/reference-1.0.0.html#crs-l-crs-epsg3395).
|
|
||||||
If you need support for tile layers in other projections, the Proj4Leaflet plugin lets you use tiles in any projection
|
|
||||||
supported by Proj4js, which means support for just about any projection commonly used.
|
|
||||||
|
|
||||||
Proj4Leaflet also adds support for GeoJSON in any projection, while Leaflet by itself assumes GeoJSON to always
|
|
||||||
use WGS84 as its projection.
|
|
||||||
|
|
||||||
Image overlays with bounds set from projected coordinates rather than `LatLng`s are also supported by Proj4Leaflet plugin.
|
|
||||||
|
|
||||||
For more details, see this blog post on [tiling and projections](http://blog.kartena.se/local-projections-in-a-world-of-spherical-mercator/).
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Common use means making a new CRS instance for the projection you want to use.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// RT90 with map's pixel origin at RT90 coordinate (0, 0)
|
|
||||||
var crs = new L.Proj.CRS('EPSG:2400',
|
|
||||||
'+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 ' +
|
|
||||||
'+y_0=0.0 +proj=tmerc +ellps=bessel +units=m ' +
|
|
||||||
'+towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs',
|
|
||||||
{
|
|
||||||
resolutions: [8192, 4096, 2048] // 3 example zoom level resolutions
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
var map = L.map('map', {
|
|
||||||
crs: crs,
|
|
||||||
continuousWorld: true,
|
|
||||||
worldCopyJump: false
|
|
||||||
});
|
|
||||||
|
|
||||||
L.tileLayer('http://tile.example.com/example/{z}/{x}/{y}.png').addTo(map);
|
|
||||||
```
|
|
||||||
|
|
||||||
Using options when constructing the CRS, you can set the tile set's origin.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// SWEREF 99 TM with map's pixel origin at (218128.7031, 6126002.9379)
|
|
||||||
var crs = new L.Proj.CRS('EPSG:3006',
|
|
||||||
'+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
|
|
||||||
{
|
|
||||||
origin: [218128.7031, 6126002.9379],
|
|
||||||
resolutions: [8192, 4096, 2048] // 3 example zoom level resolutions
|
|
||||||
}
|
|
||||||
);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Proj4js compatibility notice
|
|
||||||
Proj4js has breaking changes introduced after version 1.1.0. The current version of Proj4Leaflet
|
|
||||||
uses Proj4js 2.3.14 or later. If you for some reason need Proj4js version 1.1.0 compatibility, you can
|
|
||||||
still use Proj4Leaflet [version 0.5](https://github.com/kartena/Proj4Leaflet/tree/0.5).
|
|
||||||
|
|
||||||
## API
|
|
||||||
The plugin extends Leaflet with a few classes that helps integrating Proj4's projections into
|
|
||||||
Leaflet's [CRS](http://leafletjs.com/reference-1.0.0.html#crs) abstract class.
|
|
||||||
|
|
||||||
### L.Proj.CRS
|
|
||||||
A CRS implementation that uses a Proj4 definition for the projection.
|
|
||||||
This is likely to be the only class you need to work with in Proj4Leaflet.
|
|
||||||
|
|
||||||
#### Usage example
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
var map = L.map('map', {
|
|
||||||
center: [57.74, 11.94],
|
|
||||||
zoom: 13,
|
|
||||||
crs: L.Proj.CRS('EPSG:2400',
|
|
||||||
'+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 ' +
|
|
||||||
'+y_0=0.0 +proj=tmerc +ellps=bessel +units=m ' +
|
|
||||||
'+towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs',
|
|
||||||
{
|
|
||||||
resolutions: [8192, 4096, 2048] // 3 example zoom level resolutions
|
|
||||||
}
|
|
||||||
),
|
|
||||||
continuousWorld: true,
|
|
||||||
worldCopyJump: false
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Constructor
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
L.Proj.CRS(code, proj4def, options)
|
|
||||||
```
|
|
||||||
|
|
||||||
* `code` is the projection's SRS code (only used internally by the Proj4js library)
|
|
||||||
* `proj4def` is the Proj4 definition string for the projection to use
|
|
||||||
* `options` is an options object with these possible parameters:
|
|
||||||
* `origin` - the projected coordinate to use as the map's pixel origin; overrides the `transformation` option if set
|
|
||||||
* `transformation` - an [L.Transformation](http://leafletjs.com/reference-1.0.0.html#transformation) that is used
|
|
||||||
to transform the projected coordinates to pixel coordinates; default is `L.Transformation(1, 0, -1, 0)`
|
|
||||||
* `scales` - an array of scales (pixels per projected coordinate unit) for each corresponding zoom level;
|
|
||||||
default is to use Leaflet's native scales. You should use `scales` _or_ `resolutions`, not both.
|
|
||||||
* `resolutions` - an array of resolutions (projected coordinate units per pixel) for each corresponding zoom level;
|
|
||||||
default is to use Leaflet's native resolutions. You should use `scales` _or_ `resolutions`, not both.
|
|
||||||
* `bounds` - an [L.Bounds](http://leafletjs.com/reference-1.0.0.html#bounds) providing the bounds of CRS in projected
|
|
||||||
coordinates. If defined, Proj4Leaflet will use this in the `getSize` method, otherwise reverting to Leaflet's
|
|
||||||
default size for Spherical Mercator.
|
|
||||||
|
|
||||||
### L.Proj.GeoJSON
|
|
||||||
|
|
||||||
Extends [L.GeoJSON](http://leafletjs.com/reference-1.0.0.html#geojson) to add CRS support. Unlike the TileLayer extension, the
|
|
||||||
CRS is derived from the `name` property of a `crs` defined directly on the GeoJSON object per [the spec](http://www.geojson.org/geojson-spec.html#named-crs).
|
|
||||||
Linked CRSs are not supported.
|
|
||||||
|
|
||||||
**Note:** The relevant Proj4 definition should be defined directly via `proj4.defs` before loading the GeoJSON object.
|
|
||||||
If it is not, Proj4leaflet will throw an error.
|
|
||||||
|
|
||||||
Also, note that future versions of the GeoJSON spec may not include explicit CRS support. See https://github.com/GeoJSONWG/draft-geojson/pull/6 for more information.
|
|
||||||
|
|
||||||
#### Usage Example
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
proj4.defs("urn:ogc:def:crs:EPSG::26915", "+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
|
||||||
|
|
||||||
var geojson = {
|
|
||||||
type: "Feature",
|
|
||||||
geometry: {
|
|
||||||
type: "Point",
|
|
||||||
coordinates: [481650, 4980105]
|
|
||||||
},
|
|
||||||
crs: {
|
|
||||||
type: "name",
|
|
||||||
properties: {
|
|
||||||
name: "urn:ogc:def:crs:EPSG::26915"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var map = L.map('map');
|
|
||||||
|
|
||||||
L.Proj.geoJson(geojson).addTo(map);
|
|
||||||
```
|
|
||||||
|
|
||||||
### L.Proj.ImageOverlay
|
|
||||||
|
|
||||||
Works like [L.ImageOverlay](http://leafletjs.com/reference-1.0.0.html#imageoverlay), but accepts bounds in the map's
|
|
||||||
projected coordinate system instead of latitudes and longitudes. This is useful when the projected coordinate systems
|
|
||||||
axis do not align with the latitudes and longitudes, which results in distortion with the default image overlay in Leaflet.
|
|
||||||
|
|
||||||
#### Usage Example
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Coordinate system is EPSG:28992 / Amersfoort / RD New
|
|
||||||
var imageBounds = L.bounds(
|
|
||||||
[145323.20011251318, 475418.56045463786],
|
|
||||||
[175428.80013969325, 499072.9604685671]
|
|
||||||
);
|
|
||||||
|
|
||||||
L.Proj.imageOverlay('http://geo.flevoland.nl/arcgis/rest/services/Groen_Natuur/Agrarische_Natuur/MapServer/export?' +
|
|
||||||
'format=png24&transparent=true&f=image&bboxSR=28992&imageSR=28992&layers=show%3A0' +
|
|
||||||
'&bbox=145323.20011251318%2C475418.56045463786%2C175428.80013969325%2C499072.9604685671&size=560%2C440',
|
|
||||||
imageBounds);
|
|
||||||
```
|
|
@ -1,53 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Proj4Leaflet",
|
|
||||||
"version": "1.0.1",
|
|
||||||
"homepage": "https://github.com/kartena/Proj4Leaflet",
|
|
||||||
"authors": [
|
|
||||||
"Per Liedman <per.liedman@kartena.se> (https://github.com/perliedman/)",
|
|
||||||
"Peter Thorin (https://github.com/pthorin/)",
|
|
||||||
"Semone Kallin Thander (https://github.com/semone/)",
|
|
||||||
"S. Andrew Sheppard (https://github.com/sheppard)",
|
|
||||||
"Leigh Hunt (https://github.com/leighghunt/)",
|
|
||||||
"Andris Nolendorfs (https://github.com/theashyster)",
|
|
||||||
"Vladimir Agafonkin (https://github.com/mourner)",
|
|
||||||
"Juuso Lehtinen (https://github.com/jleh)",
|
|
||||||
"Mattias Bengtsson (https://github.com/moonlite/)",
|
|
||||||
"Denis Rykov (http://github.com/drnextgis) ",
|
|
||||||
"Jose manuel Vivó Arnal (Chema) (http://github.com/jmvivo) ",
|
|
||||||
"Daniel Garcia (http://github.com/keyjote) ",
|
|
||||||
"Mathieu Leplatre (https://github.com/leplatrem)",
|
|
||||||
"Benny Lichtner (http://github.com/bennlich) ",
|
|
||||||
"Christopher Fredén (https://github.com/icetan/)",
|
|
||||||
"dpzaba (http://github.com/dpzaba) ",
|
|
||||||
"Edward Mac Gillavry (http://github.com/emacgillavry) ",
|
|
||||||
"Emil Goude (http://github.com/Stockholmsnovis) ",
|
|
||||||
"Simon Legner (http://github.com/simon04) ",
|
|
||||||
"Tom Blackmore (http://github.com/tablackmore) ",
|
|
||||||
"Fabien NICOLLET (https://github.com/fnicollet)"
|
|
||||||
],
|
|
||||||
"description": "Smooth Proj4js integration with Leaflet",
|
|
||||||
"moduleType": [
|
|
||||||
"amd",
|
|
||||||
"node"
|
|
||||||
],
|
|
||||||
"main": [
|
|
||||||
"src/proj4leaflet.js"
|
|
||||||
],
|
|
||||||
"keywords": [
|
|
||||||
"Leaflet",
|
|
||||||
"Project4"
|
|
||||||
],
|
|
||||||
"license": "BSD-2-Clause",
|
|
||||||
"ignore": [
|
|
||||||
"**/.*",
|
|
||||||
"node_modules",
|
|
||||||
"bower_components",
|
|
||||||
"test",
|
|
||||||
"lib",
|
|
||||||
"examples",
|
|
||||||
"tests"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"proj4": "^2.3.14"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" href="style.css" />
|
|
||||||
<link rel="stylesheet" href="../../lib/leaflet/leaflet.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="map"></div>
|
|
||||||
<script src="../../lib/leaflet/leaflet.js"></script>
|
|
||||||
<script src="../../lib/proj4-compressed.js"></script>
|
|
||||||
<script src="../../src/proj4leaflet.js"></script>
|
|
||||||
<script src="script.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,41 +0,0 @@
|
|||||||
var map = L.map('map').setView([44.97,-93.24], 11);
|
|
||||||
|
|
||||||
// MapQuest OSM Tiles
|
|
||||||
|
|
||||||
// Attribution (https://gist.github.com/mourner/1804938)
|
|
||||||
var osmAttr = 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
|
||||||
mqTilesAttr = 'Tiles © <a href="https://www.mapquest.com/"" target="_blank">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png" />';
|
|
||||||
|
|
||||||
L.tileLayer(
|
|
||||||
'https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png',
|
|
||||||
{
|
|
||||||
attribution: 'Data by <a href="https://openstreetmap.org">OpenStreetMap contributors</a>'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.addTo(map);
|
|
||||||
|
|
||||||
// GeoJSON layer (UTM15)
|
|
||||||
proj4.defs('EPSG:26915', '+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs');
|
|
||||||
|
|
||||||
var geojson = {
|
|
||||||
'type': 'Feature',
|
|
||||||
'geometry': {
|
|
||||||
'type': 'Point',
|
|
||||||
'coordinates': [481650, 4980105],
|
|
||||||
},
|
|
||||||
'properties': {
|
|
||||||
'name': 'University of Minnesota'
|
|
||||||
},
|
|
||||||
'crs': {
|
|
||||||
'type': 'name',
|
|
||||||
'properties': {
|
|
||||||
'name': 'urn:ogc:def:crs:EPSG::26915'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
L.Proj.geoJson(geojson, {
|
|
||||||
'pointToLayer': function(feature, latlng) {
|
|
||||||
return L.marker(latlng).bindPopup(feature.properties.name);
|
|
||||||
}
|
|
||||||
}).addTo(map);
|
|
@ -1,10 +0,0 @@
|
|||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#map {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" href="style.css" />
|
|
||||||
<link rel="stylesheet" href="../../lib/leaflet/leaflet.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="map"></div>
|
|
||||||
<script src="../../lib/leaflet/leaflet.js"></script>
|
|
||||||
<script src="../../lib/proj4-compressed.js"></script>
|
|
||||||
<script src="../../src/proj4leaflet.js"></script>
|
|
||||||
<script src="script.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,20 +0,0 @@
|
|||||||
var crs = new L.Proj.CRS('EPSG:25833', '+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs', {
|
|
||||||
resolutions: [21674.7100160867, 10837.35500804335, 5418.677504021675, 2709.3387520108377, 1354.6693760054188, 677.3346880027094,
|
|
||||||
338.6673440013547, 169.33367200067735, 84.66683600033868, 42.33341800016934, 21.16670900008467, 10.583354500042335,
|
|
||||||
5.291677250021167, 2.6458386250105836, 1.3229193125052918, 0.6614596562526459, 0.33072982812632296, 0.16536491406316148],
|
|
||||||
origin: [-2500000, 9045984]
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
var map = L.map('map', {
|
|
||||||
crs: crs,
|
|
||||||
center: [60, 10],
|
|
||||||
zoom: 14
|
|
||||||
});
|
|
||||||
|
|
||||||
L.tileLayer('https://services.geodataonline.no/arcgis/rest/services/Geocache_UTM33_EUREF89/GeocacheBasis/MapServer/tile/{z}/{y}/{x}').addTo(map);
|
|
||||||
|
|
||||||
L.Proj.imageOverlay('https://services.geodataonline.no/arcgis/rest/services/Geocache_UTM33_EUREF89/GeocacheGraatone/MapServer/export' +
|
|
||||||
'?bbox=220461.84450009145,6661489.40861154,222115.49415195954,6662415.4521056535' +
|
|
||||||
'&size=1250,700&dpi=96&format=png24&transparent=true&bboxSR=25833&imageSR=25833&f=image',
|
|
||||||
L.bounds([220461.84450009145, 6661489.40861154], [222115.49415195954, 6662415.4521056535])).addTo(map);
|
|
@ -1,10 +0,0 @@
|
|||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#map {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" href="../style.css" />
|
|
||||||
<link rel="stylesheet" href="../../../lib/leaflet/leaflet.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="map"></div>
|
|
||||||
<script src="../../../lib/leaflet/leaflet.js"></script>
|
|
||||||
<script src="../../../lib/proj4-compressed.js"></script>
|
|
||||||
<script src="../../../src/proj4leaflet.js"></script>
|
|
||||||
<script src="script_austria.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,36 +0,0 @@
|
|||||||
var crs31258 = new L.Proj.CRS('EPSG::31258',
|
|
||||||
"+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs",
|
|
||||||
{
|
|
||||||
origin: [-5172500.0, 5001000.0],
|
|
||||||
resolutions: [
|
|
||||||
400.00079375158754,
|
|
||||||
200.000529167725,
|
|
||||||
100.0002645838625,
|
|
||||||
50,
|
|
||||||
25,
|
|
||||||
15.000052916772502,
|
|
||||||
9.9999470832275,
|
|
||||||
5.000105833545001,
|
|
||||||
3.0001164168995005,
|
|
||||||
2.5000529167725003,
|
|
||||||
1.9999894166455001,
|
|
||||||
1.4999259165184997,
|
|
||||||
1.0001270002540006,
|
|
||||||
0.5000635001270003,
|
|
||||||
0.25003175006350015],
|
|
||||||
});
|
|
||||||
|
|
||||||
var map = L.map('map', {
|
|
||||||
crs: crs31258,
|
|
||||||
});
|
|
||||||
var attrib = "© KAGIS http://www.kagis.ktn.gv.at";
|
|
||||||
var basemap = new L.TileLayer("http://gis.ktn.gv.at/arcgis/rest/services/tilecache/Ortho_2010_2012/MapServer/tile/{z}/{y}/{x}", {
|
|
||||||
tileSize: 512,
|
|
||||||
maxZoom: 14,
|
|
||||||
minZoom: 0,
|
|
||||||
attribution: attrib
|
|
||||||
});
|
|
||||||
|
|
||||||
map.addLayer(basemap);
|
|
||||||
map.setView([46.66411, 14.63602], 12);
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" href="../style.css" />
|
|
||||||
<link rel="stylesheet" href="../../../lib/leaflet/leaflet.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="map"></div>
|
|
||||||
<script src="../../../lib/leaflet/leaflet.js"></script>
|
|
||||||
<script src="../../../lib/proj4-compressed.js"></script>
|
|
||||||
<script src="../../../src/proj4leaflet.js"></script>
|
|
||||||
<script src="script_auckland.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" href="style.css" />
|
|
||||||
<link rel="stylesheet" href="https://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="map"></div>
|
|
||||||
<script src="https://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
|
|
||||||
<script src="../../../lib/proj4-compressed.js"></script>
|
|
||||||
<script src="../../../src/proj4leaflet.js"></script>
|
|
||||||
<script src="script_wellington.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,35 +0,0 @@
|
|||||||
var crs = new L.Proj.CRS('EPSG:2193',
|
|
||||||
'+proj=tmerc +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
|
|
||||||
{
|
|
||||||
origin: [1565000, 6150000],
|
|
||||||
resolutions: [
|
|
||||||
264.583862501058,
|
|
||||||
201.083735500804,
|
|
||||||
132.291931250529,
|
|
||||||
66.1459656252646,
|
|
||||||
26.4583862501058,
|
|
||||||
13.2291931250529,
|
|
||||||
6.61459656252646,
|
|
||||||
3.96875793751588,
|
|
||||||
2.11667090000847,
|
|
||||||
1.32291931250529,
|
|
||||||
0.661459656252646,
|
|
||||||
0.264583862501058,
|
|
||||||
0.132291931250529
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
var map = new L.Map('map', {
|
|
||||||
crs: crs,
|
|
||||||
});
|
|
||||||
|
|
||||||
var tileUrl = 'https://maps.aucklandcouncil.govt.nz/ArcGIS/rest/services/Aerials/MapServer/tile/{z}/{y}/{x}',
|
|
||||||
attrib = 'Auckland City Council © 2012',
|
|
||||||
tilelayer = new L.TileLayer(tileUrl, {
|
|
||||||
maxZoom: 12,
|
|
||||||
minZoom: 0,
|
|
||||||
attribution: attrib,
|
|
||||||
});
|
|
||||||
|
|
||||||
map.addLayer(tilelayer);
|
|
||||||
map.setView([-36.852931, 174.762057], 10);
|
|
@ -1,45 +0,0 @@
|
|||||||
var crs = new L.Proj.CRS('EPSG:2193',
|
|
||||||
'+proj=tmerc +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
|
|
||||||
{
|
|
||||||
origin: [-5099531.19635, 57089446.18],
|
|
||||||
resolutions: [
|
|
||||||
66.1459656252646,
|
|
||||||
33.0729828126323,
|
|
||||||
16.933367200067735,
|
|
||||||
8.466683600033868,
|
|
||||||
4.233341800016934,
|
|
||||||
2.116670900008467,
|
|
||||||
1.0583354500042335,
|
|
||||||
0.5291677250021167,
|
|
||||||
0.26458386250105836,
|
|
||||||
0.13229193125052918,
|
|
||||||
0.06614596562526459
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
var map = new L.Map('map', {
|
|
||||||
crs: crs,
|
|
||||||
continuousWorld: true,
|
|
||||||
worldCopyJump: false
|
|
||||||
});
|
|
||||||
|
|
||||||
/*
|
|
||||||
Wellington City Council's GIS web services are available under the following terms and conditions:
|
|
||||||
https://wellington.govt.nz/about-wellington/maps/gis-data-terms-and-conditions
|
|
||||||
|
|
||||||
Aerial Imagery: Creative Commons Attribution 3.0 New Zealand Licence, https://creativecommons.org/licenses/by/3.0/nz/
|
|
||||||
Additional services listed at https://wellington.govt.nz/~/media/maps/gis/ogc-services-list.pdf
|
|
||||||
*/
|
|
||||||
|
|
||||||
var tileUrl = 'https://gis.wcc.govt.nz/arcgis/rest/services/Basemap/Aerial_Photo/MapServer/tile/{z}/{y}/{x}',
|
|
||||||
attrib = 'Wellington City Council © 2012',
|
|
||||||
tilelayer = new L.TileLayer(tileUrl, {
|
|
||||||
maxZoom: 10,
|
|
||||||
minZoom: 0,
|
|
||||||
continuousWorld: true,
|
|
||||||
attribution: attrib,
|
|
||||||
tileSize: 512
|
|
||||||
});
|
|
||||||
|
|
||||||
map.addLayer(tilelayer);
|
|
||||||
map.setView([-41.288889, 174.777222], 5);
|
|
@ -1,10 +0,0 @@
|
|||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#map {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" href="style.css" />
|
|
||||||
<link rel="stylesheet" href="../../lib/leaflet/leaflet.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="map"></div>
|
|
||||||
<script src="../../lib/leaflet/leaflet.js"></script>
|
|
||||||
<script src="../../lib/proj4-compressed.js"></script>
|
|
||||||
<script src="../../src/proj4leaflet.js"></script>
|
|
||||||
<script src="script.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,21 +0,0 @@
|
|||||||
var crs = new L.Proj.CRS('EPSG:3006',
|
|
||||||
'+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
|
|
||||||
{
|
|
||||||
resolutions: [
|
|
||||||
8192, 4096, 2048, 1024, 512, 256, 128,
|
|
||||||
64, 32, 16, 8, 4, 2, 1, 0.5
|
|
||||||
],
|
|
||||||
origin: [0, 0],
|
|
||||||
bounds: L.bounds([218128.7031, 6126002.9379], [1083427.2970, 7692850.9468])
|
|
||||||
}),
|
|
||||||
map = new L.Map('map', {
|
|
||||||
crs: crs,
|
|
||||||
});
|
|
||||||
|
|
||||||
L.tileLayer('https://api.geosition.com/tile/osm-bright-3006/{z}/{x}/{y}.png', {
|
|
||||||
maxZoom: 14,
|
|
||||||
minZoom: 0,
|
|
||||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>, Imagery © <a href="http://www.kartena.se/">Kartena</a>'
|
|
||||||
}).addTo(map);
|
|
||||||
|
|
||||||
map.setView([57.704, 11.965], 13);
|
|
@ -1,10 +0,0 @@
|
|||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#map {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" href="style.css" />
|
|
||||||
<link rel="stylesheet" href="../../lib/leaflet/leaflet.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="map"></div>
|
|
||||||
<script src="../../lib/leaflet/leaflet.js"></script>
|
|
||||||
<script src="../../lib/proj4-compressed.js"></script>
|
|
||||||
<script src="../../src/proj4leaflet.js"></script>
|
|
||||||
<script src="script.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,27 +0,0 @@
|
|||||||
var crs = new L.Proj.CRS('EPSG:5181',
|
|
||||||
'+proj=tmerc +lat_0=38 +lon_0=127 +k=1 +x_0=200000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
|
|
||||||
{
|
|
||||||
resolutions: [2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5, 0.25],
|
|
||||||
origin: [-30000, -60000],
|
|
||||||
bounds: L.bounds([-30000, -60000], [494288, 464288])
|
|
||||||
}),
|
|
||||||
map = L.map('map', {
|
|
||||||
crs: crs,
|
|
||||||
continuousWorld: true,
|
|
||||||
worldCopyJump: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
new L.TileLayer('http://i{s}.maps.daum-img.net/map/image/G03/i/1.20/L{z}/{y}/{x}.png', {
|
|
||||||
maxZoom: 14,
|
|
||||||
minZoom: 0,
|
|
||||||
zoomReverse: true,
|
|
||||||
subdomains: '0123',
|
|
||||||
continuousWorld: true,
|
|
||||||
attribution: 'ⓒ Daum',
|
|
||||||
tms: true
|
|
||||||
}).addTo(map);
|
|
||||||
|
|
||||||
//Gunsan Airport
|
|
||||||
new L.marker([35.925937, 126.615810]).addTo(map);
|
|
||||||
|
|
||||||
map.setView([36.0, 127.0], 0);
|
|
@ -1,10 +0,0 @@
|
|||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#map {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" href="style.css" />
|
|
||||||
<link rel="stylesheet" href="../../lib/leaflet/leaflet.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="map"></div>
|
|
||||||
<script src="../../lib/leaflet/leaflet.js"></script>
|
|
||||||
<script src="../../lib/proj4-compressed.js"></script>
|
|
||||||
<script src="../../src/proj4leaflet.js"></script>
|
|
||||||
<script src="script.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,22 +0,0 @@
|
|||||||
var crs = new L.Proj.CRS('EPSG:3006',
|
|
||||||
'+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
|
|
||||||
{
|
|
||||||
resolutions: [
|
|
||||||
8192, 4096, 2048, 1024, 512, 256, 128,
|
|
||||||
64, 32, 16, 8, 4, 2, 1, 0.5
|
|
||||||
],
|
|
||||||
origin: [0, 0]
|
|
||||||
}),
|
|
||||||
map = new L.Map('map', {
|
|
||||||
crs: crs,
|
|
||||||
});
|
|
||||||
|
|
||||||
L.tileLayer.wms('https://geodatatest.havochvatten.se/geoservices/ows', {
|
|
||||||
layers: 'hav-bakgrundskartor:hav-grundkarta',
|
|
||||||
format: 'image/png',
|
|
||||||
maxZoom: 14,
|
|
||||||
minZoom: 0,
|
|
||||||
attribution: '© OpenStreetMap contributors <a href="https://www.havochvatten.se/kunskap-om-vara-vatten/kartor-och-geografisk-information/karttjanster.html">Havs- och vattenmyndigheten (Swedish Agency for Marine and Water Management)</a>'
|
|
||||||
}).addTo(map);
|
|
||||||
|
|
||||||
map.setView([55.8, 14.3], 3);
|
|
@ -1,10 +0,0 @@
|
|||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#map {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" href="style.css" />
|
|
||||||
<link rel="stylesheet" href="../../lib/leaflet/leaflet.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="map"></div>
|
|
||||||
<script src="../../lib/leaflet/leaflet.js"></script>
|
|
||||||
<script src="../../lib/proj4-compressed.js"></script>
|
|
||||||
<script src="../../src/proj4leaflet.js"></script>
|
|
||||||
<script src="script.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
Example using Sweden Lantmäteriet Topografisk Webbkarta
|
|
||||||
https://opendata.lantmateriet.se/#apis
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*** INSERT YOUR LANTMÄTERIET API TOKEN BELOW ***/
|
|
||||||
var token = '';
|
|
||||||
|
|
||||||
var crs = new L.Proj.CRS('EPSG:3006',
|
|
||||||
'+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
|
|
||||||
{
|
|
||||||
resolutions: [
|
|
||||||
4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8
|
|
||||||
],
|
|
||||||
origin: [-1200000.000000, 8500000.000000 ],
|
|
||||||
bounds: L.bounds( [-1200000.000000, 8500000.000000], [4305696.000000, 2994304.000000])
|
|
||||||
}),
|
|
||||||
map = new L.Map('map', {
|
|
||||||
crs: crs,
|
|
||||||
continuousWorld: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
new L.TileLayer('https://api.lantmateriet.se/open/topowebb-ccby/v1/wmts/token/'+ token +'/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=topowebb&STYLE=default&TILEMATRIXSET=3006&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=image%2Fpng', {
|
|
||||||
maxZoom: 9,
|
|
||||||
minZoom: 0,
|
|
||||||
continuousWorld: true,
|
|
||||||
attribution: '© <a href="https://www.lantmateriet.se/en/">Lantmäteriet</a> Topografisk Webbkarta Visning, CCB',
|
|
||||||
}).addTo(map);
|
|
||||||
//Set view over Stockholm Södermalm
|
|
||||||
map.setView([59.3167, 18.0667], 7);
|
|
@ -1,10 +0,0 @@
|
|||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#map {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 618 B |
@ -1,624 +0,0 @@
|
|||||||
/* required styles */
|
|
||||||
|
|
||||||
.leaflet-pane,
|
|
||||||
.leaflet-tile,
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow,
|
|
||||||
.leaflet-tile-container,
|
|
||||||
.leaflet-pane > svg,
|
|
||||||
.leaflet-pane > canvas,
|
|
||||||
.leaflet-zoom-box,
|
|
||||||
.leaflet-image-layer,
|
|
||||||
.leaflet-layer {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.leaflet-container {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.leaflet-tile,
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow {
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
-webkit-user-drag: none;
|
|
||||||
}
|
|
||||||
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
|
|
||||||
.leaflet-safari .leaflet-tile {
|
|
||||||
image-rendering: -webkit-optimize-contrast;
|
|
||||||
}
|
|
||||||
/* hack that prevents hw layers "stretching" when loading new tiles */
|
|
||||||
.leaflet-safari .leaflet-tile-container {
|
|
||||||
width: 1600px;
|
|
||||||
height: 1600px;
|
|
||||||
-webkit-transform-origin: 0 0;
|
|
||||||
}
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
|
|
||||||
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
|
|
||||||
.leaflet-container .leaflet-overlay-pane svg,
|
|
||||||
.leaflet-container .leaflet-marker-pane img,
|
|
||||||
.leaflet-container .leaflet-shadow-pane img,
|
|
||||||
.leaflet-container .leaflet-tile-pane img,
|
|
||||||
.leaflet-container img.leaflet-image-layer {
|
|
||||||
max-width: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-container.leaflet-touch-zoom {
|
|
||||||
-ms-touch-action: pan-x pan-y;
|
|
||||||
touch-action: pan-x pan-y;
|
|
||||||
}
|
|
||||||
.leaflet-container.leaflet-touch-drag {
|
|
||||||
-ms-touch-action: pinch-zoom;
|
|
||||||
}
|
|
||||||
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
|
|
||||||
-ms-touch-action: none;
|
|
||||||
touch-action: none;
|
|
||||||
}
|
|
||||||
.leaflet-tile {
|
|
||||||
filter: inherit;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
.leaflet-tile-loaded {
|
|
||||||
visibility: inherit;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
z-index: 800;
|
|
||||||
}
|
|
||||||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
|
||||||
.leaflet-overlay-pane svg {
|
|
||||||
-moz-user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-pane { z-index: 400; }
|
|
||||||
|
|
||||||
.leaflet-tile-pane { z-index: 200; }
|
|
||||||
.leaflet-overlay-pane { z-index: 400; }
|
|
||||||
.leaflet-shadow-pane { z-index: 500; }
|
|
||||||
.leaflet-marker-pane { z-index: 600; }
|
|
||||||
.leaflet-tooltip-pane { z-index: 650; }
|
|
||||||
.leaflet-popup-pane { z-index: 700; }
|
|
||||||
|
|
||||||
.leaflet-map-pane canvas { z-index: 100; }
|
|
||||||
.leaflet-map-pane svg { z-index: 200; }
|
|
||||||
|
|
||||||
.leaflet-vml-shape {
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
.lvml {
|
|
||||||
behavior: url(#default#VML);
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* control positioning */
|
|
||||||
|
|
||||||
.leaflet-control {
|
|
||||||
position: relative;
|
|
||||||
z-index: 800;
|
|
||||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
.leaflet-top,
|
|
||||||
.leaflet-bottom {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 1000;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.leaflet-top {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.leaflet-right {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
.leaflet-bottom {
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
.leaflet-left {
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
.leaflet-control {
|
|
||||||
float: left;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.leaflet-right .leaflet-control {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
.leaflet-top .leaflet-control {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-bottom .leaflet-control {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-left .leaflet-control {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-right .leaflet-control {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* zoom and fade animations */
|
|
||||||
|
|
||||||
.leaflet-fade-anim .leaflet-tile {
|
|
||||||
will-change: opacity;
|
|
||||||
}
|
|
||||||
.leaflet-fade-anim .leaflet-popup {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: opacity 0.2s linear;
|
|
||||||
-moz-transition: opacity 0.2s linear;
|
|
||||||
-o-transition: opacity 0.2s linear;
|
|
||||||
transition: opacity 0.2s linear;
|
|
||||||
}
|
|
||||||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-animated {
|
|
||||||
-webkit-transform-origin: 0 0;
|
|
||||||
-ms-transform-origin: 0 0;
|
|
||||||
transform-origin: 0 0;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
|
||||||
will-change: transform;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
|
||||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
}
|
|
||||||
.leaflet-zoom-anim .leaflet-tile,
|
|
||||||
.leaflet-pan-anim .leaflet-tile {
|
|
||||||
-webkit-transition: none;
|
|
||||||
-moz-transition: none;
|
|
||||||
-o-transition: none;
|
|
||||||
transition: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* cursors */
|
|
||||||
|
|
||||||
.leaflet-interactive {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.leaflet-grab {
|
|
||||||
cursor: -webkit-grab;
|
|
||||||
cursor: -moz-grab;
|
|
||||||
}
|
|
||||||
.leaflet-crosshair,
|
|
||||||
.leaflet-crosshair .leaflet-interactive {
|
|
||||||
cursor: crosshair;
|
|
||||||
}
|
|
||||||
.leaflet-popup-pane,
|
|
||||||
.leaflet-control {
|
|
||||||
cursor: auto;
|
|
||||||
}
|
|
||||||
.leaflet-dragging .leaflet-grab,
|
|
||||||
.leaflet-dragging .leaflet-grab .leaflet-interactive,
|
|
||||||
.leaflet-dragging .leaflet-marker-draggable {
|
|
||||||
cursor: move;
|
|
||||||
cursor: -webkit-grabbing;
|
|
||||||
cursor: -moz-grabbing;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* marker & overlays interactivity */
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow,
|
|
||||||
.leaflet-image-layer,
|
|
||||||
.leaflet-pane > svg path,
|
|
||||||
.leaflet-tile-container {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-marker-icon.leaflet-interactive,
|
|
||||||
.leaflet-image-layer.leaflet-interactive,
|
|
||||||
.leaflet-pane > svg path.leaflet-interactive {
|
|
||||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* visual tweaks */
|
|
||||||
|
|
||||||
.leaflet-container {
|
|
||||||
background: #ddd;
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
.leaflet-container a {
|
|
||||||
color: #0078A8;
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-active {
|
|
||||||
outline: 2px solid orange;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
|
||||||
border: 2px dotted #38f;
|
|
||||||
background: rgba(255,255,255,0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* general typography */
|
|
||||||
.leaflet-container {
|
|
||||||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* general toolbar styles */
|
|
||||||
|
|
||||||
.leaflet-bar {
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.leaflet-bar a,
|
|
||||||
.leaflet-bar a:hover {
|
|
||||||
background-color: #fff;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
width: 26px;
|
|
||||||
height: 26px;
|
|
||||||
line-height: 26px;
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
text-decoration: none;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
.leaflet-bar a,
|
|
||||||
.leaflet-control-layers-toggle {
|
|
||||||
background-position: 50% 50%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:hover {
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:first-child {
|
|
||||||
border-top-left-radius: 4px;
|
|
||||||
border-top-right-radius: 4px;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:last-child {
|
|
||||||
border-bottom-left-radius: 4px;
|
|
||||||
border-bottom-right-radius: 4px;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.leaflet-bar a.leaflet-disabled {
|
|
||||||
cursor: default;
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
color: #bbb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-bar a {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* zoom control */
|
|
||||||
|
|
||||||
.leaflet-control-zoom-in,
|
|
||||||
.leaflet-control-zoom-out {
|
|
||||||
font: bold 18px 'Lucida Console', Monaco, monospace;
|
|
||||||
text-indent: 1px;
|
|
||||||
}
|
|
||||||
.leaflet-control-zoom-out {
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-control-zoom-in {
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-zoom-out {
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* layers control */
|
|
||||||
|
|
||||||
.leaflet-control-layers {
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-toggle {
|
|
||||||
background-image: url(images/layers.png);
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
}
|
|
||||||
.leaflet-retina .leaflet-control-layers-toggle {
|
|
||||||
background-image: url(images/layers-2x.png);
|
|
||||||
background-size: 26px 26px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-layers-toggle {
|
|
||||||
width: 44px;
|
|
||||||
height: 44px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers .leaflet-control-layers-list,
|
|
||||||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-expanded {
|
|
||||||
padding: 6px 10px 6px 6px;
|
|
||||||
color: #333;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-scrollbar {
|
|
||||||
overflow-y: scroll;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-selector {
|
|
||||||
margin-top: 2px;
|
|
||||||
position: relative;
|
|
||||||
top: 1px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers label {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-separator {
|
|
||||||
height: 0;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
margin: 5px -10px 5px -6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Default icon URLs */
|
|
||||||
.leaflet-default-icon-path {
|
|
||||||
background-image: url(images/marker-icon.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* attribution and scale controls */
|
|
||||||
|
|
||||||
.leaflet-container .leaflet-control-attribution {
|
|
||||||
background: #fff;
|
|
||||||
background: rgba(255, 255, 255, 0.7);
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution,
|
|
||||||
.leaflet-control-scale-line {
|
|
||||||
padding: 0 5px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
.leaflet-container .leaflet-control-attribution,
|
|
||||||
.leaflet-container .leaflet-control-scale {
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
.leaflet-left .leaflet-control-scale {
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-bottom .leaflet-control-scale {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line {
|
|
||||||
border: 2px solid #777;
|
|
||||||
border-top: none;
|
|
||||||
line-height: 1.1;
|
|
||||||
padding: 2px 5px 1px;
|
|
||||||
font-size: 11px;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
background: #fff;
|
|
||||||
background: rgba(255, 255, 255, 0.5);
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line:not(:first-child) {
|
|
||||||
border-top: 2px solid #777;
|
|
||||||
border-bottom: none;
|
|
||||||
margin-top: -2px;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
|
||||||
border-bottom: 2px solid #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-control-attribution,
|
|
||||||
.leaflet-touch .leaflet-control-layers,
|
|
||||||
.leaflet-touch .leaflet-bar {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-layers,
|
|
||||||
.leaflet-touch .leaflet-bar {
|
|
||||||
border: 2px solid rgba(0,0,0,0.2);
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* popup */
|
|
||||||
|
|
||||||
.leaflet-popup {
|
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content-wrapper {
|
|
||||||
padding: 1px;
|
|
||||||
text-align: left;
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content {
|
|
||||||
margin: 13px 19px;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content p {
|
|
||||||
margin: 18px 0;
|
|
||||||
}
|
|
||||||
.leaflet-popup-tip-container {
|
|
||||||
width: 40px;
|
|
||||||
height: 20px;
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -20px;
|
|
||||||
overflow: hidden;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.leaflet-popup-tip {
|
|
||||||
width: 17px;
|
|
||||||
height: 17px;
|
|
||||||
padding: 1px;
|
|
||||||
|
|
||||||
margin: -10px auto 0;
|
|
||||||
|
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
-moz-transform: rotate(45deg);
|
|
||||||
-ms-transform: rotate(45deg);
|
|
||||||
-o-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
|
||||||
}
|
|
||||||
.leaflet-popup-content-wrapper,
|
|
||||||
.leaflet-popup-tip {
|
|
||||||
background: white;
|
|
||||||
color: #333;
|
|
||||||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-popup-close-button {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
padding: 4px 4px 0 0;
|
|
||||||
border: none;
|
|
||||||
text-align: center;
|
|
||||||
width: 18px;
|
|
||||||
height: 14px;
|
|
||||||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
|
||||||
color: #c3c3c3;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: bold;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
.leaflet-popup-scrolled {
|
|
||||||
overflow: auto;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
|
||||||
zoom: 1;
|
|
||||||
}
|
|
||||||
.leaflet-oldie .leaflet-popup-tip {
|
|
||||||
width: 24px;
|
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
|
||||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
|
||||||
}
|
|
||||||
.leaflet-oldie .leaflet-popup-tip-container {
|
|
||||||
margin-top: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-control-zoom,
|
|
||||||
.leaflet-oldie .leaflet-control-layers,
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper,
|
|
||||||
.leaflet-oldie .leaflet-popup-tip {
|
|
||||||
border: 1px solid #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* div icon */
|
|
||||||
|
|
||||||
.leaflet-div-icon {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Tooltip */
|
|
||||||
/* Base styles for the element that has a tooltip */
|
|
||||||
.leaflet-tooltip {
|
|
||||||
position: absolute;
|
|
||||||
padding: 6px;
|
|
||||||
background-color: #fff;
|
|
||||||
border: 1px solid #fff;
|
|
||||||
border-radius: 3px;
|
|
||||||
color: #222;
|
|
||||||
white-space: nowrap;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
pointer-events: none;
|
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
.leaflet-tooltip.leaflet-clickable {
|
|
||||||
cursor: pointer;
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-top:before,
|
|
||||||
.leaflet-tooltip-bottom:before,
|
|
||||||
.leaflet-tooltip-left:before,
|
|
||||||
.leaflet-tooltip-right:before {
|
|
||||||
position: absolute;
|
|
||||||
pointer-events: none;
|
|
||||||
border: 6px solid transparent;
|
|
||||||
background: transparent;
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Directions */
|
|
||||||
|
|
||||||
.leaflet-tooltip-bottom {
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-top {
|
|
||||||
margin-top: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-bottom:before,
|
|
||||||
.leaflet-tooltip-top:before {
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-top:before {
|
|
||||||
bottom: 0;
|
|
||||||
margin-bottom: -12px;
|
|
||||||
border-top-color: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-bottom:before {
|
|
||||||
top: 0;
|
|
||||||
margin-top: -12px;
|
|
||||||
margin-left: -6px;
|
|
||||||
border-bottom-color: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-left {
|
|
||||||
margin-left: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-right {
|
|
||||||
margin-left: 6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-left:before,
|
|
||||||
.leaflet-tooltip-right:before {
|
|
||||||
top: 50%;
|
|
||||||
margin-top: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-left:before {
|
|
||||||
right: 0;
|
|
||||||
margin-right: -12px;
|
|
||||||
border-left-color: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-right:before {
|
|
||||||
left: 0;
|
|
||||||
margin-left: -12px;
|
|
||||||
border-right-color: #fff;
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "proj4leaflet",
|
|
||||||
"version": "1.0.1",
|
|
||||||
"description": "Smooth Proj4js integration with Leaflet",
|
|
||||||
"main": "src/proj4leaflet.js",
|
|
||||||
"directories": {
|
|
||||||
"test": "test",
|
|
||||||
"example": "examples"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha-phantomjs test/mocha.html"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/kartena/Proj4Leaflet.git"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"maps",
|
|
||||||
"proj4",
|
|
||||||
"projection",
|
|
||||||
"leaflet"
|
|
||||||
],
|
|
||||||
"author": "Per Liedman <per.liedman@kartena.se> (https://github.com/perliedman/)",
|
|
||||||
"contributors": [
|
|
||||||
"Peter Thorin (https://github.com/pthorin/)",
|
|
||||||
"Semone Kallin Thander (https://github.com/semone/)",
|
|
||||||
"S. Andrew Sheppard (https://github.com/sheppard)",
|
|
||||||
"Leigh Hunt (https://github.com/leighghunt/)",
|
|
||||||
"Andris Nolendorfs (https://github.com/theashyster)",
|
|
||||||
"Vladimir Agafonkin (https://github.com/mourner)",
|
|
||||||
"Juuso Lehtinen (https://github.com/jleh)",
|
|
||||||
"Mattias Bengtsson (https://github.com/moonlite/)",
|
|
||||||
"Denis Rykov (http://github.com/drnextgis) ",
|
|
||||||
"Jose manuel Vivó Arnal (Chema) (http://github.com/jmvivo) ",
|
|
||||||
"Daniel Garcia (http://github.com/keyjote) ",
|
|
||||||
"Mathieu Leplatre (https://github.com/leplatrem)",
|
|
||||||
"Benny Lichtner (http://github.com/bennlich) ",
|
|
||||||
"Christopher Fredén (https://github.com/icetan/)",
|
|
||||||
"dpzaba (http://github.com/dpzaba) ",
|
|
||||||
"Edward Mac Gillavry (http://github.com/emacgillavry) ",
|
|
||||||
"Emil Goude (http://github.com/Stockholmsnovis) ",
|
|
||||||
"Simon Legner (http://github.com/simon04) ",
|
|
||||||
"Tom Blackmore (http://github.com/tablackmore) ",
|
|
||||||
"Fabien NICOLLET (https://github.com/fnicollet)"
|
|
||||||
],
|
|
||||||
"license": "BSD-2-Clause",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/kartena/Proj4Leaflet/issues"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"proj4": "^2.3.14"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"mocha": "^3.2.0",
|
|
||||||
"mocha-phantomjs": "^4.1.0"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,263 +0,0 @@
|
|||||||
(function (factory) {
|
|
||||||
var L, proj4;
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
// AMD
|
|
||||||
define(['leaflet', 'proj4'], factory);
|
|
||||||
} else if (typeof module === 'object' && typeof module.exports === "object") {
|
|
||||||
// Node/CommonJS
|
|
||||||
L = require('leaflet');
|
|
||||||
proj4 = require('proj4');
|
|
||||||
module.exports = factory(L, proj4);
|
|
||||||
} else {
|
|
||||||
// Browser globals
|
|
||||||
if (typeof window.L === 'undefined' || typeof window.proj4 === 'undefined')
|
|
||||||
throw 'Leaflet and proj4 must be loaded first';
|
|
||||||
factory(window.L, window.proj4);
|
|
||||||
}
|
|
||||||
}(function (L, proj4) {
|
|
||||||
|
|
||||||
L.Proj = {};
|
|
||||||
|
|
||||||
L.Proj._isProj4Obj = function(a) {
|
|
||||||
return (typeof a.inverse !== 'undefined' &&
|
|
||||||
typeof a.forward !== 'undefined');
|
|
||||||
};
|
|
||||||
|
|
||||||
L.Proj.Projection = L.Class.extend({
|
|
||||||
initialize: function(code, def, bounds) {
|
|
||||||
var isP4 = L.Proj._isProj4Obj(code);
|
|
||||||
this._proj = isP4 ? code : this._projFromCodeDef(code, def);
|
|
||||||
this.bounds = isP4 ? def : bounds;
|
|
||||||
},
|
|
||||||
|
|
||||||
project: function (latlng) {
|
|
||||||
var point = this._proj.forward([latlng.lng, latlng.lat]);
|
|
||||||
return new L.Point(point[0], point[1]);
|
|
||||||
},
|
|
||||||
|
|
||||||
unproject: function (point, unbounded) {
|
|
||||||
var point2 = this._proj.inverse([point.x, point.y]);
|
|
||||||
return new L.LatLng(point2[1], point2[0], unbounded);
|
|
||||||
},
|
|
||||||
|
|
||||||
_projFromCodeDef: function(code, def) {
|
|
||||||
if (def) {
|
|
||||||
proj4.defs(code, def);
|
|
||||||
} else if (proj4.defs[code] === undefined) {
|
|
||||||
var urn = code.split(':');
|
|
||||||
if (urn.length > 3) {
|
|
||||||
code = urn[urn.length - 3] + ':' + urn[urn.length - 1];
|
|
||||||
}
|
|
||||||
if (proj4.defs[code] === undefined) {
|
|
||||||
throw 'No projection definition for code ' + code;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return proj4(code);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
L.Proj.CRS = L.Class.extend({
|
|
||||||
includes: L.CRS,
|
|
||||||
|
|
||||||
options: {
|
|
||||||
transformation: new L.Transformation(1, 0, -1, 0)
|
|
||||||
},
|
|
||||||
|
|
||||||
initialize: function(a, b, c) {
|
|
||||||
var code,
|
|
||||||
proj,
|
|
||||||
def,
|
|
||||||
options;
|
|
||||||
|
|
||||||
if (L.Proj._isProj4Obj(a)) {
|
|
||||||
proj = a;
|
|
||||||
code = proj.srsCode;
|
|
||||||
options = b || {};
|
|
||||||
|
|
||||||
this.projection = new L.Proj.Projection(proj, options.bounds);
|
|
||||||
} else {
|
|
||||||
code = a;
|
|
||||||
def = b;
|
|
||||||
options = c || {};
|
|
||||||
this.projection = new L.Proj.Projection(code, def, options.bounds);
|
|
||||||
}
|
|
||||||
|
|
||||||
L.Util.setOptions(this, options);
|
|
||||||
this.code = code;
|
|
||||||
this.transformation = this.options.transformation;
|
|
||||||
|
|
||||||
if (this.options.origin) {
|
|
||||||
this.transformation =
|
|
||||||
new L.Transformation(1, -this.options.origin[0],
|
|
||||||
-1, this.options.origin[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.options.scales) {
|
|
||||||
this._scales = this.options.scales;
|
|
||||||
} else if (this.options.resolutions) {
|
|
||||||
this._scales = [];
|
|
||||||
for (var i = this.options.resolutions.length - 1; i >= 0; i--) {
|
|
||||||
if (this.options.resolutions[i]) {
|
|
||||||
this._scales[i] = 1 / this.options.resolutions[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.infinite = !this.options.bounds;
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
scale: function(zoom) {
|
|
||||||
var iZoom = Math.floor(zoom),
|
|
||||||
baseScale,
|
|
||||||
nextScale,
|
|
||||||
scaleDiff,
|
|
||||||
zDiff;
|
|
||||||
if (zoom === iZoom) {
|
|
||||||
return this._scales[zoom];
|
|
||||||
} else {
|
|
||||||
// Non-integer zoom, interpolate
|
|
||||||
baseScale = this._scales[iZoom];
|
|
||||||
nextScale = this._scales[iZoom + 1];
|
|
||||||
scaleDiff = nextScale - baseScale;
|
|
||||||
zDiff = (zoom - iZoom);
|
|
||||||
return baseScale + scaleDiff * zDiff;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
zoom: function(scale) {
|
|
||||||
// Find closest number in this._scales, down
|
|
||||||
var downScale = this._closestElement(this._scales, scale),
|
|
||||||
downZoom = this._scales.indexOf(downScale),
|
|
||||||
nextScale,
|
|
||||||
nextZoom,
|
|
||||||
scaleDiff;
|
|
||||||
// Check if scale is downScale => return array index
|
|
||||||
if (scale === downScale) {
|
|
||||||
return downZoom;
|
|
||||||
}
|
|
||||||
// Interpolate
|
|
||||||
nextZoom = downZoom + 1;
|
|
||||||
nextScale = this._scales[nextZoom];
|
|
||||||
if (nextScale === undefined) {
|
|
||||||
return Infinity;
|
|
||||||
}
|
|
||||||
scaleDiff = nextScale - downScale;
|
|
||||||
return (scale - downScale) / scaleDiff + downZoom;
|
|
||||||
},
|
|
||||||
|
|
||||||
distance: L.CRS.Earth.distance,
|
|
||||||
|
|
||||||
R: L.CRS.Earth.R,
|
|
||||||
|
|
||||||
/* Get the closest lowest element in an array */
|
|
||||||
_closestElement: function(array, element) {
|
|
||||||
var low;
|
|
||||||
for (var i = array.length; i--;) {
|
|
||||||
if (array[i] <= element && (low === undefined || low < array[i])) {
|
|
||||||
low = array[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return low;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
L.Proj.GeoJSON = L.GeoJSON.extend({
|
|
||||||
initialize: function(geojson, options) {
|
|
||||||
this._callLevel = 0;
|
|
||||||
L.GeoJSON.prototype.initialize.call(this, geojson, options);
|
|
||||||
},
|
|
||||||
|
|
||||||
addData: function(geojson) {
|
|
||||||
var crs;
|
|
||||||
|
|
||||||
if (geojson) {
|
|
||||||
if (geojson.crs && geojson.crs.type === 'name') {
|
|
||||||
crs = new L.Proj.CRS(geojson.crs.properties.name);
|
|
||||||
} else if (geojson.crs && geojson.crs.type) {
|
|
||||||
crs = new L.Proj.CRS(geojson.crs.type + ':' + geojson.crs.properties.code);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (crs !== undefined) {
|
|
||||||
this.options.coordsToLatLng = function(coords) {
|
|
||||||
var point = L.point(coords[0], coords[1]);
|
|
||||||
return crs.projection.unproject(point);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Base class' addData might call us recursively, but
|
|
||||||
// CRS shouldn't be cleared in that case, since CRS applies
|
|
||||||
// to the whole GeoJSON, inluding sub-features.
|
|
||||||
this._callLevel++;
|
|
||||||
try {
|
|
||||||
L.GeoJSON.prototype.addData.call(this, geojson);
|
|
||||||
} finally {
|
|
||||||
this._callLevel--;
|
|
||||||
if (this._callLevel === 0) {
|
|
||||||
delete this.options.coordsToLatLng;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
L.Proj.geoJson = function(geojson, options) {
|
|
||||||
return new L.Proj.GeoJSON(geojson, options);
|
|
||||||
};
|
|
||||||
|
|
||||||
L.Proj.ImageOverlay = L.ImageOverlay.extend({
|
|
||||||
initialize: function (url, bounds, options) {
|
|
||||||
L.ImageOverlay.prototype.initialize.call(this, url, null, options);
|
|
||||||
this._projectedBounds = bounds;
|
|
||||||
},
|
|
||||||
|
|
||||||
// Danger ahead: Overriding internal methods in Leaflet.
|
|
||||||
// Decided to do this rather than making a copy of L.ImageOverlay
|
|
||||||
// and doing very tiny modifications to it.
|
|
||||||
// Future will tell if this was wise or not.
|
|
||||||
_animateZoom: function (event) {
|
|
||||||
var scale = this._map.getZoomScale(event.zoom);
|
|
||||||
var northWest = L.point(this._projectedBounds.min.x, this._projectedBounds.max.y);
|
|
||||||
var offset = this._projectedToNewLayerPoint(northWest, event.zoom, event.center);
|
|
||||||
|
|
||||||
L.DomUtil.setTransform(this._image, offset, scale);
|
|
||||||
},
|
|
||||||
|
|
||||||
_reset: function () {
|
|
||||||
var zoom = this._map.getZoom();
|
|
||||||
var pixelOrigin = this._map.getPixelOrigin();
|
|
||||||
var bounds = L.bounds(
|
|
||||||
this._transform(this._projectedBounds.min, zoom)._subtract(pixelOrigin),
|
|
||||||
this._transform(this._projectedBounds.max, zoom)._subtract(pixelOrigin)
|
|
||||||
);
|
|
||||||
var size = bounds.getSize();
|
|
||||||
|
|
||||||
L.DomUtil.setPosition(this._image, bounds.min);
|
|
||||||
this._image.style.width = size.x + 'px';
|
|
||||||
this._image.style.height = size.y + 'px';
|
|
||||||
},
|
|
||||||
|
|
||||||
_projectedToNewLayerPoint: function (point, zoom, center) {
|
|
||||||
var viewHalf = this._map.getSize()._divideBy(2);
|
|
||||||
var newTopLeft = this._map.project(center, zoom)._subtract(viewHalf)._round();
|
|
||||||
var topLeft = newTopLeft.add(this._map._getMapPanePos());
|
|
||||||
|
|
||||||
return this._transform(point, zoom)._subtract(topLeft);
|
|
||||||
},
|
|
||||||
|
|
||||||
_transform: function (point, zoom) {
|
|
||||||
var crs = this._map.options.crs;
|
|
||||||
var transformation = crs.transformation;
|
|
||||||
var scale = crs.scale(zoom);
|
|
||||||
|
|
||||||
return transformation.transform(point, scale);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
L.Proj.imageOverlay = function (url, bounds, options) {
|
|
||||||
return new L.Proj.ImageOverlay(url, bounds, options);
|
|
||||||
};
|
|
||||||
|
|
||||||
return L.Proj;
|
|
||||||
}));
|
|
@ -1,29 +0,0 @@
|
|||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Mocha Tests</title>
|
|
||||||
<link href="http://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.css" rel="stylesheet" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="mocha"></div>
|
|
||||||
|
|
||||||
<script src="http://cdn.rawgit.com/Automattic/expect.js/0.3.1/index.js"></script>
|
|
||||||
<script src="http://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.js"></script>
|
|
||||||
|
|
||||||
<script>mocha.setup('bdd')</script>
|
|
||||||
<!-- include source files here... -->
|
|
||||||
<script type="text/javascript" src="../lib/leaflet/leaflet-src.js"></script>
|
|
||||||
<script type="text/javascript" src="../lib/proj4-compressed.js"></script>
|
|
||||||
<script type="text/javascript" src="../src/proj4leaflet.js"></script>
|
|
||||||
|
|
||||||
<!-- include spec files here... -->
|
|
||||||
<script type="text/javascript" src="test-data.js"></script>
|
|
||||||
<script type="text/javascript" src="specs.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
mocha.checkLeaks();
|
|
||||||
mocha.globals(['jQuery']);
|
|
||||||
mocha.run();
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,184 +0,0 @@
|
|||||||
|
|
||||||
describe('L.Proj.Projection', function() {
|
|
||||||
it('can create an instance from a SRS code and proj4 def', function() {
|
|
||||||
new L.Proj.Projection(
|
|
||||||
'EPSG:2400',
|
|
||||||
'+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 ' +
|
|
||||||
'+y_0=0.0 +proj=tmerc +ellps=bessel +units=m ' +
|
|
||||||
'+towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('L.Proj.CRS', function() {
|
|
||||||
it('can create an instance from a SRS code and proj4 def', function() {
|
|
||||||
var crs = new L.Proj.CRS(
|
|
||||||
'EPSG:2400',
|
|
||||||
'+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 ' +
|
|
||||||
'+y_0=0.0 +proj=tmerc +ellps=bessel +units=m ' +
|
|
||||||
'+towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs');
|
|
||||||
|
|
||||||
expect(crs.code).to.be('EPSG:2400');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can project a coordinate to a point in the defined SRS', function() {
|
|
||||||
var crs = new L.Proj.CRS(
|
|
||||||
'EPSG:2400',
|
|
||||||
'+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 ' +
|
|
||||||
'+y_0=0.0 +proj=tmerc +ellps=bessel +units=m ' +
|
|
||||||
'+towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs');
|
|
||||||
|
|
||||||
var pp = crs.project(new L.LatLng(55.723337, 14.194313));
|
|
||||||
expect(pp.x).to.be.within(1398775, 1398777);
|
|
||||||
expect(pp.y).to.be.within(6178303, 6178305);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a default transformation that is [1, 0, -1, 0]', function() {
|
|
||||||
var crs = new L.Proj.CRS('EPSG:4326', '', {
|
|
||||||
resolutions: [1]
|
|
||||||
});
|
|
||||||
var ll = new L.LatLng(1, 1),
|
|
||||||
pp = crs.latLngToPoint(ll, 0),
|
|
||||||
up = crs.pointToLatLng(pp, 0);
|
|
||||||
|
|
||||||
expect(pp.x).to.be(ll.lng);
|
|
||||||
expect(pp.y).to.be(-ll.lat);
|
|
||||||
expect(up.lat).to.be(ll.lng);
|
|
||||||
expect(up.lng).to.be(ll.lat);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('uses provided zoom level scales', function() {
|
|
||||||
var crs = new L.Proj.CRS('EPSG:4326', '', {
|
|
||||||
scales: [1, 2, 3]
|
|
||||||
});
|
|
||||||
var ll = new L.LatLng(1, 1);
|
|
||||||
|
|
||||||
for (var i = 0; i < 3; i++) {
|
|
||||||
var pp = crs.latLngToPoint(ll, i),
|
|
||||||
up = crs.pointToLatLng(pp, i),
|
|
||||||
s = i + 1;
|
|
||||||
|
|
||||||
expect(pp.x).to.be(ll.lng * s);
|
|
||||||
expect(pp.y).to.be(-ll.lat * s);
|
|
||||||
expect(up.lat).to.be(ll.lng);
|
|
||||||
expect(up.lng).to.be(ll.lat);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it('uses provided zoom level resolutions', function() {
|
|
||||||
var crs = new L.Proj.CRS('EPSG:4326', '', {
|
|
||||||
resolutions: [1, 0.5, 1 / 3]
|
|
||||||
});
|
|
||||||
var ll = new L.LatLng(1, 1);
|
|
||||||
|
|
||||||
for (var i = 0; i < 3; i++) {
|
|
||||||
var pp = crs.latLngToPoint(ll, i),
|
|
||||||
up = crs.pointToLatLng(pp, i),
|
|
||||||
s = i + 1;
|
|
||||||
expect(pp.x).to.be(ll.lng * s);
|
|
||||||
expect(pp.y).to.be(-ll.lat * s);
|
|
||||||
expect(up.lat).to.be(ll.lng);
|
|
||||||
expect(up.lng).to.be(ll.lat);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it('uses provided origin', function() {
|
|
||||||
var crs = new L.Proj.CRS('EPSG:4326', '', {
|
|
||||||
resolutions: [1],
|
|
||||||
origin: [10, 10]
|
|
||||||
});
|
|
||||||
|
|
||||||
var ll = new L.LatLng(12, 12),
|
|
||||||
pp = crs.latLngToPoint(ll, 0),
|
|
||||||
up = crs.pointToLatLng(pp, 0);
|
|
||||||
|
|
||||||
expect(pp.x.toPrecision(6)).to.be((ll.lng - 10).toPrecision(6));
|
|
||||||
expect(pp.y.toPrecision(6)).to.be((-ll.lat + 10).toPrecision(6));
|
|
||||||
expect(up.lat.toPrecision(6)).to.be(ll.lng.toPrecision(6));
|
|
||||||
expect(up.lng.toPrecision(6)).to.be(ll.lat.toPrecision(6));
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
it('accepts custom transformation', function() {
|
|
||||||
var crs = new L.Proj.CRS('EPSG:4326', '', {
|
|
||||||
resolutions: [1],
|
|
||||||
transformation: new L.Transformation(3, 0, 1, -5)
|
|
||||||
});
|
|
||||||
|
|
||||||
var ll = new L.LatLng(10, 10),
|
|
||||||
pp = crs.latLngToPoint(ll, 0),
|
|
||||||
up = crs.pointToLatLng(pp, 0);
|
|
||||||
|
|
||||||
expect(pp.x).to.be(ll.lng * 3);
|
|
||||||
expect(pp.y).to.be(ll.lat - 5);
|
|
||||||
expect(up.lat).to.be(ll.lng);
|
|
||||||
expect(up.lng).to.be(ll.lat);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('size from bounds', function() {
|
|
||||||
var resolutions = [2, 1, 0.5],
|
|
||||||
crs = new L.Proj.CRS(
|
|
||||||
'EPSG:2400',
|
|
||||||
'+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 ' +
|
|
||||||
'+y_0=0.0 +proj=tmerc +ellps=bessel +units=m ' +
|
|
||||||
'+towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs', {
|
|
||||||
bounds: L.bounds([0, 0], [4000, 5000]),
|
|
||||||
resolutions: resolutions,
|
|
||||||
origin: [0, 5000]
|
|
||||||
}),
|
|
||||||
worldSize = 256,
|
|
||||||
i,
|
|
||||||
bounds;
|
|
||||||
|
|
||||||
for (i = 0; i < resolutions.length; i++) {
|
|
||||||
bounds = crs.getProjectedBounds(i);
|
|
||||||
expect(bounds.max.x).to.be(4000 / resolutions[i]);
|
|
||||||
expect(bounds.max.y).to.be(5000 / resolutions[i]);
|
|
||||||
worldSize *= 2;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it('converts zoom to scale and vice versa and returns the same values', function () {
|
|
||||||
var crs = new L.Proj.CRS('EPSG:3006',
|
|
||||||
'+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
|
|
||||||
{
|
|
||||||
resolutions: [
|
|
||||||
8192, 4096, 2048, 1024, 512, 256, 128,
|
|
||||||
64, 32, 16, 8, 4, 2, 1, 0.5
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(crs.zoom(crs.scale(8.9578457485))).to.be(8.9578457485);
|
|
||||||
expect(crs.zoom(crs.scale(8))).to.be(8);
|
|
||||||
expect(crs.zoom(crs.scale(1/8191)).toPrecision(6)).to.be((1/8191).toPrecision(6));
|
|
||||||
expect(crs.zoom(crs.scale(0.5))).to.be(0.5);
|
|
||||||
expect(crs.zoom(crs.scale(0.51))).to.be(0.51);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('converts scale to zoom and returns Infinity if the scale passed in is bigger than maximum scale', function () {
|
|
||||||
var crs = new L.Proj.CRS('EPSG:3006', '', {
|
|
||||||
scales: [1, 2, 3]
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(crs.zoom(4)).to.be(Infinity);
|
|
||||||
expect(crs.zoom(Infinity)).to.be(Infinity);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('tests that distance works (L.CRS.Earth.Distance)', function testDistance() {
|
|
||||||
var crs = new L.Proj.CRS('EPSG:3006', '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs', {
|
|
||||||
scales: [1, 2, 3]
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(
|
|
||||||
crs.distance(
|
|
||||||
crs.unproject(new L.Point(218128, 6126002)),
|
|
||||||
crs.unproject(new L.Point(218128, 6126003))))
|
|
||||||
.to.be.within(0.9, 1);
|
|
||||||
|
|
||||||
expect(
|
|
||||||
crs.distance(new L.LatLng(57.777, 11.9), new L.LatLng(57.778, 11.9)))
|
|
||||||
.to.be.within(111.194, 111.195);
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,9 +0,0 @@
|
|||||||
if [ -f contributors ];
|
|
||||||
then
|
|
||||||
rm contributors
|
|
||||||
fi
|
|
||||||
for x
|
|
||||||
in `curl -K contributors.curl | grep -E -w 'url' | grep -o -E 'https[^"]+'`
|
|
||||||
do
|
|
||||||
curl -XGET --url $x -o -| grep -E 'name|html_url' >> contributors
|
|
||||||
done
|
|
@ -1,3 +0,0 @@
|
|||||||
-XGET
|
|
||||||
--url "https://api.github.com/repos/kartena/Proj4Leaflet/contributors?anon=0"
|
|
||||||
-o -
|
|
Before Width: | Height: | Size: 1.2 KiB |