Subversion Repositories eFlore/Applications.cel

Rev

Rev 3753 | Rev 3759 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3753 Rev 3754
Line 25... Line 25...
25
    private $projetTags = array();
25
    private $projetTags = array();
26
    private $tagsObs = null;
26
    private $tagsObs = null;
27
    private $tagsImg = null;
27
    private $tagsImg = null;
28
    private $userId = null;
28
    private $userId = null;
29
    private $userEmail = null;
29
    private $userEmail = null;
30
    private $userIntitule = null;=
30
    private $userIntitule = null;
31
    private $isPlantnetPull = false;
31
    private $isPlantnetPull = false;
32
    private $isSauvages = false;
32
    private $isSauvages = false;
33
    const DUREE_DE_VIE_IMG = 86400;// 3600 * 24 = 86 400 (1 journée)
33
    const DUREE_DE_VIE_IMG = 86400;// 3600 * 24 = 86 400 (1 journée)
34
    const ARRET_SERVICE = false;// Permet de bloquer le service en cas de problème sur le serveur
34
    const ARRET_SERVICE = false;// Permet de bloquer le service en cas de problème sur le serveur
Line 126... Line 126...
126
                        $obsAAjouter['station'] = isset($obs['station']) && trim($obs['station']) !== "" ? $obs['station'] : null;
126
                        $obsAAjouter['station'] = isset($obs['station']) && trim($obs['station']) !== "" ? $obs['station'] : null;
127
                        $obsAAjouter['environment'] = isset($obs['milieu']) && trim($obs['milieu']) !== "" ? $obs['milieu'] : null;
127
                        $obsAAjouter['environment'] = isset($obs['milieu']) && trim($obs['milieu']) !== "" ? $obs['milieu'] : null;
128
                        $obsAAjouter['elevation'] = (! empty($obs['altitude'])) ? $obs['altitude'] : null;
128
                        $obsAAjouter['elevation'] = (! empty($obs['altitude'])) ? $obs['altitude'] : null;
129
                        $obsAAjouter['geometry'] = $obs['geometry'] ?? json_encode([
129
                        $obsAAjouter['geometry'] = $obs['geometry'] ?? json_encode([
130
                                'type' => 'Point',
130
                                'type' => 'Point',
131
                                'coordinates' => [ (float)$obs['longitude'], (float)$obs['latitude'] ]
131
                                'coordinates' => [ (float)str_replace(',', '.', $obs['longitude']),(float)str_replace(',', '.', $obs['latitude']) ]
132
                            ]); // CONCAT('{\"type\":\"Point\",\"coordinates\":[', longitude, ',', latitude,']}'),
132
                            ]); // CONCAT('{\"type\":\"Point\",\"coordinates\":[', longitude, ',', latitude,']}'),
133
                        $obsAAjouter['geodatum'] = 'WGS84';
133
                        $obsAAjouter['geodatum'] = 'WGS84';
134
                        $obsAAjouter['published_location'] = ($this->tagsObs != null && in_array('sensible', $this->tagsObs) == true) ? 
134
                        $obsAAjouter['published_location'] = ($this->tagsObs != null && in_array('sensible', $this->tagsObs) == true) ? 
135
                            "localité" : "précise";
135
                            "localité" : "précise";