43,6 → 43,10 |
$this->img['general'] = imagecreatefrompng($this->cheminCartesBase.$this->info['src_map']); |
} |
|
public function testerParametresProjets() { |
$test = true; |
return $test; |
} |
|
public function chargerDonnees() { |
// Recherche nom correspondant au numero nomenclatural en cours (pour etablir le lien avec les donnees moissonnes). |
55,14 → 59,21 |
* |
* A terme, utilser vraiment le moissonage, y compris pour les donnees issues du CEL, en utilisant ABCD et en modifiant le programme d'harvesting. |
*/ |
if ($this->info['nt'] == 0) { |
$inventoriesCel = array(); |
} else { |
$queryCel = "SELECT 'cel' as collection_code, location, id_location, date_observation, ". |
" coord_y as y_utm, coord_x as x_utm, ref_geo as sector, identifiant FROM tb_cel.cel_inventory ". |
"WHERE num_taxon = '".$this->info['nt']."' ". |
" AND transmission = 1"; |
$inventoriesCel = $this->getBdd()->recupererTous($queryCel); |
} |
|
// Recuperation des donnees de moissonage |
// Collection code = 'flore' (Cenlr) |
if ($this->info['nom'] == '') { |
$inventoriesCenlr = array(); |
} else { |
$queryCenlr = "SELECT collection_code, locality as location, county as id_location, ". |
" STR_TO_DATE(concat(year, '/',month, '/',day), '%Y/%m/%d') as date_observation, latitude as y_utm , ". |
" longitude as x_utm , max_altitude as sector, collector_name as identifiant ". |
71,8 → 82,8 |
" AND collection_code = 'flore' ". |
" AND (deleted IS NULL OR deleted = '0000-00-00 00:00:00')"; |
$inventoriesCenlr = $this->getBdd()->recupererTous($queryCenlr); |
} |
|
|
// Collection code = 'FLORE - VAR' (Cbnmed) |
/*$queryCbnmed = "SELECT collection_code, locality as location, county as id_location, ". |
" STR_TO_DATE(concat(ifnull(year,0),'/', ifnull(month,0), '/',ifnull(day,0)), '%Y/%m/%d') as date_observation, ". |
84,6 → 95,9 |
$inventoriesCbnmed = $this->getBdd()->recupererTous($queryCbnmed);*/ |
|
// Collection code = 'sophy' |
if ($this->info['nom_ss_auteur'] == '') { |
$inventoriesSophy = array(); |
} else { |
$querySophy = "SELECT 'sophy' as collection_code, lieu_station_nom as location, lieu_commune_code_insee as id_location, ". |
" observation_date as date_observation, lieu_station_utm_est as x_utm , ". |
" lieu_station_utm_nord as y_utm , lieu_station_utm_zone as sector, observateur_nom_complet as identifiant ". |
90,6 → 104,7 |
"FROM sophy_tapir ". |
"WHERE nom_scientifique_complet = ".$this->getBdd()->proteger($this->info['nom_ss_auteur']); |
$inventoriesSophy = $this->getBdd()->recupererTous($querySophy); |
} |
|
return array_merge($inventoriesCel, $inventoriesCenlr, $inventoriesSophy); //$inventoriesCbnmed, |
} |