Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 361 → Rev 362

/trunk/services/modules/0.1/eflore/cartes/CbnmedFormateur.php
42,6 → 42,14
$this->img['cbnmed'] = imagecreatefrompng($this->cheminCartesBase.$this->info['src_map']);
}
public function testerParametresProjets() {
$test = true;
if ($this->info['nom'] == '') {
$test = false;
}
return $test;
}
public function chargerDonnees() {
// Recherche nom correspondant au numero nomenclatural en cours (pour etablir le lien avec les donnees moissonnes).
// Collection code = 'FLORE - VAR' (Cbnmed)
/trunk/services/modules/0.1/eflore/cartes/GeneralFormateur.php
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,24 → 59,31
*
* A terme, utilser vraiment le moissonage, y compris pour les donnees issues du CEL, en utilisant ABCD et en modifiant le programme d'harvesting.
*/
$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);
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)
$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 ".
"FROM tb_hit_indexation.raw_occurrence_record ".
"WHERE scientific_name = ".$this->getBdd()->proteger($this->info['nom']).
" AND collection_code = 'flore' ".
" AND (deleted IS NULL OR deleted = '0000-00-00 00:00:00')";
$inventoriesCenlr = $this->getBdd()->recupererTous($queryCenlr);
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 ".
"FROM tb_hit_indexation.raw_occurrence_record ".
"WHERE scientific_name = ".$this->getBdd()->proteger($this->info['nom']).
" 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,12 → 95,16
$inventoriesCbnmed = $this->getBdd()->recupererTous($queryCbnmed);*/
// Collection code = 'sophy'
$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 ".
"FROM sophy_tapir ".
"WHERE nom_scientifique_complet = ".$this->getBdd()->proteger($this->info['nom_ss_auteur']);
$inventoriesSophy = $this->getBdd()->recupererTous($querySophy);
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 ".
"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,
}
/trunk/services/modules/0.1/eflore/cartes/SophyFormateur.php
34,6 → 34,14
$this->img['sophy'] = imagecreatefromjpeg($this->cheminCartesBase.$this->info['src_map']);
}
public function testerParametresProjets() {
$test = true;
if ($this->info['nom_ss_auteur'] == '') {
$test = false;
}
return $test;
}
public function chargerDonnees() {
// Collection code = 'sophy'
$querySophy = "SELECT 'sophy' as collection_code, lieu_station_nom as location, lieu_commune_code_insee as id_location, ".
/trunk/services/modules/0.1/eflore/cartes/CelFormateur.php
34,6 → 34,14
$this->img['cel'] = imagecreatefrompng($this->cheminCartesBase.$this->info['src_map']);
}
public function testerParametresProjets() {
$test = true;
if ($this->info['nt'] == 0) {
$test = false;
}
return $test;
}
public function chargerDonnees() {
// Recherche nom correspondant au numero nomenclatural en cours (pour etablir le lien avec les donnees moissonnes).
/trunk/services/modules/0.1/eflore/cartes/CenlrFormateur.php
42,6 → 42,14
$this->img['cenlr'] = imagecreatefrompng($this->cheminCartesBase.$this->info['src_map']);
}
public function testerParametresProjets() {
$test = true;
if ($this->info['nom'] == '') {
$test = false;
}
return $test;
}
public function chargerDonnees() {
// Collection code = 'flore' (Cenlr)
$queryCenlr = "SELECT collection_code, locality as location, county as id_location, ".
/trunk/services/modules/0.1/eflore/Cartes.php
74,8 → 74,10
public function formerCarte() {
$this->creerFormateur();
$this->cartesFormateur->initialiserImage();
$inventories = $this->cartesFormateur->chargerDonnees();
$inventories = '';
if ($this->cartesFormateur->testerParametresProjets() == true) {
$inventories = $this->cartesFormateur->chargerDonnees();
}
$retour = '';
if (is_array($inventories) && $inventories !== array()){
$this->chargerVille();// Connection referentiel communes