Skip to content

Commit

Permalink
new model
Browse files Browse the repository at this point in the history
  • Loading branch information
dawar2151 committed Oct 28, 2018
0 parents commit d6245aa
Show file tree
Hide file tree
Showing 3,862 changed files with 65,683 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cache/*.*
template_c/*.*
config/config.php
templates/pages/fr/*.html
images/034143.jpg
images/logo.jpg
images/logo.png
images/img1sousItem1.png
images/img2sousItem1.png
images/img3sousItem2.png
images/img4item2.png
favicon.ico
22 changes: 22 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Disable Multiviews
#Options -Multiviews -indexes

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
# Acces controler - action
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-l [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z]{2})/pages/([a-zA-Z0-1_-]+).html$ index.php?controler=controler&action=get_page&langue=$1&params=page-$2 [NC,L,QSA]
RewriteRule ^([a-zA-Z_-]+)/([a-zA-Z_-]+)$ index.php?controler=$1&action=$2 [NC,L,QSA]
RewriteRule ^([a-zA-Z_-]+)/([a-zA-Z_-]+)/([a-zA-Z0-9_-]+)$ index.php?controler=$1&action=$2&params=$3 [NC,L,QSA]
#RewriteRule ^(.*).html$ index.php [NC,L]
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controler=controler&action=error404




674 changes: 674 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions README-fr.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
FollowDem
=========

Application web cartographique permettant de suivre le déplacement d'objets équipés d'un GPS.

Utilisée pour le suivi GPS des bouquetins du Parc national des Ecrins : `<http://bouquetins.ecrins-parcnational.fr>`_

.. image :: docs/img/screenshot-bouquetins-pne.jpg
:target: http://bouquetins.ecrins-parcnational.fr
English version of this presentation : `<https://github.com/PnEcrins/FollowDem/blob/master/README.rst>`_

Technologies
------------

- Langages : PHP, HTML, JS, CSS
- BDD : MySQL / PDO
- Serveur : Debian ou Ubuntu
- Framework carto : `Leaflet <http://leafletjs.com>`_
- Framework CSS : `Bootstrap <http://getbootstrap.com>`_
- Template : `Bootleaf <https://github.com/bmcbride/bootleaf>`_
- Gestion des templates et du cache : `Smarty <http://www.smarty.net>`_
- Fonds rasters : Geoportail, OpenStreetMap, Google Maps, WMS

Présentation
------------

**Principe général** :

L'application permet de suivre la position et le déplacement de plusieurs objets équipés d'un GPS.

Les objets ont chacun un identifiant. Ils transmettent tous leur position GPS à un satellite à intervalles réguliers.

Il faut ensuite récupérer ces positions GPS des objets pour les intégrer dans la base de données MySQL. Pour cela un fichier TXT par position et par objet est envoyé à une boite email.

Une tâche (``import_imap_csv`` dans le fichier ``/classes/controler/controler.class.php``) permet de :

- Se connecter à cette boite email et d'en extraire les fichiers TXT en pièce-jointe des emails
- Copier ces fichiers TXT dans le répertoire ``tmp/csv``
- Supprimer les emails une fois les fichiers TXT copiés sur le serveur
- Importer les nouvelles positions des différents objets (si ceux-ci existent dans la BDD avec un identifiant commun) dans un fichier CSV (``/csv/tracked_objects.csv``)
- Supprimer les fichiers TXT temporaires une fois qu'ils ont été traités
- Importer les nouvelles positions dans la BDD MySQL depuis le fichier ``/csv/tracked_objects.csv``
- Vider le fichier ``/csv/tracked_objects.csv``

Cette tache peut être lancée manuellement ou par un CRON lancé autmatiquement à intervalle régulier.

D'autres manières de remplir ce CSV pourraient être envisagées :

- Remplir directement le fichier CSV automatiquement ou à la main
- Importer les fichiers TXT dans le répertoire ``tmp/csv`` sans passer par une connection à une boite email.

Installation
------------

Consulter la documentation : `<http://followdem.rtfd.org>`_

Auteurs
-------

Parc national des Ecrins

- Fabien Selles
- Thibault Romanin
- Gil Deluermoz
- Camille Monchicourt

License
-------

* OpenSource - GPLv3
* Copyright (c) 2015 - Parc National des Écrins


.. image:: http://geonature.fr/img/logo-pne.jpg
:target: http://www.ecrins-parcnational.fr
97 changes: 97 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
FollowDem
=========

Cartographic web application to track moving objects equipped with a GPS.

This application is used by the Ecrins national Park to follow ibex : `<http://bouquetins.ecrins-parcnational.fr>`_

.. image :: docs/img/screenshot-bouquetins-pne.jpg
:target: http://bouquetins.ecrins-parcnational.fr
French version of this presentation : `<https://github.com/PnEcrins/FollowDem/blob/master/README-fr.rst>`_

Technologies
------------

- Languages : PHP, HTML, JS, CSS
- Database : MySQL / PDO
- Server : Debian ou Ubuntu
- Carto framework : `Leaflet <http://leafletjs.com>`_
- CSS framework : `Bootstrap <http://getbootstrap.com>`_
- Template : `Bootleaf <https://github.com/bmcbride/bootleaf>`_
- Cache and template management : `Smarty <http://www.smarty.net>`_
- Base maps : Geoportail, OpenStreetMap, Google Maps, WMS

Presentation
------------

**General principles** :

This application allows to track position of several objects (animals, bus...) equipped with a GPS.

Each object has an ID. They all transmit their GPS position to a satellite at regular intervals.

Then the application download these GPS positions to upload them in the MySQL database. For that, a TXT file is sent to an electronic mailbox for each object and each position.

A task (``import_imap_csv`` in file ``/classes/controler/controler.class.php``) is executing these steps :

- Connecting to this mailbox and extracting the TXT files attached to emails
- Copying these TXT files in the directory ``tmp/csv``
- Deleting emails once TXT files are copied on FollowDem server
- Importing new positions of all objects (if these ones are already in the database with a common ID) in a CSV file (``/csv/tracked_objects.csv``)
- Deleting the TXT temporaries TXT files once their content has been included in the CSV file
- Importing new positions in the MySQL database from the file ``/csv/tracked_objects.csv``
- Emptying file ``/csv/tracked_objects.csv``

This task can be executed manually or with a CRON launched automatically and regulary.

Other ways to fill this CSV could be considered :

- Directly fill the CSV file (automatically or manually)
- Import TXT files in directory ``tmp/csv`` without connecting to a mailbox

**Demonstration and features**

Try it at `<http://bouquetins.ecrins-parcnational.fr>`_.

It includes a list of tracked objects, the map of tracked objects, a tool to select data duration.

When you click on an objects on map, click on "Voir le parcours" to show his recent travel. Then you can change duration (last 15, 30, 60, 90, 120... days).

You can also click on one position to view the day and hour, altitude and temperature.

All datas are collected in real-time and automatically from GPS positions of each ibex.

Our aim with this application was to do something very easy to use for everyone (schools, tourists, scientifics, curious...) that want to understand how ibex are moving.

We have another internal tool with more functionalities for our scientific program.

We learnt a lot with this GPS program. Here is just an example of an ibex that travelled to Italia : http://www.ecrins-parcnational.fr/actualite/un-bouquetin-des-cerces-en-italie

Scientific program explanations : http://www.ecrins-parcnational.fr/actualite/des-bouquetins-geolocalises

Installation
------------

Documentation : `<http://followdem.rtfd.org>`_ (French)

Authors
-------

Parc national des Ecrins

- Fabien Selles
- Thibault Romanin
- Gil Deluermoz
- Camille Monchicourt

Licence
-------

* OpenSource - GPLv3
* Copyright (c) 2015 - Parc National des Écrins


.. image:: http://geonature.fr/img/logo-pne.jpg
:target: http://www.ecrins-parcnational.fr
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.1
9 changes: 9 additions & 0 deletions _admin/aide.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
include ("verification.inc.php");
include("./head.inc.php");
include("./nav.inc.php");
?>

<?php
include("./bottom.inc.php");
?>
3 changes: 3 additions & 0 deletions _admin/bottom.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script type="text/javascript" src="js/script.js"></script>
</body>
</html>
Loading

0 comments on commit d6245aa

Please sign in to comment.