Commit 39827c96 authored by Adrien Pavie's avatar Adrien Pavie
Browse files

Doc for dependencies install, better error message for website

parent cafa508a
......@@ -8,16 +8,55 @@ GéoDataMine est un outil simple d'extraction thématique de données OpenStreet
L'outil est disponible à cette adresse : [geodatamine.fr](https://geodatamine.fr)
## Dépendances
## Installation
Les dépendances sont les suivantes :
* NodeJS >= 9
* PostgreSQL >= 9.6 et ses extensions PostGIS et HStore
* wget
* [osm2pgsql](https://github.com/openstreetmap/osm2pgsql)
* [jq](https://stedolan.github.io/jq/)
* GDAL >= 3 (et en particulier la commande `ogr2ogr`)
* GDAL >= 2.1 (et en particulier la commande `ogr2ogr`)
* zip
Installation des dépendances sous Debian 9 :
```bash
sudo apt-get install wget zip jq gdal-bin
cd ~
# Node JS 12
wget https://deb.nodesource.com/setup_12.x -O nodejs.sh
sudo bash nodejs.sh
sudo apt-get install nodejs
rm nodejs.sh
# Osm2PgSQL latest
sudo apt-get install git make cmake g++ libboost-dev libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libbz2-dev libpq-dev libproj-dev lua5.2 liblua5.2-dev
git clone git://github.com/openstreetmap/osm2pgsql.git
cd osm2pgsql
mkdir build && cd build
cmake ..
make
sudo make install
cd ../../
rm -rf osm2pgsql
# PostgreSQL 11
sudo echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-11 postgresql-client-11 postgresql-11-postgis-3
```
Téléchargement du code de GéoDataMine :
```bash
git clone https://framagit.org/PanierAvide/GeoDataMine.git
cd GeoDataMine
```
## Configuration
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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="128"
height="128"
viewBox="0 0 33.866666 33.866668"
version="1.1"
id="svg1209"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="geodatamine_fail.svg"
inkscape:export-filename="/home/adrien/Stockage/my.pavie.info/Micro-entreprise/Clients/OpenDataFrance/Technique/geodatamine.png"
inkscape:export-xdpi="384"
inkscape:export-ydpi="384">
<defs
id="defs1203" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="0.59514382"
inkscape:cy="162.23741"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1015"
inkscape:window-x="0"
inkscape:window-y="452"
inkscape:window-maximized="1" />
<metadata
id="metadata1206">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-263.13332)">
<path
style="fill:#cdcdcd;fill-opacity:1;fill-rule:evenodd;stroke-width:0.49803913"
inkscape:connector-curvature="0"
d="m 12.693968,284.53056 h 8.478736 l 5.510434,-2.80188 2.930175,-10.1073 H 4.2533542 l 2.9301757,10.1073"
id="path815-9-0"
sodipodi:nodetypes="cccccc" />
<path
style="fill:#424242;fill-opacity:1;fill-rule:evenodd;stroke-width:0.49803913"
inkscape:connector-curvature="0"
d="M 5.3853605,282.76936 2.2039848,271.62138 H 1.9921577 c -0.5501184,0 -0.99607884,-0.44595 -0.99607884,-0.99607 0,-0.55013 0.44596044,-0.99607 0.99607884,-0.99607 H 31.87451 c 0.550118,0 0.996079,0.44594 0.996079,0.99607 0,0.55012 -0.619678,1.39726 -0.996079,0.99607 h -0.211828 l -3.181371,11.14798 -7.536307,3.75336 h -8.023341 m -0.227695,-1.99216 h 8.478736 l 5.510434,-2.80188 2.930175,-10.1073 H 4.2533542 l 2.9301757,10.1073"
id="path815-93"
sodipodi:nodetypes="ccssccsscccccccccc" />
<circle
style="fill:#cdcdcd;fill-opacity:1;stroke:#0c0c0c;stroke-width:2.5336349;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="path972-9"
cx="8.9460621"
cy="285.33197"
r="3.167043" />
<circle
style="fill:#cdcdcd;fill-opacity:1;stroke:#0c0c0c;stroke-width:2.5336349;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="path972-2-2"
cx="24.920603"
cy="285.33197"
r="3.167043" />
<path
style="fill:#424242;fill-opacity:1;fill-rule:evenodd;stroke-width:0.49803913"
inkscape:connector-curvature="0"
d="m 32.870589,288.51192 c 0.550118,0 0.996078,0.44595 0.996078,0.99607 0,0.55012 -0.44596,0.99608 -0.996078,0.99608 H 0.99607886 C 0.44596052,290.50407 3.75382e-8,290.05811 3.75382e-8,289.50799 c 0,-0.55012 0.4459604824618,-0.99607 0.9960788224618,-0.99607 z"
id="path815-5-0"
sodipodi:nodetypes="csssscc" />
<path
style="fill:#f22613;fill-opacity:1;stroke:none;stroke-width:4.04393911;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 13.015233,274.15813 a 5.5408575,5.5408575 0 0 0 0,7.83594 5.5408575,5.5408575 0 0 0 7.835947,0 5.5408575,5.5408575 0 0 0 2.48e-4,-7.8362 5.5408575,5.5408575 0 0 0 -7.836195,2.6e-4 z m 1.107638,1.10763 a 4.1964007,4.1964007 0 0 1 5.138243,-0.61849 l -5.756477,5.75648 a 4.1964007,4.1964007 0 0 1 0.618234,-5.13799 z m 0.482676,6.2389 5.756477,-5.75647 a 4.1964007,4.1964007 0 0 1 -0.618483,5.13824 4.1964007,4.1964007 0 0 1 -5.137994,0.61823 z"
id="path841"
inkscape:connector-curvature="0" />
</g>
</svg>
......@@ -40,6 +40,10 @@
<span class="sr-only">Chargement en cours...</span>
</div>
</div>
<div id="form-failed" class="d-none alert alert-warning" role="alert">
<img src="img/geodatamine_fail.svg" class="align-self-center mr-3" height="64" alt="" />
Le service est indisponible pour le moment, merci de réessayer plus tard
</div>
<div id="form-extract" class="d-none">
<div class="form-group">
<label for="theme">Thématique</label>
......@@ -96,7 +100,7 @@
<h2 class="mt-3">À propos</h2>
<div class="media">
<img src="img/geodatamine.svg" class="align-self-center mr-3" height="128" alt="">
<img src="img/geodatamine.svg" class="align-self-center mr-3" height="128" alt="" />
<div class="media-body align-self-center">
<p class="mb-0">GéoDataMine facilite l'extraction de données thématiques depuis OpenStreetMap, sous la forme de fichiers tableurs ou géographiques. <a href="https://www.openstreetmap.org/">OpenStreetMap</a> est une base de données géographique collaborative, l'équivalent de Wikipédia pour la cartographie. On y trouve toutes sortes d'informations : routes, bâtiments, commerces, services publics... Il est simple de participer, mais pas si facile de télécharger des données d'une thématique spécifique sur son territoire. D'où cet assistant très simple ! Les données sont actualisées quotidiennement, et rendues disponibles aux formats CSV, GeoJSON et Shapefile.</p>
</div>
......
......@@ -197,7 +197,8 @@ const itv = setInterval(() => {
clearInterval(itv);
if(data.themes === "error" || data.boundaries === "error") {
alert("Une erreur s'est produite lors du chargement des métadonnées, merci de réessayer");
document.getElementById("form-failed").classList.remove("d-none");
document.getElementById("form-load").classList.add("d-none");
}
else {
createForm();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment