Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 3733 Rev 3734
Line 123... Line 123...
123
                        $obsAAjouter['geometry'] = $obs['geometry'] ?? json_encode([
123
                        $obsAAjouter['geometry'] = $obs['geometry'] ?? json_encode([
124
                                'type' => 'Point',
124
                                'type' => 'Point',
125
                                'coordinates' => [ (float)$obs['longitude'], (float)$obs['latitude'] ]
125
                                'coordinates' => [ (float)$obs['longitude'], (float)$obs['latitude'] ]
126
                            ]); // CONCAT('{\"type\":\"Point\",\"coordinates\":[', longitude, ',', latitude,']}'),
126
                            ]); // CONCAT('{\"type\":\"Point\",\"coordinates\":[', longitude, ',', latitude,']}'),
127
                        $obsAAjouter['geodatum'] = 'WGS84';
127
                        $obsAAjouter['geodatum'] = 'WGS84';
128
                        $obsAAjouter['published_location'] = (! empty($requeteDonnees['tag-obs']) && strpos(strtolower($requeteDonnees['tag-obs']), 'plantnet') !== false) ? 
128
                        $obsAAjouter['published_location'] = (! empty($requeteDonnees['tag-obs']) && strpos(strtolower($requeteDonnees['tag-obs']), 'sensible') !== false) ? 
129
                            "localité" : "précise";
129
                            "localité" : "précise";
Line 130... Line 130...
130
 
130
 
131
                        $obsAAjouter['phenology'] = isset($obs['phenologie']) ? $obs['phenologie'] : null;
131
                        $obsAAjouter['phenology'] = isset($obs['phenologie']) ? $obs['phenologie'] : null;
Line 151... Line 151...
151
                                default:
151
                                default:
152
                                    $obsAAjouter['certainty'] = $obs['certitude'];
152
                                    $obsAAjouter['certainty'] = $obs['certitude'];
153
                                    break;
153
                                    break;
154
                            }
154
                            }
155
                        }
155
                        }
156
                        $obsAAjouter['certainty'] = ($this->project == "aDeterminer") ? 'à déterminer' : $obsAAjouter['certainty'];
156
                        $obsAAjouter['certainty'] = ($this->projet == "aDeterminer") ? 'à déterminer' : $obsAAjouter['certainty'];
157
                        $obsAAjouter['input_source'] = 'widget';
157
                        $obsAAjouter['input_source'] = 'widget';
158
                        $obsAAjouter['project_id'] = $this->projetId;
158
                        $obsAAjouter['project_id'] = $this->projetId;
159
                        $obsAAjouter['project'] = ($this->projectId == null) ? null : $this->projet;
159
                        $obsAAjouter['project'] = ($this->projetId == null) ? null : $this->projet;
160
                        if ($this->isFromPlantNet) {
160
                        if ($this->isFromPlantNet) {
161
                            $obsAAjouter['input_source'] = 'PlantNet';
161
                            $obsAAjouter['input_source'] = 'PlantNet';
162
                            $obsAAjouter['plantnet_id'] = $obs['obs_id'];
162
                            $obsAAjouter['plantnet_id'] = $obs['obs_id'];
163
                        }
163
                        }
164
                        if ($this->isSauvages) {
164
                        if ($this->isSauvages) {